Title: [SUBMIT] maven-jetspeed-plugin with Cactus support

Hi all,

after starting to really get into development with Jetspeed, I discovered how much I miss my cactus tests, and it seemed rather difficult to integrate cactus test, primarily because you need to customize a standard Jetspeed WAR file to have all of your permissions etc..

I wanted to leverage all the work done in the Maven cactus plugin, and since I noticed on the TODO list that Jetspeed would like to build with Maven, I started a maven plugin to create a WAR file that was designed to support Cactus testing.

Basically, when you call

        maven jetspeed:cactus-war

The plugin takes a standard plain vanilla jetspeed.war, and expands it into /target/jetspeed-cactus.  Then the plugin calls war:war which builds YOUR code as a war, and then expands it into /target/jetspeed-cactus, overlaying your code.  Lastly, it calls the merge-properties goal to merge all of your properties files settings into the Torque.properties/TR.props/JS.props etc int /target/jetspeed-cactus.  Lastly, we rewar the /target/jetspeed-cactus directory, and place it in /target/yourproject.war.  Then, if you call

        maven cactus:test-tomcat-4x

Then Cactus unwars your special Jetspeed war, add's the cactus stuff, and runs the tests!  It was amazing to see it all work together!

Caveats:
1) This is my first real work with Jelly/Maven, be gentle!
2) Merge files are inflexible.  I set up a pattern where in your specified source files, all files where name Merge{targetfile}, so MergeTorque.properties would be merged into Torque.properties.  MergeJetspeedSecurity.properties would be merged into JetspeedSecurity.properties. 

3) Merge files are limited to the standard four.  I didn't figure out looping successfully, so I hardcoded them in.
4) You must specify where the plain vanilla war file is.  By default, the property maven.jetspeed.vanilla.war expects the jetspeed.war in your plugin directory, but you should change it to reference the version you want.

5) You must put a jetspeed.jar in your /maven/repository/jetspeed/jars/ directory.  I compiled the plugin against CVS head.  Jetspeed.jar's need to be uploaded to iBiblio.

I recommend that the src be in /src/plugins-build/jetspeed (similar to how the Maven project itself organizes plugins).

Please give me your comments and feedback, and I would love to see this added to the main CVS for Jetspeed!  I will be off though till early January.  Enjoy the holidays.

Eric Pugh

 

Attachment: maven-jetspeed-plugin-1.0-SNAPSHOT.jar
Description: Binary data

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


Reply via email to