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 2008/09/06 23:44:00 UTC
svn commit: r692744 - in /maven/plugins/trunk/maven-resources-plugin: ./
src/it/MRESOURCES-20/ src/it/MRESOURCES-20/src/
src/it/MRESOURCES-20/src/main/ src/it/MRESOURCES-20/src/main/resources/
Author: olamy
Date: Sat Sep 6 14:43:59 2008
New Revision: 692744
URL: http://svn.apache.org/viewvc?rev=692744&view=rev
Log:
[MRESOURCES-20] Filtering ${foo.file} evaluates to in full path to pom.xml
Added:
maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-20/
maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-20/pom.xml (with props)
maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-20/src/
maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-20/src/main/
maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-20/src/main/resources/
maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-20/src/main/resources/resource.txt (with props)
maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-20/verify.bsh (with props)
Modified:
maven/plugins/trunk/maven-resources-plugin/pom.xml
Modified: maven/plugins/trunk/maven-resources-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-resources-plugin/pom.xml?rev=692744&r1=692743&r2=692744&view=diff
==============================================================================
--- maven/plugins/trunk/maven-resources-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-resources-plugin/pom.xml Sat Sep 6 14:43:59 2008
@@ -76,7 +76,7 @@
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-filtering</artifactId>
- <version>1.0-beta-1</version>
+ <version>1.0-beta-2-SNAPSHOT</version>
</dependency>
<dependency>
Added: maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-20/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-20/pom.xml?rev=692744&view=auto
==============================================================================
--- maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-20/pom.xml (added)
+++ maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-20/pom.xml Sat Sep 6 14:43:59 2008
@@ -0,0 +1,45 @@
+<?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.plugins</groupId>
+ <artifactId>maven-resources-plugin-it-filter</artifactId>
+ <packaging>jar</packaging>
+ <version>1.0-SNAPSHOT</version>
+
+ <build>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>@pom.version@</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+</project>
Propchange: maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-20/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-20/pom.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-20/src/main/resources/resource.txt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-20/src/main/resources/resource.txt?rev=692744&view=auto
==============================================================================
--- maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-20/src/main/resources/resource.txt (added)
+++ maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-20/src/main/resources/resource.txt Sat Sep 6 14:43:59 2008
@@ -0,0 +1 @@
+fileValue=${foo.file}
\ No newline at end of file
Propchange: maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-20/src/main/resources/resource.txt
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-20/src/main/resources/resource.txt
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-20/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-20/verify.bsh?rev=692744&view=auto
==============================================================================
--- maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-20/verify.bsh (added)
+++ maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-20/verify.bsh Sat Sep 6 14:43:59 2008
@@ -0,0 +1,61 @@
+
+/*
+ * 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 someResource = new File( target, "/classes/resource.txt" );
+ if ( !someResource.exists() || someResource.isDirectory() )
+ {
+ System.err.println( "SomeResource.txt is missing or not a file." );
+ return false;
+ }
+
+ FileInputStream fis = new FileInputStream ( someResource );
+ String paramContent = IOUtil.toString ( fis );
+
+ int indexOf = paramContent.indexOf( "fileValue=${foo.file}" );
+ if ( indexOf < 0)
+ {
+ System.err.println( "SomeResource.txt not contains fileValue=${foo.file}" );
+ return false;
+ }
+
+
+}
+catch( IOException e )
+{
+ e.printStackTrace();
+ result = false;
+}
+
+return result;
Propchange: maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-20/verify.bsh
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-20/verify.bsh
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision