vmassol 2004/07/15 04:00:05 Modified: integration/maven plugin.properties plugin.jelly integration/maven/xdocs changes.xml Log: Fixes CACTUS-64 again. The plugin now correctly uses the <code>maven.war.build.dir</code>, <code>maven.war.final.name</code>, <code>maven.ejb.build.dir</code> and <code>maven.ejb.final.name</code> properties from the WAR and EJB plugins instead of hard-coding the values. Note that as a result, the Cactus plugins now requires version 1.7 of the WAR plugin and version 1.6 of the EJB plugin. Revision Changes Path 1.19 +6 -4 jakarta-cactus/integration/maven/plugin.properties Index: plugin.properties =================================================================== RCS file: /home/cvs/jakarta-cactus/integration/maven/plugin.properties,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- plugin.properties 20 Jun 2004 14:04:11 -0000 1.18 +++ plugin.properties 15 Jul 2004 11:00:04 -0000 1.19 @@ -56,11 +56,13 @@ # Goal that Cactus should call for generating the war artifact cactus.build.goal.war = war:war -# Default location of war to cactify -cactus.src.war = ${maven.build.dir}/${pom.artifactId}.war +# Location of war to cactify. By default it points to the war generated by the +# execution of "maven war:war". +# The cactus.src.war property is defined in the plugin.jelly script. -# Default location of the EJB to test (for the test-ear goal only) -cactus.src.ejb = ${maven.build.dir}/${pom.artifactId}-${pom.currentVersion}.jar +# Location of the EJB to test (for the test-ear goal only). By default it +# points to the EJB generated by the execution of "maven ejb:ejb". +# The cactus.src.ejb property is defined in the plugin.jelly script. # Goal that Cactus should call for generating the ejb artifact cactus.build.goal.ejb = ejb:ejb 1.32 +40 -1 jakarta-cactus/integration/maven/plugin.jelly Index: plugin.jelly =================================================================== RCS file: /home/cvs/jakarta-cactus/integration/maven/plugin.jelly,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- plugin.jelly 7 Jul 2004 09:02:35 -0000 1.31 +++ plugin.jelly 15 Jul 2004 11:00:04 -0000 1.32 @@ -19,6 +19,7 @@ xmlns:ant="jelly:ant" xmlns:define="jelly:define" xmlns:x="jelly:xml" + xmlns:maven="jelly:maven" xmlns:test="test" xmlns:cactustag="cactus" xmlns:cactus="jelly:org.apache.cactus.integration.maven.CactusTagLibrary"> @@ -33,10 +34,48 @@ <!-- ======================================================================== + Verify that the instlaled Maven has compatible versions of dependent + plugins. + ======================================================================== + --> + <goal name="cactus:check-plugin-dependencies"> + + <maven:get plugin="maven-war-plugin" property="plugin" var="warPlugin" /> + <j:if test="${warPlugin.currentVersion.compareTo('1.7') lt 0}"> + <ant:fail> + Must have WAR plugin v1.7 installed to use this version of the Cactus plugin. + Try: maven plugin:download -DgroupId=maven -DartifactId=maven-war-plugin -Dversion=1.7 + </ant:fail> + </j:if> + + <maven:get plugin="maven-ejb-plugin" property="plugin" var="ejbPlugin" /> + <j:if test="${warPlugin.currentVersion.compareTo('1.6') lt 0}"> + <ant:fail> + Must have EJB plugin v1.6 installed to use this version of the Cactus plugin. + Try: maven plugin:download -DgroupId=maven -DartifactId=maven-ejb-plugin -Dversion=1.6 + </ant:fail> + </j:if> + + </goal> + + <!-- + ======================================================================== Initializations. ======================================================================== --> - <goal name="cactus:init"> + <goal name="cactus:init" prereqs="cactus:check-plugin-dependencies"> + + <!-- Compute the default location of the input war file to cactify --> + <maven:get var="warBuildDir" plugin="maven-war-plugin" property="maven.war.build.dir"/> + <maven:get var="warFinalName" plugin="maven-war-plugin" property="maven.war.final.name"/> + <maven:property var="cactus.src.war" name="cactus.src.war" + defaultValue="${warBuildDir}/${warFinalName}"/> + + <!-- Compute the default location of the input EJB file to cactify --> + <maven:get var="ejbBuildDir" plugin="maven-ejb-plugin" property="maven.ejb.build.dir"/> + <maven:get var="ejbFinalName" plugin="maven-ejb-plugin" property="maven.ejb.final.name"/> + <maven:property var="cactus.src.ejb" name="cactus.src.ejb" + defaultValue="${ejbBuildDir}/${ejbFinalName}"/> <!-- Not sure why but this is needed, otherwise the taskdefs below fail --> <!-- DEPRECATION: Should now use <maven:get>/<maven:set> instead. Once 1.40 +8 -0 jakarta-cactus/integration/maven/xdocs/changes.xml Index: changes.xml =================================================================== RCS file: /home/cvs/jakarta-cactus/integration/maven/xdocs/changes.xml,v retrieving revision 1.39 retrieving revision 1.40 diff -u -r1.39 -r1.40 --- changes.xml 27 Jun 2004 16:41:26 -0000 1.39 +++ changes.xml 15 Jul 2004 11:00:05 -0000 1.40 @@ -8,6 +8,14 @@ <body> <release version="1.7dev" date="in CVS"> + <action dev="vmassol" type="fix" issue="CACTUS-64"> + The plugin now correctly uses the <code>maven.war.build.dir</code>, + <code>maven.war.final.name</code>, <code>maven.ejb.build.dir</code> + and <code>maven.ejb.final.name</code> properties from the WAR and EJB + plugins instead of hard-coding the values. Note that as a result, the + Cactus plugins now requires version 1.7 of the WAR plugin and version + 1.6 of the EJB plugin. + </action> <action dev="vmassol" type="fix"> Cactus now guess automatically what Java source files are Cactus tests when packaging tests in an EAR (it was already supported when running
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]