]> source.dussan.org Git - archiva.git/commitdiff
use tomcat maven plugin rather than cargo in webapp-test-js faster than running an...
authorOlivier Lamy <olamy@apache.org>
Mon, 9 Jan 2012 21:46:39 +0000 (21:46 +0000)
committerOlivier Lamy <olamy@apache.org>
Mon, 9 Jan 2012 21:46:39 +0000 (21:46 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1229370 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp-test-js/pom.xml
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/tomcat6x/conf/Catalina/localhost/host-manager.xml [deleted file]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/tomcat6x/conf/Catalina/localhost/manager.xml [deleted file]
archiva-modules/archiva-web/archiva-webapp-test-js/src/test/tomcat6x/conf/tomcat-users.xml [deleted file]

index 3fbf0ace54f21b08c6d34b01bfa07ec337c40254..717f7979f517ac235a38381e0225a73076291a1b 100644 (file)
             <executions>
               <execution>
                 <id>unzip-archiva-webapp</id>
-                <phase>generate-resources</phase>
+                <phase>compile</phase>
                 <goals>
                   <goal>unpack</goal>
                 </goals>
                       <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>
                     <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>
               </execution>
             </executions>
           </plugin>
+          <!--
           <plugin>
             <groupId>org.codehaus.cargo</groupId>
             <artifactId>cargo-maven2-plugin</artifactId>
               </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 (file)
index 1e31ca5..0000000
+++ /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 (file)
index 7229a88..0000000
+++ /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 (file)
index 34e268d..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>\r
-<!--\r
-  Licensed to the Apache Software Foundation (ASF) under one or more\r
-  contributor license agreements.  See the NOTICE file distributed with\r
-  this work for additional information regarding copyright ownership.\r
-  The ASF licenses this file to You under the Apache License, Version 2.0\r
-  (the "License"); you may not use this file except in compliance with\r
-  the License.  You may obtain a copy of the License at\r
-\r
-      http://www.apache.org/licenses/LICENSE-2.0\r
-\r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
--->\r
-<tomcat-users>\r
-<!--\r
-  NOTE:  By default, no user is included in the "manager-gui" role required\r
-  to operate the "/manager/html" web application.  If you wish to use this app,\r
-  you must define such a user - the username and password are arbitrary.\r
--->\r
-<!--\r
-  NOTE:  The sample user and role entries below are wrapped in a comment\r
-  and thus are ignored when reading this file. Do not forget to remove\r
-  <!.. ..> that surrounds them.\r
--->\r
-<!--\r
-  <role rolename="tomcat"/>\r
-  <role rolename="role1"/>\r
-  <user username="tomcat" password="tomcat" roles="tomcat"/>\r
-  <user username="both" password="tomcat" roles="tomcat,role1"/>\r
-  <user username="role1" password="tomcat" roles="role1"/>\r
--->\r
-</tomcat-users>\r