Author: olamy
Date: Thu Oct  2 13:57:07 2008
New Revision: 701242

URL: http://svn.apache.org/viewvc?rev=701242&view=rev
Log:
[MWAR-171] External Web Resources are not properly filtered
added an it to test if fix with last maven-filtering version


Added:
    maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/
    maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/parent/
    
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/parent/pom.xml
   (with props)
    maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/pom.xml 
  (with props)
    
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/verify.bsh  
 (with props)
    maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/web/
    
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/web/pom.xml 
  (with props)
    maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/web/src/
    
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/web/src/main/
    
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/web/src/main/resources/
    
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/web/src/main/webapp/
    
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/web/src/main/webapp/WEB-INF/
    
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/web/src/main/webapp/WEB-INF/web.xml
   (with props)
    
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/web/src/main/webapp/index.jsp
   (with props)
    
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/web/src/main/webresources/
    
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/web/src/main/webresources/WEB-INF/
    
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/web/src/main/webresources/WEB-INF/jetty-env.xml
   (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=701242&r1=701241&r2=701242&view=diff
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-war-plugin/pom.xml Thu Oct  2 13:57:07 2008
@@ -136,7 +136,7 @@
           <plugin>
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-invoker-plugin</artifactId>
-            <version>1.2.1</version>
+            <version>1.3</version>
             <configuration>
               <projectsDirectory>src/it</projectsDirectory>
               <pomIncludes>

Added: 
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/parent/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/parent/pom.xml?rev=701242&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/parent/pom.xml
 (added)
+++ 
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/parent/pom.xml
 Thu Oct  2 13:57:07 2008
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>
+
+  <name>Company Parent</name>
+  <description>Parent that handles dependencyManagement</description>
+
+  <groupId>com.edb.finance.example</groupId>
+  <artifactId>example-parent</artifactId> 
+  <version>1.0.0-SNAPSHOT</version>
+  <packaging>pom</packaging>
+  <inceptionYear>2008</inceptionYear>
+
+  <developers>
+    <developer>
+      <id>1</id>
+      <name>Valeriy Molyakov</name>
+      <email>[EMAIL PROTECTED]</email>
+      <organization>EDB Business Partner</organization>
+      <organizationUrl>http://www.edb.com</organizationUrl>
+      <roles>
+        <role>developer</role>
+      </roles>
+      <timezone>+2</timezone>
+    </developer>
+  </developers>
+
+  <distributionManagement>
+    <site>
+      <id>sample.website</id>
+      <url>${website.url}/${project.name}</url>
+    </site>
+  </distributionManagement>
+
+
+  <properties>
+    <jdbc.url>jdbc:oracle:thin:@localhost:1521:orcl</jdbc.url>
+    <website.url>scp://www.yourcompany.com/www/docs/project</website.url>
+  </properties>
+
+</project>

Propchange: 
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/parent/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/parent/pom.xml
------------------------------------------------------------------------------
    svn:executable = *

Propchange: 
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/parent/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/pom.xml?rev=701242&view=auto
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/pom.xml 
(added)
+++ maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/pom.xml 
Thu Oct  2 13:57:07 2008
@@ -0,0 +1,25 @@
+<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>
+
+  <parent>
+    <groupId>com.edb.finance.example</groupId>
+    <artifactId>example-parent</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <relativePath>parent/pom.xml</relativePath>
+  </parent>
+
+
+  <artifactId>example</artifactId>
+  <packaging>pom</packaging>
+  
+  <name>Example Maven Multi-module project</name>
+  <url>http://maven.apache.org</url>
+
+  <modules>
+    <module>parent</module>
+    <module>web</module>
+  </modules>
+
+
+</project>

Propchange: 
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/pom.xml
------------------------------------------------------------------------------
    svn:executable = *

Propchange: 
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/verify.bsh
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/verify.bsh?rev=701242&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/verify.bsh 
(added)
+++ 
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/verify.bsh 
Thu Oct  2 13:57:07 2008
@@ -0,0 +1,62 @@
+
+/*
+ * 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, "web/target/example-web/WEB-INF" );
+    if ( !target.exists() || !target.isDirectory() )
+    {
+        System.err.println( "web/target/example-web/WEB-INF file is missing or 
a directory." );
+        return false;
+    }
+    
+    File jettyEnv = new File( target, "jetty-env.xml" );
+    if ( !jettyEnv.exists() || jettyEnv.isDirectory() )
+    {
+        System.err.println( "jetty-env.xml is missing or a directory." );
+        return false;
+    }    
+    
+        
+    FileInputStream fis = new FileInputStream ( jettyEnv );
+    String paramContent = IOUtil.toString ( fis );
+    
+    
+    int indexOf = paramContent.indexOf( "<Set 
name=\"URL\">jdbc:oracle:thin:@localhost:1521:orcl</Set>" );
+    if ( indexOf < 0)
+    {
+      System.err.println( "jdbc.url not filtered correctly" );
+      return false;
+    }    
+   
+}
+catch( IOException e )
+{
+    e.printStackTrace();
+    result = false;
+}
+
+return result;

Propchange: 
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/verify.bsh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/verify.bsh
------------------------------------------------------------------------------
    svn:executable = *

Propchange: 
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/verify.bsh
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/web/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/web/pom.xml?rev=701242&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/web/pom.xml 
(added)
+++ 
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/web/pom.xml 
Thu Oct  2 13:57:07 2008
@@ -0,0 +1,46 @@
+<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>
+
+  <parent>
+    <groupId>com.edb.finance.example</groupId>
+    <artifactId>example-parent</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <relativePath>../parent/pom.xml</relativePath>
+  </parent>
+
+
+  <artifactId>example-web</artifactId>
+  <packaging>war</packaging>
+  
+  <name>example-web 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>
+    <finalName>example-web</finalName>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-war-plugin</artifactId>
+        <version>@pom.version@</version>
+        <configuration>
+          <webResources>
+            <resource>
+              <directory>${basedir}/src/main/webresources</directory>
+              <filtering>true</filtering>
+            </resource>
+          </webResources>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: 
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/web/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/web/pom.xml
------------------------------------------------------------------------------
    svn:executable = *

Propchange: 
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/web/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/web/src/main/webapp/WEB-INF/web.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/web/src/main/webapp/WEB-INF/web.xml?rev=701242&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/web/src/main/webapp/WEB-INF/web.xml
 (added)
+++ 
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/web/src/main/webapp/WEB-INF/web.xml
 Thu Oct  2 13:57:07 2008
@@ -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/web-resources-filtering/web/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/web/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:executable = *

Propchange: 
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/web/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/web/src/main/webapp/index.jsp
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/web/src/main/webapp/index.jsp?rev=701242&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/web/src/main/webapp/index.jsp
 (added)
+++ 
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/web/src/main/webapp/index.jsp
 Thu Oct  2 13:57:07 2008
@@ -0,0 +1,5 @@
+<html>
+<body>
+<h2>Hello World!</h2>
+</body>
+</html>

Propchange: 
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/web/src/main/webapp/index.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/web/src/main/webapp/index.jsp
------------------------------------------------------------------------------
    svn:executable = *

Propchange: 
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/web/src/main/webapp/index.jsp
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: 
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/web/src/main/webresources/WEB-INF/jetty-env.xml
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/web/src/main/webresources/WEB-INF/jetty-env.xml?rev=701242&view=auto
==============================================================================
--- 
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/web/src/main/webresources/WEB-INF/jetty-env.xml
 (added)
+++ 
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/web/src/main/webresources/WEB-INF/jetty-env.xml
 Thu Oct  2 13:57:07 2008
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN"
+        "http://jetty.mortbay.org/configure.dtd";>
+<Configure class="org.mortbay.jetty.webapp.WebAppContext">
+    <New id="MyDS" class="org.mortbay.jetty.plus.naming.Resource">
+        <Arg>jdbc/EventdialogDS</Arg>
+        <Arg>
+            <New class="oracle.jdbc.pool.OracleConnectionPoolDataSource">
+                <Set name="URL">${jdbc.url}</Set>
+                <Set name="user">${jdbc.user}</Set>
+                <Set name="password">${jdbc.password}</Set>
+            </New>
+        </Arg>
+    </New>
+</Configure>
\ No newline at end of file

Propchange: 
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/web/src/main/webresources/WEB-INF/jetty-env.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/web/src/main/webresources/WEB-INF/jetty-env.xml
------------------------------------------------------------------------------
    svn:executable = *

Propchange: 
maven/plugins/trunk/maven-war-plugin/src/it/web-resources-filtering/web/src/main/webresources/WEB-INF/jetty-env.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision


Reply via email to