Author: olamy
Date: Mon Jan 28 15:21:03 2008
New Revision: 616103
URL: http://svn.apache.org/viewvc?rev=616103&view=rev
Log:
add a plexus component which aplly filtering on List of
org.apache.maven.model.Resource
Added:
maven/sandbox/trunk/shared/maven-filtering/src/main/java/org/apache/maven/shared/filtering/DefaultMavenResourcesFiltering.java
(with props)
maven/sandbox/trunk/shared/maven-filtering/src/main/java/org/apache/maven/shared/filtering/MavenResourcesFiltering.java
(with props)
maven/sandbox/trunk/shared/maven-filtering/src/test/java/org/apache/maven/shared/filtering/DefaultMavenResourcesFilteringTest.java
(with props)
maven/sandbox/trunk/shared/maven-filtering/src/test/java/org/apache/maven/shared/filtering/StubMavenProject.java
(with props)
maven/sandbox/trunk/shared/maven-filtering/src/test/units-files/maven-resources-filtering/
maven/sandbox/trunk/shared/maven-filtering/src/test/units-files/maven-resources-filtering/empty-maven-resources-filtering.txt
(with props)
maven/sandbox/trunk/shared/maven-filtering/src/test/units-files/maven-resources-filtering/maven-resources-filtering.txt
(with props)
Modified:
maven/sandbox/trunk/shared/maven-filtering/src/main/java/org/apache/maven/shared/filtering/DefaultMavenFileFilter.java
maven/sandbox/trunk/shared/maven-filtering/src/main/java/org/apache/maven/shared/filtering/MavenFileFilter.java
maven/sandbox/trunk/shared/maven-filtering/src/main/java/org/apache/maven/shared/filtering/PropertyUtils.java
Modified:
maven/sandbox/trunk/shared/maven-filtering/src/main/java/org/apache/maven/shared/filtering/DefaultMavenFileFilter.java
URL:
http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-filtering/src/main/java/org/apache/maven/shared/filtering/DefaultMavenFileFilter.java?rev=616103&r1=616102&r2=616103&view=diff
==============================================================================
---
maven/sandbox/trunk/shared/maven-filtering/src/main/java/org/apache/maven/shared/filtering/DefaultMavenFileFilter.java
(original)
+++
maven/sandbox/trunk/shared/maven-filtering/src/main/java/org/apache/maven/shared/filtering/DefaultMavenFileFilter.java
Mon Jan 28 15:21:03 2008
@@ -22,6 +22,7 @@
import java.io.IOException;
import java.io.Reader;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Properties;
@@ -35,7 +36,8 @@
* @since 22 janv. 08
* @version $Id$
*
- * @plexus.component role="org.apache.maven.shared.filtering.MavenFileFilter"
role-hint="default"
+ * @plexus.component role="org.apache.maven.shared.filtering.MavenFileFilter"
+ * role-hint="default"
*/
public class DefaultMavenFileFilter
implements MavenFileFilter
@@ -82,17 +84,18 @@
/**
* @see
org.apache.maven.shared.filtering.MavenFileFilter#getDefaultFilterWrappers(org.apache.maven.project.MavenProject,
java.util.List)
*/
- public List getDefaultFilterWrappers( final MavenProject mavenProject,
List filters, final boolean escapedBackslashesInFilePath )
+ public List getDefaultFilterWrappers( final MavenProject mavenProject,
List filters,
+ final boolean
escapedBackslashesInFilePath )
throws MavenFilteringException
{
-
+
final Properties filterProperties = new Properties();
// System properties
filterProperties.putAll( System.getProperties() );
// Project properties
- filterProperties.putAll( mavenProject.getProperties() );
+ filterProperties.putAll( mavenProject.getProperties() == null ?
Collections.EMPTY_MAP : mavenProject.getProperties() );
// Take a copy of filterProperties to ensure that evaluated
filterTokens are not propagated
// to subsequent filter files. NB this replicates current behaviour
and seems to make sense.
@@ -116,21 +119,25 @@
}
}
}
-
- List defaultFilterWrappers = new ArrayList(3);
-
+
+ List defaultFilterWrappers = new ArrayList( 3 );
+
// support ${token}
- FileUtils.FilterWrapper one = new FileUtils.FilterWrapper() {
- public Reader getReader(Reader reader) {
- return new InterpolationFilterReader(reader, filterProperties,
"${", "}");
+ FileUtils.FilterWrapper one = new FileUtils.FilterWrapper()
+ {
+ public Reader getReader( Reader reader )
+ {
+ return new InterpolationFilterReader( reader,
filterProperties, "${", "}" );
}
};
defaultFilterWrappers.add( one );
-
+
// support @token@
- FileUtils.FilterWrapper second = new FileUtils.FilterWrapper() {
- public Reader getReader(Reader reader) {
- return new InterpolationFilterReader(reader, filterProperties,
"@", "@");
+ FileUtils.FilterWrapper second = new FileUtils.FilterWrapper()
+ {
+ public Reader getReader( Reader reader )
+ {
+ return new InterpolationFilterReader( reader,
filterProperties, "@", "@" );
}
};
defaultFilterWrappers.add( second );
@@ -145,8 +152,7 @@
}
};
defaultFilterWrappers.add( third );
-
-
+
return defaultFilterWrappers;
}
Added:
maven/sandbox/trunk/shared/maven-filtering/src/main/java/org/apache/maven/shared/filtering/DefaultMavenResourcesFiltering.java
URL:
http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-filtering/src/main/java/org/apache/maven/shared/filtering/DefaultMavenResourcesFiltering.java?rev=616103&view=auto
==============================================================================
---
maven/sandbox/trunk/shared/maven-filtering/src/main/java/org/apache/maven/shared/filtering/DefaultMavenResourcesFiltering.java
(added)
+++
maven/sandbox/trunk/shared/maven-filtering/src/main/java/org/apache/maven/shared/filtering/DefaultMavenResourcesFiltering.java
Mon Jan 28 15:21:03 2008
@@ -0,0 +1,133 @@
+/*
+ * 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.
+ */
+package org.apache.maven.shared.filtering;
+
+import java.io.File;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.maven.model.Resource;
+import org.apache.maven.project.MavenProject;
+import org.codehaus.plexus.util.DirectoryScanner;
+
+/**
+ * @author <a href="mailto:[EMAIL PROTECTED]">olamy</a>
+ * @since 28 janv. 08
+ * @version $Id$
+ *
+ * @plexus.component
role="org.apache.maven.shared.filtering.MavenResourcesFiltering"
+ * role-hint="default"
+ */
+public class DefaultMavenResourcesFiltering
+ implements MavenResourcesFiltering
+{
+
+ private static final String[] EMPTY_STRING_ARRAY = {};
+
+ private static final String[] DEFAULT_INCLUDES = {"**/**"};
+
+ /**
+ * @plexus.requirement
+ * role-hint="default"
+ */
+ private MavenFileFilter mavenFileFilter;
+
+ public void filterResources( List resources, File outputDirectory,
MavenProject mavenProject, String encoding,
+ List fileFilters )
+ throws MavenFilteringException
+ {
+ for ( Iterator i = resources.iterator(); i.hasNext(); )
+ {
+ Resource resource = (Resource) i.next();
+
+ String targetPath = resource.getTargetPath();
+
+ File resourceDirectory = new File( resource.getDirectory() );
+ if ( !resourceDirectory.isAbsolute() )
+ {
+ resourceDirectory = new File( mavenProject.getBasedir(),
resourceDirectory.getPath() );
+ }
+
+ if ( !resourceDirectory.exists() )
+ {
+ // TODO how to log here ?
+ continue;
+ }
+
+ // this part is required in case the user specified "../something"
as destination
+ // see MNG-1345
+ if ( !outputDirectory.exists() )
+ {
+ if ( !outputDirectory.mkdirs() )
+ {
+ throw new MavenFilteringException( "Cannot create resource
output directory: " + outputDirectory );
+ }
+ }
+
+ DirectoryScanner scanner = new DirectoryScanner();
+
+ scanner.setBasedir( resourceDirectory );
+ if ( resource.getIncludes() != null &&
!resource.getIncludes().isEmpty() )
+ {
+ scanner.setIncludes( (String[])
resource.getIncludes().toArray( EMPTY_STRING_ARRAY ) );
+ }
+ else
+ {
+ scanner.setIncludes( DEFAULT_INCLUDES );
+ }
+
+ if ( resource.getExcludes() != null &&
!resource.getExcludes().isEmpty() )
+ {
+ scanner.setExcludes( (String[])
resource.getExcludes().toArray( EMPTY_STRING_ARRAY ) );
+ }
+
+ scanner.addDefaultExcludes();
+ scanner.scan();
+
+ List includedFiles = Arrays.asList( scanner.getIncludedFiles() );
+
+ List filterWrappers = mavenFileFilter.getDefaultFilterWrappers(
mavenProject, fileFilters, true );
+
+ for ( Iterator j = includedFiles.iterator(); j.hasNext(); )
+ {
+ String name = (String) j.next();
+
+ String destination = name;
+
+ if ( targetPath != null )
+ {
+ destination = targetPath + "/" + name;
+ }
+
+ File source = new File( resourceDirectory, name );
+
+ File destinationFile = new File( outputDirectory, destination
);
+
+ if ( !destinationFile.getParentFile().exists() )
+ {
+ destinationFile.getParentFile().mkdirs();
+ }
+ mavenFileFilter.copyFile( source, destinationFile,
resource.isFiltering(), filterWrappers, encoding );
+ }
+ }
+
+ }
+
+}
Propchange:
maven/sandbox/trunk/shared/maven-filtering/src/main/java/org/apache/maven/shared/filtering/DefaultMavenResourcesFiltering.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
maven/sandbox/trunk/shared/maven-filtering/src/main/java/org/apache/maven/shared/filtering/DefaultMavenResourcesFiltering.java
------------------------------------------------------------------------------
svn:executable = *
Propchange:
maven/sandbox/trunk/shared/maven-filtering/src/main/java/org/apache/maven/shared/filtering/DefaultMavenResourcesFiltering.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Mon Jan 28 15:21:03 2008
@@ -0,0 +1 @@
+URL HeadURL Author LastChangedBy Date LastChangedDate Rev Revision
LastChangedRevision Id
Modified:
maven/sandbox/trunk/shared/maven-filtering/src/main/java/org/apache/maven/shared/filtering/MavenFileFilter.java
URL:
http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-filtering/src/main/java/org/apache/maven/shared/filtering/MavenFileFilter.java?rev=616103&r1=616102&r2=616103&view=diff
==============================================================================
---
maven/sandbox/trunk/shared/maven-filtering/src/main/java/org/apache/maven/shared/filtering/MavenFileFilter.java
(original)
+++
maven/sandbox/trunk/shared/maven-filtering/src/main/java/org/apache/maven/shared/filtering/MavenFileFilter.java
Mon Jan 28 15:21:03 2008
@@ -43,18 +43,18 @@
* @param filters [EMAIL PROTECTED] List} of properties file
* @throws IOException
*/
- public void copyFile( File from, final File to, boolean filtering,
MavenProject mavenProject,
- List/* File */filters, boolean
escapedBackslashesInFilePath, String encoding )
+ public void copyFile( File from, final File to, boolean filtering,
MavenProject mavenProject, List filters,
+ boolean escapedBackslashesInFilePath, String
encoding )
throws MavenFilteringException;
/**
* @param from
* @param to
* @param filtering
- * @param filterWrappers
+ * @param filterWrappers [EMAIL PROTECTED] List} of FileUtils.FilterWrapper
* @throws MavenFilteringException
*/
- public void copyFile( File from, final File to, boolean filtering, List
/*FileUtils.FilterWrapper*/filterWrappers, String encoding )
+ public void copyFile( File from, final File to, boolean filtering, List
filterWrappers, String encoding )
throws MavenFilteringException;
/**
@@ -73,7 +73,6 @@
* @return [EMAIL PROTECTED] List} of FileUtils.FilterWrapper
*
*/
- public List/*FileUtils.FilterWrapper*/getDefaultFilterWrappers(
MavenProject mavenProject, List/* File */filters,
- boolean
escapedBackslashesInFilePath )
+ public List getDefaultFilterWrappers( MavenProject mavenProject, List
filters, boolean escapedBackslashesInFilePath )
throws MavenFilteringException;
}
Added:
maven/sandbox/trunk/shared/maven-filtering/src/main/java/org/apache/maven/shared/filtering/MavenResourcesFiltering.java
URL:
http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-filtering/src/main/java/org/apache/maven/shared/filtering/MavenResourcesFiltering.java?rev=616103&view=auto
==============================================================================
---
maven/sandbox/trunk/shared/maven-filtering/src/main/java/org/apache/maven/shared/filtering/MavenResourcesFiltering.java
(added)
+++
maven/sandbox/trunk/shared/maven-filtering/src/main/java/org/apache/maven/shared/filtering/MavenResourcesFiltering.java
Mon Jan 28 15:21:03 2008
@@ -0,0 +1,49 @@
+/*
+ * 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.
+ */
+package org.apache.maven.shared.filtering;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+
+import org.apache.maven.model.Resource;
+import org.apache.maven.project.MavenProject;
+
+/**
+ * @author <a href="mailto:[EMAIL PROTECTED]">olamy</a>
+ * @since 28 janv. 08
+ * @version $Id$
+ */
+public interface MavenResourcesFiltering
+{
+
+ /**
+ * @param resources [EMAIL PROTECTED] List} of [EMAIL PROTECTED] Resource}
+ * @param outputDirectory parent destination directory
+ * @param mavenProject
+ * @param encoding
+ * @param fileFilters [EMAIL PROTECTED] List} of Properties file
+ * @throws MavenFilteringException
+ * @throws IOException
+ */
+ public void filterResources( List resources, File outputDirectory,
MavenProject mavenProject, String encoding,
+ List fileFilters )
+ throws MavenFilteringException;
+
+}
Propchange:
maven/sandbox/trunk/shared/maven-filtering/src/main/java/org/apache/maven/shared/filtering/MavenResourcesFiltering.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
maven/sandbox/trunk/shared/maven-filtering/src/main/java/org/apache/maven/shared/filtering/MavenResourcesFiltering.java
------------------------------------------------------------------------------
svn:executable = *
Propchange:
maven/sandbox/trunk/shared/maven-filtering/src/main/java/org/apache/maven/shared/filtering/MavenResourcesFiltering.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Mon Jan 28 15:21:03 2008
@@ -0,0 +1 @@
+URL HeadURL Author LastChangedBy Date LastChangedDate Rev Revision
LastChangedRevision Id
Modified:
maven/sandbox/trunk/shared/maven-filtering/src/main/java/org/apache/maven/shared/filtering/PropertyUtils.java
URL:
http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-filtering/src/main/java/org/apache/maven/shared/filtering/PropertyUtils.java?rev=616103&r1=616102&r2=616103&view=diff
==============================================================================
---
maven/sandbox/trunk/shared/maven-filtering/src/main/java/org/apache/maven/shared/filtering/PropertyUtils.java
(original)
+++
maven/sandbox/trunk/shared/maven-filtering/src/main/java/org/apache/maven/shared/filtering/PropertyUtils.java
Mon Jan 28 15:21:03 2008
@@ -72,7 +72,7 @@
}
final Properties combinedProps = new Properties();
- combinedProps.putAll( baseProps );
+ combinedProps.putAll( baseProps == null ? new Properties() : baseProps
);
combinedProps.putAll( fileProps );
// The algorithm iterates only over the fileProps which is all that is
required to resolve
@@ -185,7 +185,7 @@
// else prefix the original string with the
// resolved property ( so it can be parsed further )
// taking recursion into account.
- if ( nv == null || nv.equals( k ) )
+ if ( nv == null || nv.equals( k ) || k.equals( nk ) )
{
ret += "${" + nk + "}";
}
Added:
maven/sandbox/trunk/shared/maven-filtering/src/test/java/org/apache/maven/shared/filtering/DefaultMavenResourcesFilteringTest.java
URL:
http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-filtering/src/test/java/org/apache/maven/shared/filtering/DefaultMavenResourcesFilteringTest.java?rev=616103&view=auto
==============================================================================
---
maven/sandbox/trunk/shared/maven-filtering/src/test/java/org/apache/maven/shared/filtering/DefaultMavenResourcesFilteringTest.java
(added)
+++
maven/sandbox/trunk/shared/maven-filtering/src/test/java/org/apache/maven/shared/filtering/DefaultMavenResourcesFilteringTest.java
Mon Jan 28 15:21:03 2008
@@ -0,0 +1,116 @@
+/*
+ * 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.
+ */
+package org.apache.maven.shared.filtering;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+import org.apache.maven.model.Resource;
+import org.apache.maven.project.MavenProject;
+import org.codehaus.plexus.PlexusTestCase;
+import org.codehaus.plexus.util.FileUtils;
+
+/**
+ * @author <a href="mailto:[EMAIL PROTECTED]">olamy</a>
+ * @since 28 janv. 08
+ * @version $Id$
+ */
+public class DefaultMavenResourcesFilteringTest
+ extends PlexusTestCase
+{
+
+ File outputDirectory = new File(getBasedir(),
"target/DefaultMavenResourcesFilteringTest");
+
+
+
+ protected void setUp()
+ throws Exception
+ {
+ super.setUp();
+ if ( outputDirectory.exists() )
+ {
+ FileUtils.forceDelete( outputDirectory );
+ }
+ outputDirectory.mkdirs();
+ }
+
+ public void testSimpleFiltering()
+ throws Exception
+ {
+ StubMavenProject mavenProject = new StubMavenProject();
+ mavenProject.setVersion( "1.0" );
+ mavenProject.setGroupId( "org.apache" );
+
+ Properties projectProperties = new Properties();
+ projectProperties.put( "foo", "bar" );
+ mavenProject.setProperties( projectProperties );
+ MavenResourcesFiltering mavenResourcesFiltering =
(MavenResourcesFiltering) lookup( MavenResourcesFiltering.class
+ .getName() );
+
+ Resource resource = new Resource();
+ List resources = new ArrayList();
+ resources.add( resource );
+ resource.setDirectory( getBasedir() +
"/src/test/units-files/maven-resources-filtering" );
+ resource.setFiltering( true );
+ mavenResourcesFiltering.filterResources( resources, outputDirectory,
mavenProject, null, null );
+
+ assertEquals( 2, outputDirectory.listFiles().length );
+ Properties result = PropertyUtils.loadPropertyFile( new
File(outputDirectory, "empty-maven-resources-filtering.txt"), null );
+ assertTrue (result.isEmpty());
+
+ result = PropertyUtils.loadPropertyFile( new File(outputDirectory,
"maven-resources-filtering.txt"), null );
+ assertFalse( result.isEmpty() );
+
+ assertEquals("1.0", result.get( "version" ));
+ assertEquals("org.apache", result.get( "groupId" ));
+ assertEquals("bar", result.get( "foo" ));
+ }
+
+ public void testNoFiltering()
+ throws Exception
+ {
+ StubMavenProject mavenProject = new StubMavenProject();
+ mavenProject.setVersion( "1.0" );
+ mavenProject.setGroupId( "org.apache" );
+
+ MavenResourcesFiltering mavenResourcesFiltering =
(MavenResourcesFiltering) lookup( MavenResourcesFiltering.class
+ .getName() );
+
+ Resource resource = new Resource();
+ List resources = new ArrayList();
+ resources.add( resource );
+ resource.setDirectory( getBasedir() +
"/src/test/units-files/maven-resources-filtering" );
+ resource.setFiltering( false );
+ mavenResourcesFiltering.filterResources( resources, outputDirectory,
mavenProject, null, null );
+
+ assertEquals( 2, outputDirectory.listFiles().length );
+ Properties result = PropertyUtils.loadPropertyFile( new File(
outputDirectory,
+
"empty-maven-resources-filtering.txt" ), null );
+ assertTrue( result.isEmpty() );
+
+ result = PropertyUtils.loadPropertyFile( new File( outputDirectory,
"maven-resources-filtering.txt" ), null );
+ assertFalse( result.isEmpty() );
+
+ assertEquals( "${pom.version}", result.get( "version" ) );
+ assertEquals( "${pom.groupId}", result.get( "groupId" ) );
+ assertEquals( "${foo}", result.get( "foo" ) );
+ }
+}
Propchange:
maven/sandbox/trunk/shared/maven-filtering/src/test/java/org/apache/maven/shared/filtering/DefaultMavenResourcesFilteringTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
maven/sandbox/trunk/shared/maven-filtering/src/test/java/org/apache/maven/shared/filtering/DefaultMavenResourcesFilteringTest.java
------------------------------------------------------------------------------
svn:executable = *
Propchange:
maven/sandbox/trunk/shared/maven-filtering/src/test/java/org/apache/maven/shared/filtering/DefaultMavenResourcesFilteringTest.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Mon Jan 28 15:21:03 2008
@@ -0,0 +1 @@
+URL HeadURL Author LastChangedBy Date LastChangedDate Rev Revision
LastChangedRevision Id
Added:
maven/sandbox/trunk/shared/maven-filtering/src/test/java/org/apache/maven/shared/filtering/StubMavenProject.java
URL:
http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-filtering/src/test/java/org/apache/maven/shared/filtering/StubMavenProject.java?rev=616103&view=auto
==============================================================================
---
maven/sandbox/trunk/shared/maven-filtering/src/test/java/org/apache/maven/shared/filtering/StubMavenProject.java
(added)
+++
maven/sandbox/trunk/shared/maven-filtering/src/test/java/org/apache/maven/shared/filtering/StubMavenProject.java
Mon Jan 28 15:21:03 2008
@@ -0,0 +1,46 @@
+/*
+ * 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.
+ */
+package org.apache.maven.shared.filtering;
+
+import java.util.Properties;
+
+import org.apache.maven.project.MavenProject;
+
+/**
+ * @author <a href="mailto:[EMAIL PROTECTED]">olamy</a>
+ * @since 28 janv. 08
+ * @version $Id$
+ */
+public class StubMavenProject
+ extends MavenProject
+{
+ private Properties properties;
+
+ public Properties getProperties()
+ {
+ return this.properties;
+ }
+
+ public void setProperties( Properties properties )
+ {
+ this.properties = properties;
+ }
+
+
+}
Propchange:
maven/sandbox/trunk/shared/maven-filtering/src/test/java/org/apache/maven/shared/filtering/StubMavenProject.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
maven/sandbox/trunk/shared/maven-filtering/src/test/java/org/apache/maven/shared/filtering/StubMavenProject.java
------------------------------------------------------------------------------
svn:executable = *
Propchange:
maven/sandbox/trunk/shared/maven-filtering/src/test/java/org/apache/maven/shared/filtering/StubMavenProject.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Mon Jan 28 15:21:03 2008
@@ -0,0 +1 @@
+URL HeadURL Author LastChangedBy Date LastChangedDate Rev Revision
LastChangedRevision Id
Added:
maven/sandbox/trunk/shared/maven-filtering/src/test/units-files/maven-resources-filtering/empty-maven-resources-filtering.txt
URL:
http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-filtering/src/test/units-files/maven-resources-filtering/empty-maven-resources-filtering.txt?rev=616103&view=auto
==============================================================================
---
maven/sandbox/trunk/shared/maven-filtering/src/test/units-files/maven-resources-filtering/empty-maven-resources-filtering.txt
(added)
+++
maven/sandbox/trunk/shared/maven-filtering/src/test/units-files/maven-resources-filtering/empty-maven-resources-filtering.txt
Mon Jan 28 15:21:03 2008
@@ -0,0 +1,18 @@
+#/*
+# * 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.
+# */
\ No newline at end of file
Propchange:
maven/sandbox/trunk/shared/maven-filtering/src/test/units-files/maven-resources-filtering/empty-maven-resources-filtering.txt
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
maven/sandbox/trunk/shared/maven-filtering/src/test/units-files/maven-resources-filtering/empty-maven-resources-filtering.txt
------------------------------------------------------------------------------
svn:executable = *
Propchange:
maven/sandbox/trunk/shared/maven-filtering/src/test/units-files/maven-resources-filtering/empty-maven-resources-filtering.txt
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added:
maven/sandbox/trunk/shared/maven-filtering/src/test/units-files/maven-resources-filtering/maven-resources-filtering.txt
URL:
http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/maven-filtering/src/test/units-files/maven-resources-filtering/maven-resources-filtering.txt?rev=616103&view=auto
==============================================================================
---
maven/sandbox/trunk/shared/maven-filtering/src/test/units-files/maven-resources-filtering/maven-resources-filtering.txt
(added)
+++
maven/sandbox/trunk/shared/maven-filtering/src/test/units-files/maven-resources-filtering/maven-resources-filtering.txt
Mon Jan 28 15:21:03 2008
@@ -0,0 +1,22 @@
+#/*
+# * 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.
+# */
+version=${pom.version}
+groupId=${pom.groupId}
+foo=${foo}
+none=none filtered
\ No newline at end of file
Propchange:
maven/sandbox/trunk/shared/maven-filtering/src/test/units-files/maven-resources-filtering/maven-resources-filtering.txt
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
maven/sandbox/trunk/shared/maven-filtering/src/test/units-files/maven-resources-filtering/maven-resources-filtering.txt
------------------------------------------------------------------------------
svn:executable = *
Propchange:
maven/sandbox/trunk/shared/maven-filtering/src/test/units-files/maven-resources-filtering/maven-resources-filtering.txt
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"