Author: ptahchiev Date: Sun Feb 24 04:15:51 2008 New Revision: 630614 URL: http://svn.apache.org/viewvc?rev=630614&view=rev Log: Changes on the maven plugin so that it uses the latest version of cactus and cargo.
Modified: jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/integration/maven/plugin.jelly jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/integration/maven/project.properties jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/integration/maven/project.xml Modified: jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/integration/maven/plugin.jelly URL: http://svn.apache.org/viewvc/jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/integration/maven/plugin.jelly?rev=630614&r1=630613&r2=630614&view=diff ============================================================================== --- jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/integration/maven/plugin.jelly (original) +++ jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/integration/maven/plugin.jelly Sun Feb 24 04:15:51 2008 @@ -93,8 +93,9 @@ <test:dependency-handle/> <ant:path id="cactus.classpath"> - <ant:pathelement location="${plugin.getDependencyPath('cactus:cactus-ant')}"/> - <ant:pathelement location="${plugin.getDependencyPath('cactus:cactus')}"/> + <ant:pathelement location="${plugin.getDependencyPath('org.apache.cactus:cactus.core.framework.uberjar.javaEE.14')}"/> + <ant:pathelement location="${plugin.getDependencyPath('org.apache.cactus:cactus.integration.ant')}"/> + <ant:pathelement location="${plugin.getDependencyPath('org.apache.cactus:cactus.integration.shared.api')}"/> <ant:pathelement location="${plugin.getDependencyPath('commons-logging:commons-logging')}"/> <ant:pathelement location="${plugin.getDependencyPath('junit:junit')}"/> <ant:pathelement location="${plugin.getDependencyPath('commons-httpclient:commons-httpclient')}"/> @@ -105,7 +106,10 @@ <ant:pathelement location="${plugin.getDependencyPath('xerces:xerces')}"/> <ant:pathelement location="${plugin.getDependencyPath('xml-apis:xml-apis')}"/> <ant:pathelement location="${plugin.getDependencyPath('rhino:js')}"/> - <ant:pathelement location="${plugin.getDependencyPath('cargo:cargo')}"/> + <ant:pathelement location="${plugin.getDependencyPath('org.codehaus.cargo:cargo-core-uberjar')}"/> + <ant:pathelement location="${plugin.getDependencyPath('org.codehaus.cargo:cargo-ant')}"/> + + </ant:path> <ant:taskdef resource="cactus.tasks" classpathref="cactus.classpath"/> @@ -154,8 +158,7 @@ <!-- List of supported containers --> <!--<j:set var="cargo.containers" value="resin2x,resin3x,tomcat3x,tomcat4x,tomcat5x,orion1x,orion2x,jboss3x,weblogic7x"/>--> - <util:tokenize var="cargo.containers" delim="," trim="true">${cargo.containers} - </util:tokenize> + <!--util:tokenize var="cargo.containers" delim="," trim="true">${cargo.containersa}</util:tokenize--> @@ -294,7 +297,6 @@ <!-- Generate the war artifact --> <attainGoal name="${cactus.build.goal.war}"/> - <cactifywar version="${cactus.servlet.version}" destfile="${cactus.war}"> <!-- Only specify a source war to cactify if we are not testing EJBs. @@ -404,10 +406,12 @@ --> <goal name="cactus:prepare" description="Prepare Cactus tests" prereqs="cactus:init"> - <j:forEach var="containerId" items="${cargo.containers}"> + <j:forEach var="containerGroupId" items="${cargo.containers}"> + <j:set var="containerGroupName" value="cargo.container.${containerGroupId}.containerId"/> + <j:set var="containerId" value="${context.getVariable(containerGroupName)}"/> <j:set var="containerDirVar" value="cactus.home.${containerId}"/> <j:set var="containerDir" value="${context.getVariable(containerDirVar)}"/> - + <j:if test="${containerDir != null and !containerDir.trim().equals('')}"> <!-- Prepare logging output files --> @@ -425,9 +429,8 @@ <ant:touch file="${maven.build.dir}/logging_server.properties"/> <j:set var="logging_server" value="${maven.build.dir}/logging_server.properties"/> </j:if> - <j:if test="${context.getVariable('cactus.logging.config.client') != null}"> - <j:set var="logging_client" value="${cactus.logging.config.client}"/> + <j:set var="logging_client" value="${context.getVariable('cactus.logging.config.client')}"/> </j:if> <j:if test="${context.getVariable('cactus.logging.config.client') == null}"> <ant:touch file="${maven.build.dir}/logging_client.properties"/> @@ -487,11 +490,11 @@ Start up container. ======================================================================== --> - <goal name="cactus:start-container" + <goal name="cactus:start-container" prereqs="cactus:init, cactus:prepare" description="Start up a test container"> <ant:echo> "Start up: ${containerId}" </ant:echo> <ant:cargo id="${containerId}" containerId="${containerId}" action="start" - homeDir="${containerDir}/" + home="${containerDir}/" wait="false" log="${maven.build.dir}/${containerId}/cargo_start.log" output="${maven.build.dir}/${containerId}/container_start.log"> <ant:configuration dir="${configdir}"> @@ -515,7 +518,6 @@ </ant:extraclasspath> </ant:cargo> - </goal> <!-- @@ -561,7 +563,7 @@ prereqs="cactus:init,cactus:prepare,cactus:init-report,cactus:cactifywar" description="Run all Cactus tests (packaged in a WAR)"> - <ant:echo> ----Running cactus:test-war----- </ant:echo> + <ant:echo> ----Running cactus:test-war----- </ant:echo> <j:set var="hasWar" value="true"/> <j:set var="hasEar" value="false"/> <cactus:scanner var="cactusScanner" classpathref="cactus.scanner.classpath"> @@ -570,50 +572,50 @@ <exclude name="${cactus.test.excludes}"/> </fileset> </cactus:scanner> - - <j:forEach var="containerId" items="${cargo.containers}"> + <j:forEach var="containerGroupId" items="${cargo.containers}"> + <j:set var="containerGroupName" value="cargo.container.${containerGroupId}.containerId"/> + <j:set var="containerId" value="${context.getVariable(containerGroupName)}"/> <j:set var="containerDirVar" value="cactus.home.${containerId}"/> <j:set var="containerDir" value="${context.getVariable(containerDirVar)}"/> - <ant:echo> ${containerDir}</ant:echo> + <j:if test="${containerDir != null and !containerDir.trim().equals('')}"> - <attainGoal name="cactus:start-container"/> <!--Using cactustest to carry out the test --> - <ant:echo> "Running test ..." </ant:echo> - <cactustests fork="yes" failureproperty="tests.failed" haltonerror="true" - servletport="${cactus.port}" - warfile="${cactus.war}" - todir="${cactus.reports.dir}/${containerId}" - logs="${logging_client}"> - - <!-- Pass any user-defined system properties --> - <util:tokenize var="listOfProperties" delim=" "> - ${cactus.sysproperties} - </util:tokenize> - <j:forEach var="someProperty" items="${listOfProperties}"> - <ant:sysproperty key="${someProperty}" - value="${context.getVariable(someProperty)}"/> - </j:forEach> - <ant:classpath> + <ant:echo> "Running test ..." +!${reports.dir}! + !${cactus.src.dir}!</ant:echo> + + <cactus warfile="${cactus.war}" printsummary="yes"> + + <ant:classpath> <ant:pathelement path="${maven.build.dest}"/> <ant:pathelement location="${cactus.target.classes.dir}"/> <ant:path refid="maven.dependency.classpath"/> <ant:path refid="cactus.classpath"/> - </ant:classpath> - <formatter type="plain" usefile="${cactus.junit.usefile}"/> - <formatter type="xml"/> - <j:forEach var="test" items="${cactusScanner.iterator()}"> - <test name="${test}"/> - </j:forEach> - - </cactustests> - - <attainGoal name="cactus:stop-container"/> - - </j:if> + </ant:classpath> + + <containerset> + <cargo containerId="${containerId}" home="${containerDir}/" wait="false" output="${maven.build.dir}/${containerId}/container_start.log" log="${maven.build.dir}/${containerId}/cargo_start.log"> + <configuration> + <property name="cargo.servlet.port" value="${cactus.port}"/> + <property name="cargo.logging" value="high"/> + <deployable type="war" file="${cactus.war}"/> + </configuration> + </cargo> + </containerset> + + <formatter type="xml"/> + <batchtest todir="target/"> + <fileset dir="${cactus.src.dir}"> + <include name="**/Test*.java"/> + </fileset> + </batchtest> + <!--j:forEach var="test" items="${cactusScanner.iterator()}"> + <test name="${test}"/> + </j:forEach--> + </cactus> + + </j:if> </j:forEach> - </goal> <!-- Modified: jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/integration/maven/project.properties URL: http://svn.apache.org/viewvc/jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/integration/maven/project.properties?rev=630614&r1=630613&r2=630614&view=diff ============================================================================== --- jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/integration/maven/project.properties (original) +++ jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/integration/maven/project.properties Sun Feb 24 04:15:51 2008 @@ -65,11 +65,11 @@ ## using ant ## maven.jar.override=on -maven.jar.cactus=../../framework/dist-13/lib/cactus-${pom.currentVersion}.jar +maven.jar.cactus=../../framework/framework-uberjars/javaEE-14-uberjar/target/cactus.core.framework.uberjar.javaEE.14-${pom.currentVersion}.jar # NOTE: maven properties can't have dashes, so we need these 2 properties # ( see http://jira.codehaus.org/browse/MAVEN-581 ) -maven.jar.cactus-ant=../ant/dist-13/lib/cactus-ant-${pom.currentVersion}.jar -maven.jar.cactus.ant=../ant/dist-13/lib/cactus-ant-${pom.currentVersion}.jar +maven.jar.cactus-ant=../ant/target/cactus.integration.ant-${pom.currentVersion}.jar +maven.jar.cactus.ant=../ant/target/cactus.integration.ant-${pom.currentVersion}.jar #For proxy #maven.proxy.host=wwwproxy.swin.edu.au #maven.proxy.port=8000 Modified: jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/integration/maven/project.xml URL: http://svn.apache.org/viewvc/jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/integration/maven/project.xml?rev=630614&r1=630613&r2=630614&view=diff ============================================================================== --- jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/integration/maven/project.xml (original) +++ jakarta/cactus/branches/CACTUS_TRUNK_MAMOUTH/integration/maven/project.xml Sun Feb 24 04:15:51 2008 @@ -6,7 +6,7 @@ <!-- Note: Although we inherit from default-project.xml, we still cannot remove the <currentVersion> tag as this project.xml is parsed at runtime whenever our plugin is called. --> - <currentVersion>1.8dev</currentVersion> + <currentVersion>1.8.0-SNAPSHOT</currentVersion> <name>Maven Cactus plugin</name> <package>org.apache.cactus.integration.maven</package> @@ -27,6 +27,21 @@ </contributors> <dependencies> <dependency> + <groupId>org.apache.cactus</groupId> + <artifactId>cactus.integration.ant</artifactId> + <version>1.8.0</version> + </dependency> + <dependency> + <groupId>org.apache.cactus</groupId> + <artifactId>cactus.core.framework.uberjar.javaEE.14</artifactId> + <version>1.8.0</version> + </dependency> + <dependency> + <groupId>org.apache.cactus</groupId> + <artifactId>cactus.integration.shared.api</artifactId> + <version>1.8.0</version> + </dependency> + <!--dependency> <groupId>cactus</groupId> <artifactId>cactus</artifactId> <version>13-1.7.2</version> @@ -35,7 +50,7 @@ <groupId>cactus</groupId> <artifactId>cactus-ant</artifactId> <version>13-1.7.2</version> - </dependency> + </dependency--> <dependency> <groupId>commons-httpclient</groupId> <artifactId>commons-httpclient</artifactId> @@ -61,9 +76,14 @@ <groupId>org.codehaus.cargo</groupId> <artifactId>cargo-core-uberjar</artifactId> <version>0.9</version> - <url>###GO TO ../.. (or ..\..) and run 'ant -f downloads.xml'###</url> + <url>http://repo1.maven.org/maven2/org/codehaus/cargo/cargo-core-uberjar/0.9/cargo-core-uberjar-0.9.jar</url> + </dependency> + <dependency> + <groupId>org.codehaus.cargo</groupId> + <artifactId>cargo-ant</artifactId> + <version>0.9</version> + <url>http://repo1.maven.org/maven2/org/codehaus/cargo/cargo-core-uberjar/0.9/cargo-core-uberjar-0.9.jar</url> </dependency> - <!-- Note: Dependencies below are needed by HttpUnit. Xerces is also needed by the XML report used by the junitreport Ant task --> <dependency> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]