You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by dk...@apache.org on 2007/02/28 20:49:09 UTC
svn commit: r512932 - in /maven/plugins/trunk/maven-remote-resources-plugin:
./ src/main/java/org/apache/maven/plugin/resources/remote/ src/test/
src/test/java/ src/test/java/org/ src/test/java/org/apache/
src/test/java/org/apache/maven/ src/test/java/...
Author: dkulp
Date: Wed Feb 28 11:49:08 2007
New Revision: 512932
URL: http://svn.apache.org/viewvc?view=rev&rev=512932
Log:
Add unit tests for remote-resources plugin
Added:
maven/plugins/trunk/maven-remote-resources-plugin/src/test/
maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/
maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/
maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/
maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/
maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/
maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/
maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/
maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/RemoteResourcesMojoTest.java (with props)
maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/stub/
maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/stub/ArtifactStub.java (with props)
maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/stub/MavenProjectBasicStub.java (with props)
maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/stub/MavenProjectBuildStub.java (with props)
maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/stub/MavenProjectResourcesStub.java (with props)
maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/stub/ModelStub.java (with props)
maven/plugins/trunk/maven-remote-resources-plugin/src/test/resources/
maven/plugins/trunk/maven-remote-resources-plugin/src/test/resources/FILTER.txt.vm
maven/plugins/trunk/maven-remote-resources-plugin/src/test/resources/SIMPLE.txt (with props)
maven/plugins/trunk/maven-remote-resources-plugin/src/test/resources/unit/
maven/plugins/trunk/maven-remote-resources-plugin/src/test/resources/unit/rrmojotest/
maven/plugins/trunk/maven-remote-resources-plugin/src/test/resources/unit/rrmojotest/bundle-plugin-config.xml (with props)
maven/plugins/trunk/maven-remote-resources-plugin/src/test/resources/unit/rrmojotest/process-plugin-config.xml (with props)
Modified:
maven/plugins/trunk/maven-remote-resources-plugin/pom.xml
maven/plugins/trunk/maven-remote-resources-plugin/src/main/java/org/apache/maven/plugin/resources/remote/ProcessRemoteResourcesMojo.java
Modified: maven/plugins/trunk/maven-remote-resources-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-remote-resources-plugin/pom.xml?view=diff&rev=512932&r1=512931&r2=512932
==============================================================================
--- maven/plugins/trunk/maven-remote-resources-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-remote-resources-plugin/pom.xml Wed Feb 28 11:49:08 2007
@@ -62,6 +62,12 @@
<version>3.8.1</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-plugin-testing-harness</artifactId>
+ <version>1.0-beta-1</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
<plugins>
Modified: maven/plugins/trunk/maven-remote-resources-plugin/src/main/java/org/apache/maven/plugin/resources/remote/ProcessRemoteResourcesMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-remote-resources-plugin/src/main/java/org/apache/maven/plugin/resources/remote/ProcessRemoteResourcesMojo.java?view=diff&rev=512932&r1=512931&r2=512932
==============================================================================
--- maven/plugins/trunk/maven-remote-resources-plugin/src/main/java/org/apache/maven/plugin/resources/remote/ProcessRemoteResourcesMojo.java (original)
+++ maven/plugins/trunk/maven-remote-resources-plugin/src/main/java/org/apache/maven/plugin/resources/remote/ProcessRemoteResourcesMojo.java Wed Feb 28 11:49:08 2007
@@ -78,16 +78,16 @@
/**
* The local repository taken from Maven's runtime. Typically $HOME/.m2/repository.
*
- * @parameter expression="${localRepository}
+ * @parameter expression="${localRepository}"
*/
private ArtifactRepository localRepository;
/**
* The remote repositories used as specified in your POM.
*
- * @parameter expression="${project.repositories}
+ * @parameter expression="${project.repositories}"
*/
- private ArrayList remoteRepositories;
+ private List remoteRepositories;
/**
* The current Maven project.
@@ -116,7 +116,7 @@
* @parameter
* @required
*/
- private ArrayList resourceBundles;
+ private List resourceBundles;
/**
Added: maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/RemoteResourcesMojoTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/RemoteResourcesMojoTest.java?view=auto&rev=512932
==============================================================================
--- maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/RemoteResourcesMojoTest.java (added)
+++ maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/RemoteResourcesMojoTest.java Wed Feb 28 11:49:08 2007
@@ -0,0 +1,329 @@
+package org.apache.maven.plugin.resources.remote;
+
+/*
+ * 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 org.apache.maven.artifact.DefaultArtifact;
+import org.apache.maven.artifact.handler.DefaultArtifactHandler;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.artifact.versioning.VersionRange;
+import org.apache.maven.execution.MavenSession;
+import org.apache.maven.execution.ReactorManager;
+import org.apache.maven.monitor.event.EventDispatcher;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.resources.remote.stub.MavenProjectResourcesStub;
+import org.apache.maven.plugin.testing.AbstractMojoTestCase;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.settings.Settings;
+import org.codehaus.plexus.PlexusContainer;
+import org.codehaus.plexus.util.FileUtils;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Properties;
+import java.util.jar.JarFile;
+import java.util.jar.JarOutputStream;
+import java.util.zip.ZipEntry;
+
+
+/**
+ * RemoteResources plugin Test Case
+ */
+
+public class RemoteResourcesMojoTest
+ extends AbstractMojoTestCase
+{
+ static final String DEFAULT_BUNDLE_POM_PATH = "target/test-classes/unit/rrmojotest/bundle-plugin-config.xml";
+ static final String DEFAULT_PROCESS_POM_PATH = "target/test-classes/unit/rrmojotest/process-plugin-config.xml";
+
+ public void setUp()
+ throws Exception
+ {
+ super.setUp();
+ }
+
+ public void tearDown()
+ throws Exception
+ {
+
+ }
+
+ /**
+ * check test environment
+ *
+ * @throws Exception if any exception occurs
+ */
+ public void testTestEnvironment()
+ throws Exception
+ {
+ // Perform lookup on the Mojo to make sure everything is ok
+ lookupProcessMojo();
+ }
+
+
+ public void testNoBundles()
+ throws Exception
+ {
+ final MavenProjectResourcesStub project = createTestProject( "default-nobundles" );
+ final ProcessRemoteResourcesMojo mojo = lookupProcessMojoWithDefaultSettings( project );
+
+ setupDefaultProject( project );
+
+ mojo.execute();
+ }
+
+ public void testCreateBundle()
+ throws Exception
+ {
+ buildResourceBundle( "default-createbundle",
+ new String[] { "SIMPLE.txt" },
+ null);
+ }
+
+ public void testSimpleBundles()
+ throws Exception
+ {
+ final MavenProjectResourcesStub project = createTestProject( "default-simplebundles" );
+ final ProcessRemoteResourcesMojo mojo = lookupProcessMojoWithSettings( project ,
+ new String[] {
+ "test:test:1.0"
+ });
+
+ setupDefaultProject( project );
+
+ ArtifactRepository repo = (ArtifactRepository) getVariableValueFromObject( mojo, "localRepository" );
+ String path = repo.pathOf(new DefaultArtifact( "test",
+ "test",
+ VersionRange.createFromVersion("1.0"),
+ null,
+ "jar",
+ "",
+ new DefaultArtifactHandler() ));
+
+ File file = new File(repo.getBasedir() + "/" + path + ".jar");
+ file.getParentFile().mkdirs();
+ buildResourceBundle( "default-simplebundles-create",
+ new String[] { "SIMPLE.txt" },
+ file );
+
+
+ mojo.execute();
+
+ file = (File) getVariableValueFromObject( mojo, "outputDirectory" );
+ file = new File(file, "SIMPLE.txt");
+ assertTrue(file.exists());
+ }
+
+ public void testFilteredBundles()
+ throws Exception
+ {
+ final MavenProjectResourcesStub project = createTestProject( "default-filterbundles" );
+ final ProcessRemoteResourcesMojo mojo = lookupProcessMojoWithSettings( project ,
+ new String[] {
+ "test:test:1.1"
+ });
+
+ setupDefaultProject( project );
+
+ ArtifactRepository repo = (ArtifactRepository) getVariableValueFromObject( mojo, "localRepository" );
+ String path = repo.pathOf(new DefaultArtifact( "test",
+ "test",
+ VersionRange.createFromVersion("1.1"),
+ null,
+ "jar",
+ "",
+ new DefaultArtifactHandler() ));
+
+ File file = new File(repo.getBasedir() + "/" + path + ".jar");
+ file.getParentFile().mkdirs();
+ buildResourceBundle( "default-filterbundles-create",
+ new String[] { "FILTER.txt.vm" },
+ file );
+
+
+ mojo.execute();
+ // executing a second time (example: forked lifecycle) should still work
+ mojo.execute();
+
+ file = (File) getVariableValueFromObject( mojo, "outputDirectory" );
+ file = new File(file, "FILTER.txt");
+ assertTrue(file.exists());
+
+ String data = FileUtils.fileRead(file);
+ assertTrue(data.indexOf("2007") != -1);
+ assertTrue(data.indexOf("default-filterbundles") != -1);
+ }
+
+ protected void buildResourceBundle(String id,
+ String resourceNames[],
+ File jarName)
+ throws Exception
+ {
+ final MavenProjectResourcesStub project = createTestProject( id );
+
+ final File resourceDir = new File(project.getBasedir() + "/src/main/resources");
+ final BundleRemoteResourcesMojo mojo = lookupBundleMojoWithSettings( project , resourceDir );
+
+ setupDefaultProject( project );
+
+ for (int x = 0; x < resourceNames.length; x++)
+ {
+ File resource = new File(resourceDir, resourceNames[x]);
+ URL source = getClass().getResource("/" + resourceNames[x]);
+
+ FileUtils.copyURLToFile(source, resource);
+ }
+
+ mojo.execute();
+
+ File xmlFile = new File(project.getBasedir() + "/target/classes/META-INF/maven/remote-resources.xml");
+ assertTrue(xmlFile.exists());
+
+ String data = FileUtils.fileRead(xmlFile);
+ for (int x = 0; x < resourceNames.length; x++)
+ {
+ assertTrue(data.indexOf(resourceNames[x]) != -1);
+ }
+
+ if ( null != jarName)
+ {
+ JarOutputStream jar = new JarOutputStream( new FileOutputStream(jarName) );
+ jar.putNextEntry(new ZipEntry("META-INF/maven/remote-resources.xml"));
+ jar.write(data.getBytes());
+ jar.closeEntry();
+
+ for (int x = 0; x < resourceNames.length; x++)
+ {
+ File resource = new File(resourceDir, resourceNames[x]);
+ data = FileUtils.fileRead(resource);
+ jar.putNextEntry(new ZipEntry(resourceNames[x]));
+ jar.write(data.getBytes());
+ jar.closeEntry();
+ }
+ jar.close();
+ }
+ }
+
+
+
+ protected MavenProjectResourcesStub createTestProject( final String testName )
+ throws Exception
+ {
+ // this will automatically create the isolated
+ // test environment
+ return new MavenProjectResourcesStub( testName );
+ }
+ protected void setupDefaultProject( final MavenProjectResourcesStub project )
+ throws Exception
+ {
+ // put this on the root dir
+ project.addFile( "pom.xml", MavenProjectResourcesStub.ROOT_FILE );
+ project.setInceptionYear("2007");
+ // start creating the environment
+ project.setupBuildEnvironment();
+ }
+
+
+ protected BundleRemoteResourcesMojo lookupBundleMojo()
+ throws Exception
+ {
+ File pomFile = new File( getBasedir(), DEFAULT_BUNDLE_POM_PATH );
+ BundleRemoteResourcesMojo mojo = (BundleRemoteResourcesMojo) lookupMojo( "bundle", pomFile );
+
+ assertNotNull( mojo );
+
+ return mojo;
+ }
+ protected BundleRemoteResourcesMojo lookupBundleMojoWithDefaultSettings( final MavenProject project )
+ throws Exception
+ {
+ File resourceDir = new File(project.getBasedir() + "/src/main/resources");
+ return lookupBundleMojoWithSettings(project, resourceDir);
+ }
+ protected BundleRemoteResourcesMojo lookupBundleMojoWithSettings( final MavenProject project,
+ File resourceDir)
+ throws Exception
+ {
+ final BundleRemoteResourcesMojo mojo = lookupBundleMojo();
+
+ setVariableValueToObject( mojo, "resourcesDirectory", resourceDir );
+ setVariableValueToObject( mojo, "outputDirectory", new File(project.getBuild().getOutputDirectory()) );
+ return mojo;
+ }
+
+ protected ProcessRemoteResourcesMojo lookupProcessMojo()
+ throws Exception
+ {
+ File pomFile = new File( getBasedir(), DEFAULT_PROCESS_POM_PATH );
+ ProcessRemoteResourcesMojo mojo = (ProcessRemoteResourcesMojo) lookupMojo( "process", pomFile );
+
+ assertNotNull( mojo );
+
+ return mojo;
+ }
+
+
+ protected ProcessRemoteResourcesMojo lookupProcessMojoWithSettings( final MavenProject project,
+ String bundles[])
+ throws Exception
+ {
+ return lookupProcessMojoWithSettings( project, new ArrayList(Arrays.asList(bundles)));
+ }
+
+ protected ProcessRemoteResourcesMojo lookupProcessMojoWithSettings( final MavenProject project,
+ ArrayList bundles)
+ throws Exception
+ {
+ final ProcessRemoteResourcesMojo mojo = lookupProcessMojo();
+
+ MavenSession session = new MavenSession( container,
+ null, //Settings settings,
+ null, //ArtifactRepository localRepository,
+ null, //EventDispatcher eventDispatcher,
+ null, //ReactorManager reactorManager,
+ Arrays.asList(new String[] {"install"}),
+ project.getBasedir().toString(),
+ new Properties(),
+ Calendar.getInstance().getTime());
+
+
+ setVariableValueToObject( mojo, "project", project );
+ setVariableValueToObject( mojo, "outputDirectory", new File(project.getBuild().getOutputDirectory()) );
+ setVariableValueToObject( mojo, "resourceBundles", bundles );
+ setVariableValueToObject( mojo, "mavenSession", session );
+ setVariableValueToObject( mojo, "remoteRepositories", project.getRemoteArtifactRepositories());
+ setVariableValueToObject( mojo, "resources", project.getResources());
+ return mojo;
+ }
+
+ protected ProcessRemoteResourcesMojo lookupProcessMojoWithDefaultSettings( final MavenProject project )
+ throws Exception
+ {
+ return lookupProcessMojoWithSettings( project, new ArrayList() );
+ }
+}
Propchange: maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/RemoteResourcesMojoTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/RemoteResourcesMojoTest.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/stub/ArtifactStub.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/stub/ArtifactStub.java?view=auto&rev=512932
==============================================================================
--- maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/stub/ArtifactStub.java (added)
+++ maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/stub/ArtifactStub.java Wed Feb 28 11:49:08 2007
@@ -0,0 +1,332 @@
+package org.apache.maven.plugin.resources.remote.stub;
+
+/*
+ * 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.File;
+import java.util.Collection;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.handler.ArtifactHandler;
+import org.apache.maven.artifact.handler.DefaultArtifactHandler;
+import org.apache.maven.artifact.metadata.ArtifactMetadata;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
+import org.apache.maven.artifact.versioning.ArtifactVersion;
+import org.apache.maven.artifact.versioning.OverConstrainedVersionException;
+import org.apache.maven.artifact.versioning.VersionRange;
+
+
+/**
+ * Stub
+ */
+public class ArtifactStub
+ implements Artifact
+{
+
+ boolean hasClassifier;
+
+ boolean resolved;
+
+ boolean optional;
+
+ boolean release;
+
+ ArtifactHandler artifactHandler;
+
+ File file;
+
+ String baseVersion;
+
+ String type;
+
+ String classifier;
+
+ String identifier;
+
+ String dependencyConflictId;
+
+ String downloadUrl;
+
+ String selectedVersion;
+
+ String artifactId;
+
+ String groupId;
+
+ String resolvedVersion;
+
+ String scope;
+
+ String version;
+
+ VersionRange versionRange;
+
+
+ public ArtifactStub()
+ {
+ type = "testtype";
+ scope = "testscope";
+ classifier = "testclassifier";
+ artifactHandler = new DefaultArtifactHandler();
+ }
+
+ public void populate( MavenProjectBasicStub project )
+ {
+ groupId = project.getGroupId();
+ artifactId = project.getArtifactId();
+ version = project.getVersion();
+ versionRange = VersionRange.createFromVersion( version );
+ }
+
+ public boolean hasClassifier()
+ {
+ return true;
+ }
+
+ public String getBaseVersion()
+ {
+ return "Test Version";
+ }
+
+ public void setBaseVersion( String version )
+ {
+ baseVersion = version;
+ }
+
+ public void setFile( File _file )
+ {
+ file = _file;
+ }
+
+ public File getFile()
+ {
+ return new File( "testfile" );
+ }
+
+ public String getGroupId()
+ {
+ return groupId;
+ }
+
+ public String getArtifactId()
+ {
+ return artifactId;
+ }
+
+ public String getVersion()
+ {
+ return version;
+ }
+
+ public void setVersion( String _version )
+ {
+ version = _version;
+ }
+
+ public String getScope()
+ {
+ return scope;
+ }
+
+ public String getType()
+ {
+ return type;
+ }
+
+ public String getClassifier()
+ {
+ return classifier;
+ }
+
+ public String getId()
+ {
+ return identifier;
+ }
+
+ public String getDependencyConflictId()
+ {
+ return dependencyConflictId;
+ }
+
+ public void addMetadata( ArtifactMetadata metadata )
+ {
+
+ }
+
+ public Collection getMetadataList()
+ {
+ return new LinkedList();
+ }
+
+ public void setRepository( ArtifactRepository remoteRepository )
+ {
+
+ }
+
+ public ArtifactRepository getRepository()
+ {
+ return null;
+ }
+
+ public void updateVersion( String version, ArtifactRepository localRepository )
+ {
+
+ }
+
+ public String getDownloadUrl()
+ {
+ return downloadUrl;
+ }
+
+ public void setDownloadUrl( String _downloadUrl )
+ {
+ downloadUrl = _downloadUrl;
+ }
+
+ public ArtifactFilter getDependencyFilter()
+ {
+ return null;
+ }
+
+ public void setDependencyFilter( ArtifactFilter artifactFilter )
+ {
+
+ }
+
+ public ArtifactHandler getArtifactHandler()
+ {
+ return artifactHandler;
+ }
+
+ public List getDependencyTrail()
+ {
+ return new LinkedList();
+ }
+
+ public void setDependencyTrail( List dependencyTrail )
+ {
+
+ }
+
+ public void setScope( String _scope )
+ {
+ scope = _scope;
+ }
+
+ public VersionRange getVersionRange()
+ {
+ return versionRange;
+ }
+
+ public void setVersionRange( VersionRange newRange )
+ {
+
+ }
+
+ public void selectVersion( String version )
+ {
+ selectedVersion = version;
+ }
+
+ public void setGroupId( String _groupId )
+ {
+ groupId = _groupId;
+ }
+
+ public void setArtifactId( String _artifactId )
+ {
+ artifactId = _artifactId;
+ }
+
+ public boolean isSnapshot()
+ {
+ return true;
+ }
+
+ public void setResolved( boolean _resolved )
+ {
+ resolved = _resolved;
+ }
+
+ public boolean isResolved()
+ {
+ return true;
+ }
+
+ public void setResolvedVersion( String version )
+ {
+ resolvedVersion = version;
+ }
+
+
+ public void setArtifactHandler( ArtifactHandler handler )
+ {
+
+ }
+
+ public boolean isRelease()
+ {
+ return true;
+ }
+
+ public void setRelease( boolean _release )
+ {
+ release = _release;
+ }
+
+ public List getAvailableVersions()
+ {
+ return new LinkedList();
+ }
+
+ public void setAvailableVersions( List versions )
+ {
+
+ }
+
+ public boolean isOptional()
+ {
+ return true;
+ }
+
+ public void setOptional( boolean _optional )
+ {
+ optional = _optional;
+ }
+
+ public ArtifactVersion getSelectedVersion()
+ throws OverConstrainedVersionException
+ {
+ return null;
+ }
+
+ public boolean isSelectedVersionKnown()
+ throws OverConstrainedVersionException
+ {
+ return true;
+ }
+
+ public int compareTo( Object object )
+ {
+ return 0;
+ }
+}
Propchange: maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/stub/ArtifactStub.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/stub/ArtifactStub.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/stub/MavenProjectBasicStub.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/stub/MavenProjectBasicStub.java?view=auto&rev=512932
==============================================================================
--- maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/stub/MavenProjectBasicStub.java (added)
+++ maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/stub/MavenProjectBasicStub.java Wed Feb 28 11:49:08 2007
@@ -0,0 +1,166 @@
+package org.apache.maven.plugin.resources.remote.stub;
+
+/*
+ * 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.File;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.Properties;
+
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.model.Model;
+import org.apache.maven.project.MavenProject;
+import org.codehaus.plexus.PlexusTestCase;
+import org.codehaus.plexus.util.FileUtils;
+
+/**
+ * Stub
+ */
+public class MavenProjectBasicStub
+ extends MavenProject
+{
+ protected String identifier;
+
+ protected String testRootDir;
+
+ protected Properties properties;
+
+ protected String description;
+
+ protected ModelStub model;
+
+ protected File file;
+
+ protected ArtifactStub artifact;
+
+ public MavenProjectBasicStub( String id )
+ throws Exception
+ {
+ // most values are hardcoded to have a controlled environment
+ super( new ModelStub() );
+
+ model = (ModelStub) getModel();
+ properties = new Properties();
+ artifact = new ArtifactStub();
+ identifier = id;
+
+ // set isolated root directory
+ testRootDir = PlexusTestCase.getBasedir() + "/target/test-classes/unit/test-dir/" + identifier;
+
+ if ( !FileUtils.fileExists( testRootDir ) )
+ {
+ FileUtils.mkdir( testRootDir );
+ }
+
+ artifact.populate( this );
+
+ // this is ugly but needed to ensure that the copy constructor
+ // works correctly
+ initializeParentFields();
+ }
+
+ public String getName()
+ {
+ return "Test Project " + identifier;
+ }
+
+ public void setDescription( String desc )
+ {
+ description = desc;
+ }
+
+ public Model getModel()
+ {
+ return model;
+ }
+
+ public String getDescription()
+ {
+ if ( description == null )
+ {
+ return "this is a test project";
+ }
+ else
+ {
+ return description;
+ }
+ }
+
+ public File getBasedir()
+ {
+ // create an isolated environment
+ // see setupTestEnvironment for details
+ return new File( testRootDir );
+ }
+
+ public Artifact getArtifact()
+ {
+ return artifact;
+ }
+
+ public String getGroupId()
+ {
+ return "org.apache.maven.plugin.test";
+ }
+
+ public String getArtifactId()
+ {
+ return "maven-resource-plugin-test#" + identifier;
+ }
+
+ public String getPackaging()
+ {
+ return "ejb";
+ }
+
+ public String getVersion()
+ {
+ return identifier;
+ }
+
+ public void addProperty( String key, String value )
+ {
+ properties.put( key, value );
+ }
+
+ public Properties getProperties()
+ {
+ return properties;
+ }
+
+ // to prevent the MavenProject copy constructor from blowing up
+ private void initializeParentFields()
+ {
+ // the pom should be located in the isolated dummy root
+ super.setFile( new File( getBasedir(), "pom.xml" ) );
+ super.setDependencyArtifacts( new HashSet() );
+ super.setArtifacts( new HashSet() );
+ super.setPluginArtifacts( new HashSet() );
+ super.setReportArtifacts( new HashSet() );
+ super.setExtensionArtifacts( new HashSet() );
+ super.setRemoteArtifactRepositories( new LinkedList() );
+ super.setPluginArtifactRepositories( new LinkedList() );
+ super.setCollectedProjects( new LinkedList() );
+ super.setActiveProfiles( new LinkedList() );
+ super.setOriginalModel( null );
+ super.setExecutionProject( this );
+ super.setArtifact( artifact );
+ }
+}
Propchange: maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/stub/MavenProjectBasicStub.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/stub/MavenProjectBasicStub.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/stub/MavenProjectBuildStub.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/stub/MavenProjectBuildStub.java?view=auto&rev=512932
==============================================================================
--- maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/stub/MavenProjectBuildStub.java (added)
+++ maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/stub/MavenProjectBuildStub.java Wed Feb 28 11:49:08 2007
@@ -0,0 +1,341 @@
+package org.apache.maven.plugin.resources.remote.stub;
+
+/*
+ * 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.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+import org.apache.maven.model.Build;
+import org.codehaus.plexus.util.FileUtils;
+
+/**
+ * Stub
+ */
+public class MavenProjectBuildStub
+ extends MavenProjectBasicStub
+{
+ public static final int RESOURCES_FILE = 1;
+
+ public static final int ROOT_FILE = 2;
+
+ public static final int OUTPUT_FILE = 3;
+
+ public static final int SOURCE_FILE = 4;
+
+ protected Build build;
+
+ protected String srcDirectory;
+
+ protected String targetDirectory;
+
+ protected String buildDirectory;
+
+ protected String outputDirectory;
+
+ protected String testOutputDirectory;
+
+ protected String resourcesDirectory;
+
+ protected String testResourcesDirectory;
+
+ protected String targetResourceDirectory;
+
+ protected String targetTestResourcesDirectory;
+
+ protected ArrayList targetClassesList;
+
+ protected ArrayList sourceFileList;
+
+ protected ArrayList resourcesFileList;
+
+ protected ArrayList rootFileList;
+
+ protected ArrayList directoryList;
+
+ protected HashMap dataMap;
+
+ public MavenProjectBuildStub( String key )
+ throws Exception
+ {
+ super( key );
+
+ build = new Build();
+ resourcesFileList = new ArrayList();
+ sourceFileList = new ArrayList();
+ rootFileList = new ArrayList();
+ directoryList = new ArrayList();
+ targetClassesList = new ArrayList();
+ dataMap = new HashMap();
+ setupBuild();
+ }
+
+ public void addDirectory( String name )
+ {
+ if ( isValidPath( name ) )
+ {
+ directoryList.add( name );
+ }
+ }
+
+ public void setOutputDirectory( String dir )
+ {
+ outputDirectory = buildDirectory + "/" + dir;
+ build.setOutputDirectory( outputDirectory );
+ }
+
+ public void addFile( String name, int type )
+ {
+ if ( isValidPath( name ) )
+ {
+ List list = getList( type );
+
+ list.add( name );
+ }
+ }
+
+ public void addFile( String name, String data, int type )
+ {
+ File fileName = new File( name );
+
+ addFile( name, type );
+ dataMap.put( fileName.getName(), data );
+ }
+
+ public String getOutputDirectory()
+ {
+ return outputDirectory;
+ }
+
+ public String getTestOutputDirectory()
+ {
+ return testOutputDirectory;
+ }
+
+ public String getResourcesDirectory()
+ {
+ return resourcesDirectory;
+ }
+
+ public String getTestResourcesDirectory()
+ {
+ return testResourcesDirectory;
+ }
+
+ public Build getBuild()
+ {
+ return build;
+ }
+
+ /**
+ * returns true if the path is relative
+ * and false if absolute
+ * also returns false if it is relative to
+ * the parent
+ *
+ * @param path
+ * @return
+ */
+ private boolean isValidPath( String path )
+ {
+ boolean bRetVal = true;
+
+ if ( path.startsWith( "c:" ) || path.startsWith( ".." ) || path.startsWith( "/" ) || path.startsWith( "\\" ) )
+ {
+ bRetVal = false;
+ }
+
+ return bRetVal;
+ }
+
+ private void setupBuild()
+ {
+ // check getBasedir method for the exact path
+ // we need to recreate the dir structure in
+ // an isolated environment
+ srcDirectory = testRootDir + "/src";
+ buildDirectory = testRootDir + "/target";
+ outputDirectory = buildDirectory + "/classes";
+ testOutputDirectory = buildDirectory + "/test-classes";
+ resourcesDirectory = srcDirectory + "/main/resources/";
+ testResourcesDirectory = srcDirectory + "/test/resources/";
+
+ build.setDirectory( buildDirectory );
+ build.setOutputDirectory( outputDirectory );
+ build.setTestOutputDirectory( testOutputDirectory );
+ }
+
+ public void setupBuildEnvironment()
+ throws Exception
+ {
+ // populate dummy resources and dummy test resources
+
+ // setup src dir
+ if ( !FileUtils.fileExists( resourcesDirectory ) )
+ {
+ FileUtils.mkdir( resourcesDirectory );
+ }
+
+ if ( !FileUtils.fileExists( testResourcesDirectory ) )
+ {
+ FileUtils.mkdir( testResourcesDirectory );
+ }
+
+ createDirectories( resourcesDirectory, testResourcesDirectory );
+ createFiles( resourcesDirectory, testResourcesDirectory );
+ setupRootFiles();
+
+ // setup target dir
+ if ( !FileUtils.fileExists( outputDirectory ) )
+ {
+ FileUtils.mkdir( outputDirectory );
+ }
+
+ if ( !FileUtils.fileExists( testOutputDirectory ) )
+ {
+ FileUtils.mkdir( testOutputDirectory );
+ }
+
+ setupTargetFiles();
+ }
+
+ private void createDirectories( String parent, String testparent )
+ {
+ File currentDirectory;
+
+ for ( int nIndex = 0; nIndex < directoryList.size(); nIndex++ )
+ {
+ currentDirectory = new File( parent, "/" + (String) directoryList.get( nIndex ) );
+
+ if ( !currentDirectory.exists() )
+ {
+ currentDirectory.mkdirs();
+ }
+
+ // duplicate dir structure in test resources
+ currentDirectory = new File( testparent, "/" + (String) directoryList.get( nIndex ) );
+
+ if ( !currentDirectory.exists() )
+ {
+ currentDirectory.mkdirs();
+ }
+ }
+ }
+
+ private List getList( int type )
+ {
+ ArrayList retVal = null;
+
+ switch ( type )
+ {
+ case SOURCE_FILE :
+ retVal = sourceFileList;
+ break;
+ case OUTPUT_FILE :
+ retVal = targetClassesList;
+ break;
+ case RESOURCES_FILE :
+ retVal = resourcesFileList;
+ break;
+ case ROOT_FILE :
+ retVal = rootFileList;
+ break;
+ }
+
+ return retVal;
+ }
+
+ private void createFiles( String parent, int type )
+ {
+ File currentFile;
+ ArrayList list = (ArrayList) getList( type );
+
+ // guard
+ if ( list == null )
+ {
+ return;
+ }
+
+ for ( int nIndex = 0; nIndex < list.size(); nIndex++ )
+ {
+ currentFile = new File( parent, (String) list.get( nIndex ) );
+
+ // create the necessary parent directories
+ // before we create the files
+ if ( !currentFile.getParentFile().exists() )
+ {
+ currentFile.getParentFile().mkdirs();
+ }
+
+ if ( !currentFile.exists() )
+ {
+ try
+ {
+ currentFile.createNewFile();
+ populateFile( currentFile, RESOURCES_FILE );
+ }
+ catch ( IOException io )
+ {
+ //TODO: handle exception
+ }
+ }
+ }
+ }
+
+ private void setupRootFiles()
+ {
+ createFiles( testRootDir, ROOT_FILE );
+ }
+
+ private void setupTargetFiles()
+ {
+ createFiles( getOutputDirectory(), OUTPUT_FILE );
+ }
+
+ private void createFiles( String parent, String testparent )
+ {
+ createFiles( parent, RESOURCES_FILE );
+ createFiles( testparent, RESOURCES_FILE );
+ }
+
+ private void populateFile( File file, int type )
+ {
+ FileOutputStream outputStream;
+ String data = (String) dataMap.get( file.getName() );
+
+ if ( ( data != null ) && file.exists() )
+ {
+ try
+ {
+ outputStream = new FileOutputStream( file );
+ outputStream.write( data.getBytes() );
+ outputStream.flush();
+ outputStream.close();
+ }
+ catch ( IOException ex )
+ {
+ // TODO: handle exception here
+ }
+ }
+ }
+}
Propchange: maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/stub/MavenProjectBuildStub.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/stub/MavenProjectBuildStub.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/stub/MavenProjectResourcesStub.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/stub/MavenProjectResourcesStub.java?view=auto&rev=512932
==============================================================================
--- maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/stub/MavenProjectResourcesStub.java (added)
+++ maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/stub/MavenProjectResourcesStub.java Wed Feb 28 11:49:08 2007
@@ -0,0 +1,115 @@
+package org.apache.maven.plugin.resources.remote.stub;
+
+/*
+ * 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 org.apache.maven.model.Resource;
+
+
+/**
+ * Stub
+ */
+public class MavenProjectResourcesStub
+ extends MavenProjectBuildStub
+{
+
+ public MavenProjectResourcesStub( String id )
+ throws Exception
+ {
+ super( id );
+ setupResources();
+ setupTestResources();
+ }
+
+ public void addInclude( String pattern )
+ {
+ ( (Resource) build.getResources().get( 0 ) ).addInclude( pattern );
+ }
+
+ public void addExclude( String pattern )
+ {
+ ( (Resource) build.getResources().get( 0 ) ).addExclude( pattern );
+ }
+
+ public void addTestInclude( String pattern )
+ {
+ ( (Resource) build.getTestResources().get( 0 ) ).addInclude( pattern );
+ }
+
+ public void addTestExclude( String pattern )
+ {
+ ( (Resource) build.getTestResources().get( 0 ) ).addExclude( pattern );
+ }
+
+ public void setTargetPath( String path )
+ {
+ ( (Resource) build.getResources().get( 0 ) ).setTargetPath( path );
+ }
+
+ public void setTestTargetPath( String path )
+ {
+ ( (Resource) build.getTestResources().get( 0 ) ).setTargetPath( path );
+ }
+
+ public void setDirectory( String dir )
+ {
+ ( (Resource) build.getResources().get( 0 ) ).setDirectory( dir );
+ }
+
+ public void setTestDirectory( String dir )
+ {
+ ( (Resource) build.getTestResources().get( 0 ) ).setDirectory( dir );
+ }
+
+ public void setResourceFiltering( int nIndex, boolean filter )
+ {
+ if ( build.getResources().size() > nIndex )
+ {
+ ( (Resource) build.getResources().get( nIndex ) ).setFiltering( filter );
+ }
+ }
+
+ private void setupResources()
+ {
+ Resource resource = new Resource();
+
+ // see MavenProjectBasicStub for details
+ // of getBasedir
+
+ // setup default resources
+ resource.setDirectory( getBasedir().getPath() + "/src/main/resources" );
+ resource.setFiltering( false );
+ resource.setTargetPath( null );
+ build.addResource( resource );
+ }
+
+ private void setupTestResources()
+ {
+ Resource resource = new Resource();
+
+ // see MavenProjectBasicStub for details
+ // of getBasedir
+
+ // setup default test resources
+ resource.setDirectory( getBasedir().getPath() + "/src/test/resources" );
+ resource.setFiltering( false );
+ resource.setTargetPath( null );
+ build.addTestResource( resource );
+ }
+}
Propchange: maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/stub/MavenProjectResourcesStub.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/stub/MavenProjectResourcesStub.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/stub/ModelStub.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/stub/ModelStub.java?view=auto&rev=512932
==============================================================================
--- maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/stub/ModelStub.java (added)
+++ maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/stub/ModelStub.java Wed Feb 28 11:49:08 2007
@@ -0,0 +1,90 @@
+package org.apache.maven.plugin.resources.remote.stub;
+
+/*
+ * 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.util.LinkedList;
+import java.util.List;
+import java.util.Properties;
+
+import org.apache.maven.model.Model;
+import org.apache.maven.model.Parent;
+
+/**
+ * Stub
+ */
+public class ModelStub
+ extends Model
+{
+ public ModelStub()
+ {
+
+ }
+
+ public String getVersion()
+ {
+ return "0.0-TEST";
+ }
+
+ public String getModelVersion()
+ {
+ return "0.0-TEST";
+ }
+
+ public String getName()
+ {
+ return "Test Model";
+ }
+
+ public String getGroupId()
+ {
+ return "org.apache.maven.test";
+ }
+
+ public String getPackaging()
+ {
+ return "jar";
+ }
+
+ public Parent getParent()
+ {
+ //return new Parent();
+ return null;
+ }
+
+ public String getArtifactId()
+ {
+ return "maven-test-plugin";
+ }
+
+ public Properties getProperties()
+ {
+ return new Properties();
+ }
+
+ public List getPackages()
+ {
+ return new LinkedList();
+ }
+
+ public List getProfiles()
+ {
+ return new LinkedList();
+ }
+}
Propchange: maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/stub/ModelStub.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-remote-resources-plugin/src/test/java/org/apache/maven/plugin/resources/remote/stub/ModelStub.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: maven/plugins/trunk/maven-remote-resources-plugin/src/test/resources/FILTER.txt.vm
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-remote-resources-plugin/src/test/resources/FILTER.txt.vm?view=auto&rev=512932
==============================================================================
--- maven/plugins/trunk/maven-remote-resources-plugin/src/test/resources/FILTER.txt.vm (added)
+++ maven/plugins/trunk/maven-remote-resources-plugin/src/test/resources/FILTER.txt.vm Wed Feb 28 11:49:08 2007
@@ -0,0 +1,3 @@
+Some filtered text:
+${project.name}
+${projectTimespan}
Added: maven/plugins/trunk/maven-remote-resources-plugin/src/test/resources/SIMPLE.txt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-remote-resources-plugin/src/test/resources/SIMPLE.txt?view=auto&rev=512932
==============================================================================
--- maven/plugins/trunk/maven-remote-resources-plugin/src/test/resources/SIMPLE.txt (added)
+++ maven/plugins/trunk/maven-remote-resources-plugin/src/test/resources/SIMPLE.txt Wed Feb 28 11:49:08 2007
@@ -0,0 +1 @@
+Simple Text File
Propchange: maven/plugins/trunk/maven-remote-resources-plugin/src/test/resources/SIMPLE.txt
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-remote-resources-plugin/src/test/resources/SIMPLE.txt
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: maven/plugins/trunk/maven-remote-resources-plugin/src/test/resources/unit/rrmojotest/bundle-plugin-config.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-remote-resources-plugin/src/test/resources/unit/rrmojotest/bundle-plugin-config.xml?view=auto&rev=512932
==============================================================================
--- maven/plugins/trunk/maven-remote-resources-plugin/src/test/resources/unit/rrmojotest/bundle-plugin-config.xml (added)
+++ maven/plugins/trunk/maven-remote-resources-plugin/src/test/resources/unit/rrmojotest/bundle-plugin-config.xml Wed Feb 28 11:49:08 2007
@@ -0,0 +1,31 @@
+<!--
+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>
+ <name>remote-resources-plugin-test</name>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-remote-resources-plugin</artifactId>
+ <configuration>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Propchange: maven/plugins/trunk/maven-remote-resources-plugin/src/test/resources/unit/rrmojotest/bundle-plugin-config.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-remote-resources-plugin/src/test/resources/unit/rrmojotest/bundle-plugin-config.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: maven/plugins/trunk/maven-remote-resources-plugin/src/test/resources/unit/rrmojotest/bundle-plugin-config.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: maven/plugins/trunk/maven-remote-resources-plugin/src/test/resources/unit/rrmojotest/process-plugin-config.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-remote-resources-plugin/src/test/resources/unit/rrmojotest/process-plugin-config.xml?view=auto&rev=512932
==============================================================================
--- maven/plugins/trunk/maven-remote-resources-plugin/src/test/resources/unit/rrmojotest/process-plugin-config.xml (added)
+++ maven/plugins/trunk/maven-remote-resources-plugin/src/test/resources/unit/rrmojotest/process-plugin-config.xml Wed Feb 28 11:49:08 2007
@@ -0,0 +1,32 @@
+<!--
+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>
+ <name>remote-resources-plugin-test</name>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-remote-resources-plugin</artifactId>
+ <configuration>
+ <localRepository>${localRepository}</localRepository>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Propchange: maven/plugins/trunk/maven-remote-resources-plugin/src/test/resources/unit/rrmojotest/process-plugin-config.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-remote-resources-plugin/src/test/resources/unit/rrmojotest/process-plugin-config.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: maven/plugins/trunk/maven-remote-resources-plugin/src/test/resources/unit/rrmojotest/process-plugin-config.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml