maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r692753 - in /maven/shared/trunk/maven-filtering: pom.xml src/main/java/org/apache/maven/shared/filtering/DefaultMavenFileFilter.java
Date Sat, 06 Sep 2008 22:21:40 GMT
Author: olamy
Date: Sat Sep  6 15:21:39 2008
New Revision: 692753

URL: http://svn.apache.org/viewvc?rev=692753&view=rev
Log:
pattern reuse to prevent pattern recompilation

Modified:
    maven/shared/trunk/maven-filtering/pom.xml
    maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/DefaultMavenFileFilter.java

Modified: maven/shared/trunk/maven-filtering/pom.xml
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-filtering/pom.xml?rev=692753&r1=692752&r2=692753&view=diff
==============================================================================
--- maven/shared/trunk/maven-filtering/pom.xml (original)
+++ maven/shared/trunk/maven-filtering/pom.xml Sat Sep  6 15:21:39 2008
@@ -101,7 +101,7 @@
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-interpolation</artifactId>
-      <version>1.2</version>
+      <version>1.3</version>
     </dependency>
   </dependencies>
 </project>

Modified: maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/DefaultMavenFileFilter.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/DefaultMavenFileFilter.java?rev=692753&r1=692752&r2=692753&view=diff
==============================================================================
--- maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/DefaultMavenFileFilter.java
(original)
+++ maven/shared/trunk/maven-filtering/src/main/java/org/apache/maven/shared/filtering/DefaultMavenFileFilter.java
Sat Sep  6 15:21:39 2008
@@ -147,7 +147,7 @@
         {
             public Reader getReader( Reader reader )
             {
-                Interpolator propertiesInterpolator = new RegexBasedInterpolator();
+                Interpolator propertiesInterpolator = new RegexBasedInterpolator( true );
                 propertiesInterpolator.addValueSource( propertiesValueSource  );
                 return new InterpolatorFilterReader( reader, propertiesInterpolator );
             }
@@ -159,7 +159,8 @@
         {
             public Reader getReader( Reader reader )
             {
-                final Interpolator propertiesInterpolatorAtRegex = new RegexBasedInterpolator(
"\\@", "(.+?)\\@" );
+                final RegexBasedInterpolator propertiesInterpolatorAtRegex = new RegexBasedInterpolator(
"\\@", "(.+?)\\@" );
+                propertiesInterpolatorAtRegex.setReusePatterns( true );
                 propertiesInterpolatorAtRegex.addValueSource( propertiesValueSource );
                 return new InterpolatorFilterReader( reader, propertiesInterpolatorAtRegex,
"@", "@" );
             }
@@ -171,7 +172,7 @@
         {
             public Reader getReader( Reader reader )
             {
-                Interpolator mavenProjectInterpolator = new RegexBasedInterpolator();
+                Interpolator mavenProjectInterpolator = new RegexBasedInterpolator( true
);
 
                 ValueSource valueSource = new MavenProjectValueSource( mavenProject, escapedBackslashesInFilePath
);
                 mavenProjectInterpolator.addValueSource( valueSource );
@@ -185,8 +186,8 @@
         {
             public Reader getReader( Reader reader )
             {
-                Interpolator mavenProjectInterpolator = new RegexBasedInterpolator( "\\@",
"(.+?)\\@" );
-
+                RegexBasedInterpolator mavenProjectInterpolator = new RegexBasedInterpolator(
"\\@", "(.+?)\\@" );
+                mavenProjectInterpolator.setReusePatterns( true );
                 ValueSource valueSource = new MavenProjectValueSource( mavenProject, escapedBackslashesInFilePath
);
                 mavenProjectInterpolator.addValueSource( valueSource );
                 return new InterpolatorFilterReader( reader, mavenProjectInterpolator, "@",
"@" );



Mime
View raw message