diff options
author | Olivier Lamy <olamy@apache.org> | 2012-01-09 21:46:39 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2012-01-09 21:46:39 +0000 |
commit | 37a16032486065304a3f94a81ba7f23cfcc4ad45 (patch) | |
tree | d7c6c823bbaa255bd6e4ba99c5732d726a7ab646 | |
parent | 79d7b163de5bf335b7bd34b66a57f6d9ec2e5a93 (diff) | |
download | archiva-37a16032486065304a3f94a81ba7f23cfcc4ad45.tar.gz archiva-37a16032486065304a3f94a81ba7f23cfcc4ad45.zip |
use tomcat maven plugin rather than cargo in webapp-test-js faster than running an external tomcat
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1229370 13f79535-47bb-0310-9956-ffa450edef68
4 files changed, 60 insertions, 141 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/pom.xml b/archiva-modules/archiva-web/archiva-webapp-test-js/pom.xml index 3fbf0ace5..717f7979f 100644 --- a/archiva-modules/archiva-web/archiva-webapp-test-js/pom.xml +++ b/archiva-modules/archiva-web/archiva-webapp-test-js/pom.xml @@ -257,7 +257,7 @@ <executions> <execution> <id>unzip-archiva-webapp</id> - <phase>generate-resources</phase> + <phase>compile</phase> <goals> <goal>unpack</goal> </goals> @@ -270,25 +270,24 @@ <type>war</type> </artifactItem> </artifactItems> - <outputDirectory>${project.build.directory}/${container.name}conf/webapps/archiva</outputDirectory> + <outputDirectory>${project.build.directory}/tomcat6x/webapps/archiva</outputDirectory> <overWriteSnapshots>true</overWriteSnapshots> </configuration> </execution> - <execution> + <!--execution> <id>prepare-provided-dependencies</id> - <phase>generate-resources</phase> + <phase>test</phase> <goals> <goal>copy-dependencies</goal> </goals> <configuration> - <!-- TODO: this sometimes copies everything, causing problems with the server start up --> <includeGroupIds>org.apache.derby,javax.mail,javax.activation</includeGroupIds> <overWriteReleases>false</overWriteReleases> <overWriteSnapshots>true</overWriteSnapshots> <excludeTransitive>false</excludeTransitive> - <outputDirectory>${project.build.directory}/providedDependencies</outputDirectory> + <outputDirectory>${project.build.directory}/tomcat6x/webapps/archiva/WEB-INF/lib</outputDirectory> </configuration> - </execution> + </execution--> </executions> </plugin> <plugin> @@ -320,35 +319,11 @@ <copy todir="${project.build.directory}/local-repo"> <fileset dir="src/test/resources/local-repo"/> </copy> - </tasks> - </configuration> - </execution> - <execution> - <id>copy-container-conf</id> - <phase>package</phase> - <configuration> - <tasks> - <copy todir="${project.build.directory}/${container.name}conf"> - <fileset dir="src/test/${container.name}"/> - </copy> - <copy - todir="${cargo.install.dir}/apache-tomcat-${tomcat.version}/apache-tomcat-${tomcat.version}/common/lib"> - <fileset dir="${project.build.directory}/providedDependencies"> - <include name="**/*.jar"/> - </fileset> - </copy> - <!-- for tomcat 6 --> - <copy - todir="${cargo.install.dir}/apache-tomcat-${tomcat.version}/apache-tomcat-${tomcat.version}/lib"> - <fileset dir="${project.build.directory}/providedDependencies"> - <include name="**/*.jar"/> - </fileset> + <copy todir="${project.build.directory}/tomcat6x"> + <fileset dir="src/test/tomcat6x"/> </copy> </tasks> </configuration> - <goals> - <goal>run</goal> - </goals> </execution> <execution> <id>check-archiva-loaded</id> @@ -365,6 +340,7 @@ </execution> </executions> </plugin> + <!-- <plugin> <groupId>org.codehaus.cargo</groupId> <artifactId>cargo-maven2-plugin</artifactId> @@ -411,6 +387,57 @@ </configuration> </configuration> </plugin> + --> + <plugin> + <groupId>org.apache.tomcat.maven</groupId> + <artifactId>tomcat6-maven-plugin</artifactId> + <dependencies> + <dependency> + <groupId>org.apache.derby</groupId> + <artifactId>derby</artifactId> + <version>${derbyVersion}</version> + </dependency> + <dependency> + <groupId>javax.mail</groupId> + <artifactId>mail</artifactId> + <version>${javaxMailVersion}</version> + </dependency> + </dependencies> + <executions> + <execution> + <id>tomcat-run</id> + <goals> + <goal>run-war-only</goal> + </goals> + <phase>pre-integration-test</phase> + <configuration> + <additionalConfigFilesDir>${project.build.directory}/tomcat6x/conf</additionalConfigFilesDir> + <configurationDir>${project.build.directory}/tomcat6x</configurationDir> + <path>/archiva</path> + <port>${container.test.port}</port> + <uriEncoding>UTF-8</uriEncoding> + <warDirectory>${project.build.directory}/tomcat6x/webapps/archiva</warDirectory> + <fork>true</fork> + <ignorePackaging>true</ignorePackaging> + <systemProperties> + <appserver.base>${project.build.directory}/appserver-base</appserver.base> + <appserver.home>${project.build.directory}/appserver-base</appserver.home> + <derby.system.home>${project.build.directory}</derby.system.home> + </systemProperties> + <contextFile>src/test/${container.name}/Catalina/localhost/archiva.xml</contextFile> + <useNaming>true</useNaming> + <serverXml>${project.build.directory}/tomcat6x/conf/server.xml</serverXml> + </configuration> + </execution> + <execution> + <id>tomcat-shutdown</id> + <goals> + <goal>shutdown</goal> + </goals> + <phase>post-integration-test</phase> + </execution> + </executions> + </plugin> </plugins> </build> </profile> diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/tomcat6x/conf/Catalina/localhost/host-manager.xml b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/tomcat6x/conf/Catalina/localhost/host-manager.xml deleted file mode 100644 index 1e31ca5d4..000000000 --- a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/tomcat6x/conf/Catalina/localhost/host-manager.xml +++ /dev/null @@ -1,34 +0,0 @@ -<!-- - ~ Licensed to the Apache Software Foundation (ASF) under one - ~ or more contributor license agreements. See the NOTICE file - ~ distributed with this work for additional information - ~ regarding copyright ownership. The ASF licenses this file - ~ to you under the Apache License, Version 2.0 (the - ~ "License"); you may not use this file except in compliance - ~ with the License. You may obtain a copy of the License at - ~ - ~ http://www.apache.org/licenses/LICENSE-2.0 - ~ - ~ Unless required by applicable law or agreed to in writing, - ~ software distributed under the License is distributed on an - ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - ~ KIND, either express or implied. See the License for the - ~ specific language governing permissions and limitations - ~ under the License. - --> - - <!-- - - Context configuration file for the Tomcat Host Manager Web App - - $Id$ - - --> - - -<Context docBase="${catalina.home}/webapps/host-manager"/> - <!-- - privileged="true" antiResourceLocking="false" antiJARLocking="false"> - -</Context> ---> diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/tomcat6x/conf/Catalina/localhost/manager.xml b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/tomcat6x/conf/Catalina/localhost/manager.xml deleted file mode 100644 index 7229a88cf..000000000 --- a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/tomcat6x/conf/Catalina/localhost/manager.xml +++ /dev/null @@ -1,38 +0,0 @@ -<!-- - ~ Licensed to the Apache Software Foundation (ASF) under one - ~ or more contributor license agreements. See the NOTICE file - ~ distributed with this work for additional information - ~ regarding copyright ownership. The ASF licenses this file - ~ to you under the Apache License, Version 2.0 (the - ~ "License"); you may not use this file except in compliance - ~ with the License. You may obtain a copy of the License at - ~ - ~ http://www.apache.org/licenses/LICENSE-2.0 - ~ - ~ Unless required by applicable law or agreed to in writing, - ~ software distributed under the License is distributed on an - ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - ~ KIND, either express or implied. See the License for the - ~ specific language governing permissions and limitations - ~ under the License. - --> - - <!-- - - Context configuration file for the Tomcat Manager Web App - - $Id$ - - --> - - -<Context docBase="${catalina.home}/webapps/manager"/> - <!-- - privileged="true" antiResourceLocking="false" antiJARLocking="false"> - - - <ResourceLink name="users" global="UserDatabase" - type="org.apache.catalina.UserDatabase"/> - -</Context> - -->
\ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/tomcat6x/conf/tomcat-users.xml b/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/tomcat6x/conf/tomcat-users.xml deleted file mode 100644 index 34e268d84..000000000 --- a/archiva-modules/archiva-web/archiva-webapp-test-js/src/test/tomcat6x/conf/tomcat-users.xml +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version='1.0' encoding='utf-8'?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<tomcat-users>
-<!--
- NOTE: By default, no user is included in the "manager-gui" role required
- to operate the "/manager/html" web application. If you wish to use this app,
- you must define such a user - the username and password are arbitrary.
--->
-<!--
- NOTE: The sample user and role entries below are wrapped in a comment
- and thus are ignored when reading this file. Do not forget to remove
- <!.. ..> that surrounds them.
--->
-<!--
- <role rolename="tomcat"/>
- <role rolename="role1"/>
- <user username="tomcat" password="tomcat" roles="tomcat"/>
- <user username="both" password="tomcat" roles="tomcat,role1"/>
- <user username="role1" password="tomcat" roles="role1"/>
--->
-</tomcat-users>
|