views:

666

answers:

2

Using Rational Application Developer to create a J2EE application, I create a project for my EAR and a project for my WAR - following the usual project structure created by RAD.

So, how do I create a Maven build file that builds the EAR with the WAR inside, etc - ready to deploy. Build needs to work when kicked-off from Hudson.

A: 

I do not have any experiance with RAD + Maven. But I had tried WSAD + ANT, and I had to use specific WSAD ant tasks to get this done. So, same would apply for the RAD + Maven scenario. I think this may give some hint.

http://maven.apache.org/plugins/maven-eclipse-plugin/rad-mojo.html

Sorry, could not provide a precise solution.

ring bearer
WSAD ant task is not appropriate (I think). Build needs to be portable - and needs to run from Hudson, not just within RAD - I think this is the basis of my problem.
Stevie
+2  A: 

If your EAR is a standard EAR, then "simply" use the Maven EAR plugin. If you need more specific guidance, please ask a more specific question.

Pascal Thivent
The ear is not exactly a stanard EAR. It will be a Webshere specific EAR - with the extra ibmconfig directory and assocated Websphere configuration. <dependency> <groupId>my.project</groupId> <artifactId>WAR</artifactId> <version>1.1.1</version> <type>war</type> </dependency>I have the above linked dependency for the WAR file. Inside RAD, kicking off the EAR build compiles, packages and includes the WAD inside the EAR. In Hudson - the same script gives an error. "projects in the reactor contain a cyclic reference: Edge between ... introduces to cycle in the graph"
Stevie
Formatting does not work in commments - and not enough space to show the complete error.
Stevie
@Stevie You can't have cyclic dependencies with Maven but I don't get where you have a cyclic dependency. Please, edit and update your question with the relevant snippets instead of using comments. Also, can you clarify if the content of `ibmconfig` is dynamic or not. It the content is static, this shouldn't be a problem (just in case, see http://stackoverflow.com/questions/2060368/what-is-the-difference-between-an-ear-file-and-a-websphere-enhanced-ear/2060743#2060743).
Pascal Thivent