Author: olamy
Date: Wed Dec 22 18:47:36 2010
New Revision: 1052028
URL: http://svn.apache.org/viewvc?rev=1052028&view=rev
Log:
[MRESOURCES-104] while filtering resources the token replacement stops at the
character @
upgrade to last maven-filtering version
Added:
maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-104/
maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-104/pom.xml
(with props)
maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-104/src/
maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-104/src/main/
maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-104/src/main/resources/
maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-104/src/main/resources/test.properties
(with props)
maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-104/verify.groovy
(with props)
Modified:
maven/plugins/trunk/maven-resources-plugin/pom.xml
maven/plugins/trunk/maven-resources-plugin/src/main/java/org/apache/maven/plugin/resources/ResourcesMojo.java
Modified: maven/plugins/trunk/maven-resources-plugin/pom.xml
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-resources-plugin/pom.xml?rev=1052028&r1=1052027&r2=1052028&view=diff
==============================================================================
--- maven/plugins/trunk/maven-resources-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-resources-plugin/pom.xml Wed Dec 22 18:47:36 2010
@@ -114,7 +114,7 @@ under the License.
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-filtering</artifactId>
- <version>1.0-beta-4</version>
+ <version>1.0-beta-5-SNAPSHOT</version>
</dependency>
<dependency>
Added: maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-104/pom.xml
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-104/pom.xml?rev=1052028&view=auto
==============================================================================
--- maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-104/pom.xml
(added)
+++ maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-104/pom.xml
Wed Dec 22 18:47:36 2010
@@ -0,0 +1,42 @@
+<?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.maven-resources-plugin.its</groupId>
+ <artifactId>MRESOURCES-104</artifactId>
+ <name>Bug Test</name>
+ <version>0.0.1-SNAPSHOT</version>
+ <build>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>@project.version@</version>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Propchange:
maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-104/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-104/pom.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added:
maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-104/src/main/resources/test.properties
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-104/src/main/resources/test.properties?rev=1052028&view=auto
==============================================================================
---
maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-104/src/main/resources/test.properties
(added)
+++
maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-104/src/main/resources/test.properties
Wed Dec 22 18:47:36 2010
@@ -0,0 +1,3 @@
[email protected]
+foo=${project.version}
[email protected]@
Propchange:
maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-104/src/main/resources/test.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-104/src/main/resources/test.properties
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added:
maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-104/verify.groovy
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-104/verify.groovy?rev=1052028&view=auto
==============================================================================
---
maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-104/verify.groovy
(added)
+++
maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-104/verify.groovy
Wed Dec 22 18:47:36 2010
@@ -0,0 +1,25 @@
+/*
+ * 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.
+ */
+assert new File(basedir, 'target/classes/test.properties').exists();
+
+content = new File(basedir, 'target/classes/test.properties').text;
+assert content.contains( '[email protected]');
+assert content.contains( 'foo=0.0.1-SNAPSHOT');
+assert content.contains( 'bar=0.0.1-SNAPSHOT');
+return true;
\ No newline at end of file
Propchange:
maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-104/verify.groovy
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
maven/plugins/trunk/maven-resources-plugin/src/it/MRESOURCES-104/verify.groovy
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Modified:
maven/plugins/trunk/maven-resources-plugin/src/main/java/org/apache/maven/plugin/resources/ResourcesMojo.java
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-resources-plugin/src/main/java/org/apache/maven/plugin/resources/ResourcesMojo.java?rev=1052028&r1=1052027&r2=1052028&view=diff
==============================================================================
---
maven/plugins/trunk/maven-resources-plugin/src/main/java/org/apache/maven/plugin/resources/ResourcesMojo.java
(original)
+++
maven/plugins/trunk/maven-resources-plugin/src/main/java/org/apache/maven/plugin/resources/ResourcesMojo.java
Wed Dec 22 18:47:36 2010
@@ -228,6 +228,13 @@ public class ResourcesMojo
*/
private List mavenFilteringComponents = new ArrayList();
+ /**
+ * stop searching endToken at the end of line
+ * @parameter expression="${maven.resources.supportMultiLineFiltering}"
default-value="false"
+ * @since 2.5
+ */
+ private boolean supportMultiLineFiltering;
+
public void contextualize( Context context )
throws ContextException
{
@@ -265,6 +272,9 @@ public class ResourcesMojo
mavenResourcesExecution.setEscapeString( escapeString );
mavenResourcesExecution.setOverwrite( overwrite );
mavenResourcesExecution.setIncludeEmptyDirs( includeEmptyDirs );
+ mavenResourcesExecution.setSupportMultiLineFiltering(
supportMultiLineFiltering );
+
+
// if these are NOT set, just use the defaults, which are '${*}'
and '@'.
if ( delimiters != null && !delimiters.isEmpty() )