3

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.

Pascal Thivent
  • 562,542
  • 136
  • 1,062
  • 1,124
Stevie
  • 53
  • 1
  • 3

3 Answers3

3

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
  • 562,542
  • 136
  • 1,062
  • 1,124
  • The ear is not exactly a stanard EAR. It will be a Webshere specific EAR - with the extra ibmconfig directory and assocated Websphere configuration. my.project WAR 1.1.1 war 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 Apr 15 '10 at 06:36
  • Formatting does not work in commments - and not enough space to show the complete error. – Stevie Apr 15 '10 at 06:37
  • @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 Apr 16 '10 at 14:38
1

Have you seen this Java EE development using Rational Application Developer 7.5.5 and Maven - Learn how the powerful open Maven build framework can be integrated with Rational Application Developer 7.5.5's rich set of Java EE 5 development tools- https://www.ibm.com/developerworks/wikis/download/attachments/113607155/RAD_755_MAVEN_0601.pdf?version=1

Albert T. Wong
  • 1,535
  • 1
  • 13
  • 21
0

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
  • 20,383
  • 7
  • 59
  • 72
  • 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 Apr 15 '10 at 06:38