You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by be...@apache.org on 2008/09/16 15:23:21 UTC

svn commit: r695867 - in /maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-18: ./ src/ src/main/ src/main/resources/ src/test/ src/test/java/ src/test/java/org/ src/test/java/org/apache/ src/test/java/org/apache/maven/ src/test/java/org/apa...

Author: bentmann
Date: Tue Sep 16 06:23:20 2008
New Revision: 695867

URL: http://svn.apache.org/viewvc?rev=695867&view=rev
Log:
o Migrated core IT 0105 over to the corresponding plugin project

Added:
    maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-18/
    maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-18/invoker.properties   (with props)
    maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-18/pom.xml   (with props)
    maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-18/src/
    maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-18/src/main/
    maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-18/src/main/resources/
    maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-18/src/main/resources/test.properties   (with props)
    maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-18/src/test/
    maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-18/src/test/java/
    maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-18/src/test/java/org/
    maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-18/src/test/java/org/apache/
    maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-18/src/test/java/org/apache/maven/
    maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-18/src/test/java/org/apache/maven/it0105/
    maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-18/src/test/java/org/apache/maven/it0105/FilterTest.java   (with props)
    maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-18/test.properties   (with props)

Added: maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-18/invoker.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-18/invoker.properties?rev=695867&view=auto
==============================================================================
--- maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-18/invoker.properties (added)
+++ maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-18/invoker.properties Tue Sep 16 06:23:20 2008
@@ -0,0 +1 @@
+invoker.goals = clean test

Propchange: maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-18/invoker.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-18/invoker.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-18/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-18/pom.xml?rev=695867&view=auto
==============================================================================
--- maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-18/pom.xml (added)
+++ maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-18/pom.xml Tue Sep 16 06:23:20 2008
@@ -0,0 +1,73 @@
+<?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.
+-->
+
+<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>org.apache.maven.its.it0105</groupId>
+  <artifactId>maven-it-it0105</artifactId>
+  <version>1.0</version>
+
+  <name>Maven Integration Test :: it0105</name> 
+  <description>MRESOURCES-18</description>
+ 
+  <properties>
+    <my.property>foo</my.property>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <type>jar</type>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+  
+  <build>
+    <resources>
+      <resource>
+        <directory>src/main/resources</directory>
+        <filtering>true</filtering>
+      </resource>
+    </resources>
+    <plugins>
+      <plugin>
+        <artifactId>maven-resources-plugin</artifactId>
+        <version>@project.version@</version>
+      </plugin>
+      <plugin>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <version>2.4.3</version>
+        <configuration>
+          <systemProperties>
+            <!-- pass this system property through to the tests -->
+            <property>
+              <name>cli.param</name>
+              <value>${cli.param}</value>
+            </property>
+          </systemProperties>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-18/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

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

Added: maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-18/src/main/resources/test.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-18/src/main/resources/test.properties?rev=695867&view=auto
==============================================================================
--- maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-18/src/main/resources/test.properties (added)
+++ maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-18/src/main/resources/test.properties Tue Sep 16 06:23:20 2008
@@ -0,0 +1,3 @@
+system.property=${java.version}
+cli.param=${cli.param}
+pom.property=${my.property}

Propchange: maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-18/src/main/resources/test.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-18/src/main/resources/test.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-18/src/test/java/org/apache/maven/it0105/FilterTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-18/src/test/java/org/apache/maven/it0105/FilterTest.java?rev=695867&view=auto
==============================================================================
--- maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-18/src/test/java/org/apache/maven/it0105/FilterTest.java (added)
+++ maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-18/src/test/java/org/apache/maven/it0105/FilterTest.java Tue Sep 16 06:23:20 2008
@@ -0,0 +1,49 @@
+package org.apache.maven.it0105;
+
+import junit.framework.TestCase;
+
+import java.util.Properties;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+
+public class FilterTest
+    extends TestCase
+{
+    private String basedir;
+
+    private Properties properties;
+
+    protected void setUp()
+        throws Exception
+    {
+        basedir = System.getProperty( "basedir" );
+
+        properties = new Properties();
+
+        File testPropertiesFile = new File( basedir, "target/classes/test.properties" );
+
+        assertTrue( testPropertiesFile.exists() );
+
+        properties.load( new FileInputStream( testPropertiesFile ) );
+    }
+    
+    public void testSystemPropertyInterpolation()
+        throws IOException
+    {
+        assertEquals( "System property", System.getProperty( "java.version" ), properties.getProperty( "system.property" ) );
+    }    
+
+    public void testCommandLineParameterInterpolation()
+        throws IOException
+    {
+        assertEquals( "CLI Parameter", "CLI", properties.getProperty( "cli.param" ) );
+    }    
+
+    public void testPomPropertyInterpolation()
+        throws IOException
+    {
+        assertEquals( "Pom Property", "foo", properties.getProperty( "pom.property" ) );
+    }    
+
+}

Propchange: maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-18/src/test/java/org/apache/maven/it0105/FilterTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-18/src/test/java/org/apache/maven/it0105/FilterTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-18/test.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-18/test.properties?rev=695867&view=auto
==============================================================================
--- maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-18/test.properties (added)
+++ maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-18/test.properties Tue Sep 16 06:23:20 2008
@@ -0,0 +1 @@
+cli.param = CLI

Propchange: maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-18/test.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-18/test.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision