You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ol...@apache.org on 2007/11/24 12:50:42 UTC
svn commit: r597842 - in /maven/plugins/trunk/maven-war-plugin: ./
src/it/MWAR-129/ src/it/MWAR-129/src/ src/it/MWAR-129/src/main/
src/it/MWAR-129/src/main/resources/ src/it/MWAR-129/src/main/webapp/
src/it/MWAR-129/src/main/webapp/WEB-INF/
Author: olamy
Date: Sat Nov 24 03:50:41 2007
New Revision: 597842
URL: http://svn.apache.org/viewvc?rev=597842&view=rev
Log:
Add an it for MWAR-129.
Currently it doesn't break because the war plugin version is forced to 2.0.2 in the it pom.
It just to have a working stuff.
Added:
maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/
maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/goals.txt (with props)
maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/pom.xml (with props)
maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/src/
maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/src/main/
maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/src/main/resources/
maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/src/main/webapp/
maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/src/main/webapp/WEB-INF/
maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/src/main/webapp/WEB-INF/web.xml (with props)
maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/src/main/webapp/index.jsp (with props)
maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/src/main/webapp/param.jsp (with props)
maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/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=597842&r1=597841&r2=597842&view=diff
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-war-plugin/pom.xml Sat Nov 24 03:50:41 2007
@@ -95,7 +95,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-invoker-plugin</artifactId>
- <version>1.0</version>
+ <version>1.1-SNAPSHOT</version>
<configuration>
<projectsDirectory>src/it</projectsDirectory>
<pomIncludes>
@@ -103,6 +103,10 @@
</pomIncludes>
<postBuildHookScript>verify.bsh</postBuildHookScript>
<localRepositoryPath>${basedir}/target/local-repo</localRepositoryPath>
+ <goals>
+ <goal>clean</goal>
+ <goal>${project.groupId}:${project.artifactId}:${project.version}:war</goal>
+ </goals>
</configuration>
<executions>
<execution>
@@ -116,6 +120,13 @@
</plugin>
</plugins>
</build>
+ <!-- TODO remove when invoker plugin is released -->
+ <pluginRepositories>
+ <pluginRepository>
+ <id>apache.snapshots</id>
+ <url>http://people.apache.org/repo/m2-snapshot-repository</url>
+ </pluginRepository>
+ </pluginRepositories>
</profile>
</profiles>
-</project>
\ No newline at end of file
+</project>
Added: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/goals.txt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/goals.txt?rev=597842&view=auto
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/goals.txt (added)
+++ maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/goals.txt Sat Nov 24 03:50:41 2007
@@ -0,0 +1 @@
+clean package
\ No newline at end of file
Propchange: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/goals.txt
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/goals.txt
------------------------------------------------------------------------------
svn:executable = *
Propchange: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/goals.txt
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/pom.xml?rev=597842&view=auto
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/pom.xml (added)
+++ maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/pom.xml Sat Nov 24 03:50:41 2007
@@ -0,0 +1,101 @@
+<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>testwar</groupId>
+ <artifactId>mwar_129</artifactId>
+ <packaging>war</packaging>
+ <version>1.0-SNAPSHOT</version>
+ <name>mwar_129 Maven Webapp</name>
+ <url>http://maven.apache.org</url>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <defaultGoal>package</defaultGoal>
+ <resources>
+ <resource>
+ <filtering>true</filtering>
+ <directory>src/main/resources</directory>
+ </resource>
+ <resource>
+ <directory>src/main/java</directory>
+ <includes>
+ <include>**/*.xml</include>
+ </includes>
+ </resource>
+ </resources>
+ <testResources>
+ <testResource>
+ <directory>src/test/resources</directory>
+ </testResource>
+ <testResource>
+ <directory>src/main/webapp</directory>
+ <includes>
+ <include>**/*.xml</include>
+ </includes>
+ </testResource>
+ <testResource>
+ <directory>src/test/webapp</directory>
+ <includes>
+ <include>**/*.xml</include>
+ </includes>
+ </testResource>
+ </testResources>
+ <finalName>${artifactId}</finalName>
+ <plugins>
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>2.0.2</version>
+ <configuration>
+ <warSourceDirectory>src/main/webapp</warSourceDirectory>
+ <webResources>
+ <resource>
+ <filtering>true</filtering>
+ <directory>src/main/webapp</directory>
+ <targetPath>.</targetPath>
+ <includes>
+ <include>param.jsp</include>
+ </includes>
+ </resource>
+ </webResources>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <profiles>
+ <profile>
+ <id>profile1</id>
+ <activation>
+ <property>
+ <name>profile1</name>
+ </property>
+ </activation>
+ <build>
+ <finalName>profile1</finalName>
+ </build>
+ <properties>
+ <app.mainStyleSheet>profile1.css</app.mainStyleSheet>
+ </properties>
+ </profile>
+ <profile>
+ <id>profile2</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ <property>
+ <name>profile2</name>
+ </property>
+ </activation>
+ <build>
+ <finalName>profile2</finalName>
+ </build>
+ <properties>
+ <app.mainStyleSheet>profile2.css</app.mainStyleSheet>
+ </properties>
+ </profile>
+ </profiles>
+</project>
Propchange: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/pom.xml
------------------------------------------------------------------------------
svn:eol-style = LF
Propchange: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/pom.xml
------------------------------------------------------------------------------
svn:executable = *
Propchange: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/pom.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/src/main/webapp/WEB-INF/web.xml?rev=597842&view=auto
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/src/main/webapp/WEB-INF/web.xml (added)
+++ maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/src/main/webapp/WEB-INF/web.xml Sat Nov 24 03:50:41 2007
@@ -0,0 +1,7 @@
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd" >
+
+<web-app>
+ <display-name>Archetype Created Web Application</display-name>
+</web-app>
Propchange: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:eol-style = LF
Propchange: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:executable = *
Propchange: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/src/main/webapp/index.jsp
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/src/main/webapp/index.jsp?rev=597842&view=auto
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/src/main/webapp/index.jsp (added)
+++ maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/src/main/webapp/index.jsp Sat Nov 24 03:50:41 2007
@@ -0,0 +1,5 @@
+<html>
+<body>
+<h2>Hello World!</h2>
+</body>
+</html>
Propchange: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/src/main/webapp/index.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/src/main/webapp/index.jsp
------------------------------------------------------------------------------
svn:executable = *
Propchange: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/src/main/webapp/index.jsp
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/src/main/webapp/param.jsp
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/src/main/webapp/param.jsp?rev=597842&view=auto
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/src/main/webapp/param.jsp (added)
+++ maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/src/main/webapp/param.jsp Sat Nov 24 03:50:41 2007
@@ -0,0 +1,9 @@
+<c:set var="app_version" value="${pom.version}"/>
+<c:set var="app_mainStyleSheet" value="${app.mainStyleSheet}"/>
+
+<c:if test="${app_version}">
+ <c:set var="app_version" value="X.X.X.X"/>
+</c:if>
+<c:if test="${app_mainStyleSheet}">
+ <c:set var="app_mainStyleSheet" value="app_global.css"/>
+</c:if>
\ No newline at end of file
Propchange: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/src/main/webapp/param.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/src/main/webapp/param.jsp
------------------------------------------------------------------------------
svn:executable = *
Propchange: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/src/main/webapp/param.jsp
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/verify.bsh?rev=597842&view=auto
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/verify.bsh (added)
+++ maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/verify.bsh Sat Nov 24 03:50:41 2007
@@ -0,0 +1,67 @@
+
+/*
+ * 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.*;
+import org.codehaus.plexus.util.*;
+
+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, "profile2" );
+ if ( !webappDirectory.exists() || !webappDirectory.isDirectory() )
+ {
+ System.err.println( "webappDirectory is missing or not a directory." );
+ return false;
+ }
+
+ File param = new File ( webappDirectory, "param.jsp" );
+ if ( !param.exists() || param.isDirectory() )
+ {
+ System.err.println( "param.jsp file is missing or a directory." );
+ return false;
+ }
+
+ FileInputStream fis = new FileInputStream ( param );
+ String paramContent = IOUtil.toString ( fis );
+
+
+ int indexOf = paramContent.indexOf( "<c:set var=\"app_version\" value=\"1.0-SNAPSHOT\"/>" );
+ if ( indexOf < 0)
+ {
+ System.err.println( "param.jsp not contains <c:set var=\"app_version\" value="1.0-SNAPSHOT\"/>" );
+ return false;
+ }
+
+}
+catch( Exception e )
+{
+ e.printStackTrace();
+ result = false;
+}
+
+return result;
Propchange: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-129/verify.bsh
------------------------------------------------------------------------------
svn:executable = *