Author: olamy
Date: Tue Oct 16 16:04:36 2007
New Revision: 585283
URL: http://svn.apache.org/viewvc?rev=585283&view=rev
Log:
add it test (just work start more have to be added later)
Added:
maven/plugins/trunk/maven-war-plugin/src/it/
maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/
maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/goals.txt
(with props)
maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/pom.xml
(with props)
maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/src/
maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/src/main/
maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/src/main/webapp/
maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/src/main/webapp/WEB-INF/
maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/src/main/webapp/WEB-INF/web.xml
(with props)
maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/src/main/webapp/index.jsp
(with props)
maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/verify.bsh
(with props)
Modified:
maven/plugins/trunk/maven-war-plugin/pom.xml
Modified: maven/plugins/trunk/maven-war-plugin/pom.xml
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/pom.xml?rev=585283&r1=585282&r2=585283&view=diff
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-war-plugin/pom.xml Tue Oct 16 16:04:36 2007
@@ -76,6 +76,68 @@
<scope>test</scope>
</dependency>
</dependencies>
+ <profiles>
+ <profile>
+ <id>integration-tests</id>
+ <activation>
+ <property>
+ <name>maven.test.skip</name>
+ <value>!true</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>2.2</version>
+ <executions>
+ <execution>
+ <id>integration-test</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>install-file</goal>
+ </goals>
+ <configuration>
+
<file>${project.build.directory}/${project.build.finalName}.jar</file>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>${project.artifactId}</artifactId>
+ <version>${project.version}</version>
+ <packaging>${project.packaging}</packaging>
+ <pomFile>${basedir}/pom.xml</pomFile>
+ <createChecksum>true</createChecksum>
+
<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
+ <localRepositoryId>it-local-repo</localRepositoryId>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-invoker-plugin</artifactId>
+ <version>1.0</version>
+ <configuration>
+ <projectsDirectory>src/it</projectsDirectory>
+ <pomIncludes>
+ <pomInclude>**/**/pom.xml</pomInclude>
+ </pomIncludes>
+ <postBuildHookScript>verify.bsh</postBuildHookScript>
+
<localRepositoryPath>${basedir}/target/local-repo</localRepositoryPath>
+ </configuration>
+ <executions>
+ <execution>
+ <id>integration-test</id>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
<!-- TODO: remove when plexus-utils is released -->
<!--repositories>
<repository>
Added: maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/goals.txt
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/goals.txt?rev=585283&view=auto
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/goals.txt
(added)
+++ maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/goals.txt
Tue Oct 16 16:04:36 2007
@@ -0,0 +1 @@
+clean package
\ No newline at end of file
Propchange:
maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/goals.txt
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/goals.txt
------------------------------------------------------------------------------
svn:executable = *
Propchange:
maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/goals.txt
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/pom.xml
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/pom.xml?rev=585283&view=auto
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/pom.xml
(added)
+++ maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/pom.xml Tue
Oct 16 16:04:36 2007
@@ -0,0 +1,46 @@
+<!--
+ 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.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>test</groupId>
+ <artifactId>simple-war-project</artifactId>
+ <packaging>war</packaging>
+ <version>1.0-SNAPSHOT</version>
+ <name>Maven Simple War Project Test</name>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>1.4.6</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Propchange:
maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/pom.xml
------------------------------------------------------------------------------
svn:eol-style = LF
Propchange:
maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/pom.xml
------------------------------------------------------------------------------
svn:executable = *
Propchange:
maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/pom.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added:
maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/src/main/webapp/WEB-INF/web.xml
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/src/main/webapp/WEB-INF/web.xml?rev=585283&view=auto
==============================================================================
---
maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/src/main/webapp/WEB-INF/web.xml
(added)
+++
maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/src/main/webapp/WEB-INF/web.xml
Tue Oct 16 16:04:36 2007
@@ -0,0 +1,29 @@
+<?xml version="1.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.
+ -->
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee" version="2.4"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+ <display-name>Maven Simple War Project Test</display-name>
+
+</web-app>
+
Propchange:
maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:eol-style = LF
Propchange:
maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:executable = *
Propchange:
maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added:
maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/src/main/webapp/index.jsp
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/src/main/webapp/index.jsp?rev=585283&view=auto
==============================================================================
---
maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/src/main/webapp/index.jsp
(added)
+++
maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/src/main/webapp/index.jsp
Tue Oct 16 16:04:36 2007
@@ -0,0 +1,20 @@
+<%--
+ ~ 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.
+ --%>
+
+<% response.sendRedirect( request.getContextPath() + "/groupSummary.action"
); %>
Propchange:
maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/src/main/webapp/index.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/src/main/webapp/index.jsp
------------------------------------------------------------------------------
svn:executable = *
Propchange:
maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/src/main/webapp/index.jsp
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/verify.bsh
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/verify.bsh?rev=585283&view=auto
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/verify.bsh
(added)
+++ maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/verify.bsh
Tue Oct 16 16:04:36 2007
@@ -0,0 +1,82 @@
+
+/*
+ * 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.
+ */
+
+import java.io.*;
+
+boolean result = true;
+
+try
+{
+ File target = new File( basedir, "target" );
+ if ( !target.exists() || !target.isDirectory() )
+ {
+ System.err.println( "target file is missing or a directory." );
+ return false;
+ }
+
+ File webappDirectory = new File( target, "simple-war-project-1.0-SNAPSHOT"
);
+ if ( !webappDirectory.exists() || !webappDirectory.isDirectory() )
+ {
+ System.err.println( "webappDirectory is missing or not a directory." );
+ return false;
+ }
+
+ File webInfFile = new File( webappDirectory, "WEB-INF/web.xml" );
+ if ( !webInfFile.exists() || webInfFile.isDirectory() )
+ {
+ System.err.println( "webInfFile is missing or a directory." );
+ return false;
+ }
+
+ File indexJsp = new File( webappDirectory, "index.jsp" );
+ if ( !indexJsp.exists() || indexJsp.isDirectory() )
+ {
+ System.err.println( "indexJsp is missing or a directory." );
+ return false;
+ }
+
+ File warFile = new File (target, "simple-war-project-1.0-SNAPSHOT.war" );
+ if ( !warFile.exists() || warFile.isDirectory() )
+ {
+ System.err.println( "warFile is missing or a directory." );
+ return false;
+ }
+
+ File libDir = new File ( webappDirectory, "WEB-INF/lib" );
+ if ( !libDir.exists() || !libDir.isDirectory() )
+ {
+ System.err.println( "WEB-INF/lib is missing or not a directory." );
+ return false;
+ }
+
+ File plexusUtilsDependency = new File ( libDir, "plexus-utils-1.4.6.jar" );
+ if ( !plexusUtilsDependency.exists() ||
plexusUtilsDependency.isDirectory() )
+ {
+ System.err.println( "plexus-utils-1.4.6.jar is missing or a
directory." );
+ return false;
+ }
+}
+catch( IOException e )
+{
+ e.printStackTrace();
+ result = false;
+}
+
+return result;
Propchange:
maven/plugins/trunk/maven-war-plugin/src/it/simple-war-project/verify.bsh
------------------------------------------------------------------------------
svn:executable = *