You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by oc...@apache.org on 2007/04/03 14:05:22 UTC
svn commit: r525146 - in /maven/plugins/trunk/maven-source-plugin: ./
src/main/java/org/apache/maven/plugin/source/
src/test/java/org/apache/maven/plugin/source/
src/test/java/org/apache/maven/plugin/source/stubs/
src/test/resources/projects/ src/test/...
Author: oching
Date: Tue Apr 3 05:05:19 2007
New Revision: 525146
URL: http://svn.apache.org/viewvc?view=rev&rev=525146
Log:
MSOURCES-14 Applied patch for the tests (submitted by Jochen Wiedmann) and refactored some to use the MavenProjectStubs in separate classes for each test. Also removed some of the parameters and methods in the AbstractPluginTestCase that were no longer used.
Added:
maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/stubs/
maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/stubs/Project001Stub.java
maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/stubs/Project003Stub.java
maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/stubs/Project005Stub.java
maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/stubs/Project007Stub.java
maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/stubs/SourcePluginArtifactStub.java
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/pom.xml
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/src/
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/src/main/
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/src/main/java/
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/src/main/java/foo/
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/src/main/java/foo/project001/
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/src/main/java/foo/project001/App.java
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/src/main/resources/
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/src/main/resources/.cvsignore
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/src/main/resources/default-configuration.properties
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/src/test/
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/src/test/java/
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/src/test/java/foo/
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/src/test/java/foo/project001/
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/src/test/java/foo/project001/AppTest.java
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/src/test/resources/
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/src/test/resources/.cvsignore
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/src/test/resources/test-default-configuration.properties
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/pom.xml
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/src/
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/src/main/
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/src/main/java/
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/src/main/java/foo/
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/src/main/java/foo/project003/
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/src/main/java/foo/project003/App.java
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/src/main/resources/
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/src/main/resources/default-configuration.properties
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/src/main/resources/excluded-file.txt
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/src/test/
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/src/test/java/
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/src/test/java/foo/
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/src/test/java/foo/project003/
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/src/test/java/foo/project003/AppTest.java
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/src/test/resources/
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/src/test/resources/excluded-file.txt
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/src/test/resources/test-default-configuration.properties
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-005/
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-005/pom.xml
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-007/
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-007/pom.xml
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-007/src/
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-007/src/main/
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-007/src/main/java/
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-007/src/main/java/foo/
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-007/src/main/java/foo/project007/
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-007/src/main/java/foo/project007/App.java
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-007/src/main/resources/
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-007/src/main/resources/default-configuration.properties
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-007/src/main/resources/templates/
maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-007/src/main/resources/templates/configuration-template.properties
Removed:
maven/plugins/trunk/maven-source-plugin/src/test/resources/projects/
Modified:
maven/plugins/trunk/maven-source-plugin/pom.xml
maven/plugins/trunk/maven-source-plugin/src/main/java/org/apache/maven/plugin/source/AbstractSourceJarMojo.java
maven/plugins/trunk/maven-source-plugin/src/main/java/org/apache/maven/plugin/source/AggregatorSourceJarMojo.java
maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/AbstractSourcePluginTestCase.java
maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/SourceJarMojoTest.java
maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/TestSourceJarMojoTest.java
Modified: maven/plugins/trunk/maven-source-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/pom.xml?view=diff&rev=525146&r1=525145&r2=525146
==============================================================================
--- maven/plugins/trunk/maven-source-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-source-plugin/pom.xml Tue Apr 3 05:05:19 2007
@@ -57,9 +57,8 @@
</dependency>
<dependency>
<groupId>org.apache.maven.shared</groupId>
- <artifactId>maven-verifier</artifactId>
- <version>1.0</version>
- <scope>test</scope>
+ <artifactId>maven-plugin-testing-harness</artifactId>
+ <version>1.0-beta-2-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
Modified: maven/plugins/trunk/maven-source-plugin/src/main/java/org/apache/maven/plugin/source/AbstractSourceJarMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/main/java/org/apache/maven/plugin/source/AbstractSourceJarMojo.java?view=diff&rev=525146&r1=525145&r2=525146
==============================================================================
--- maven/plugins/trunk/maven-source-plugin/src/main/java/org/apache/maven/plugin/source/AbstractSourceJarMojo.java (original)
+++ maven/plugins/trunk/maven-source-plugin/src/main/java/org/apache/maven/plugin/source/AbstractSourceJarMojo.java Tue Apr 3 05:05:19 2007
@@ -54,7 +54,9 @@
*/
private boolean attach;
- /** @component */
+ /**
+ * @component
+ */
private MavenProjectHelper projectHelper;
/**
@@ -79,7 +81,9 @@
*/
protected String finalName;
- /** @parameter expression="${reactorProjects}" */
+ /**
+ * @parameter expression="${reactorProjects}"
+ */
protected List reactorProjects;
protected abstract String getClassifier();
@@ -88,7 +92,9 @@
protected abstract List getResources( MavenProject project );
- /** @see org.apache.maven.plugin.AbstractMojo#execute() */
+ /**
+ * @see org.apache.maven.plugin.AbstractMojo#execute()
+ */
public void execute()
throws MojoExecutionException
{
@@ -157,8 +163,7 @@
}
}
- protected void archiveProjectContent( MavenProject project,
- Archiver archiver )
+ protected void archiveProjectContent( MavenProject project, Archiver archiver )
throws MojoExecutionException
{
for ( Iterator i = getSources( project ).iterator(); i.hasNext(); )
@@ -219,8 +224,7 @@
* @param outputFile the artifact file to be attached
* @param classifier
*/
- protected void attachArtifact( File outputFile,
- String classifier )
+ protected void attachArtifact( File outputFile, String classifier )
{
}
@@ -247,10 +251,7 @@
return archiver;
}
- protected void addDirectory( Archiver archiver,
- File sourceDirectory,
- String[] includes,
- String[] excludes )
+ protected void addDirectory( Archiver archiver, File sourceDirectory, String[] includes, String[] excludes )
throws MojoExecutionException
{
try
Modified: maven/plugins/trunk/maven-source-plugin/src/main/java/org/apache/maven/plugin/source/AggregatorSourceJarMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/main/java/org/apache/maven/plugin/source/AggregatorSourceJarMojo.java?view=diff&rev=525146&r1=525145&r2=525146
==============================================================================
--- maven/plugins/trunk/maven-source-plugin/src/main/java/org/apache/maven/plugin/source/AggregatorSourceJarMojo.java (original)
+++ maven/plugins/trunk/maven-source-plugin/src/main/java/org/apache/maven/plugin/source/AggregatorSourceJarMojo.java Tue Apr 3 05:05:19 2007
@@ -13,7 +13,9 @@
public class AggregatorSourceJarMojo
extends SourceJarMojo
{
- /** @see org.apache.maven.plugin.AbstractMojo#execute() */
+ /**
+ * @see org.apache.maven.plugin.AbstractMojo#execute()
+ */
public void execute()
throws MojoExecutionException
{
Modified: maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/AbstractSourcePluginTestCase.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/AbstractSourcePluginTestCase.java?view=diff&rev=525146&r1=525145&r2=525146
==============================================================================
--- maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/AbstractSourcePluginTestCase.java (original)
+++ maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/AbstractSourcePluginTestCase.java Tue Apr 3 05:05:19 2007
@@ -1,110 +1,75 @@
package org.apache.maven.plugin.source;
-import junit.framework.TestCase;
-
import java.io.File;
+import java.io.FileReader;
import java.io.IOException;
import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
import java.util.Enumeration;
+import java.util.Iterator;
+import java.util.List;
import java.util.Properties;
import java.util.Set;
import java.util.TreeSet;
import java.util.zip.ZipEntry;
-import org.apache.maven.it.Verifier;
-import org.apache.maven.it.VerificationException;
-import org.apache.maven.it.util.ResourceExtractor;
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.factory.ArtifactFactory;
+import org.apache.maven.model.Build;
+import org.apache.maven.model.Model;
+import org.apache.maven.model.Resource;
+import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
+import org.apache.maven.plugin.testing.AbstractMojoTestCase;
+import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
import org.codehaus.plexus.archiver.zip.ZipFile;
/*
- * 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.
- */
+* 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.
+*/
/**
* @author Stephane Nicoll
*/
public abstract class AbstractSourcePluginTestCase
- extends TestCase
+ extends AbstractMojoTestCase
{
protected final String FINAL_NAME_PREFIX = "maven-source-plugin-test-";
protected final String FINAL_NAME_SUFFIX = "-99.0";
- /**
- * The base directory.
- */
- private File basedir;
+ protected abstract String getGoal();
/**
* Execute the souce plugin for the specified project.
*
- * @param projectName the name of the project
- * @param properties extra properties to be used by the embedder
- * @param expectNoError whether an exception is expected or not
- * @return the base directory of the project
- * @throws Exception if an error occured
- */
- protected File executeMojo( final String projectName, final Properties properties, boolean expectNoError )
- throws Exception
- {
- File testDir = getTestDir( projectName );
- Verifier verifier = new Verifier( testDir.getAbsolutePath() );
-
- // Turn On debug logs
- //verifier.getCliOptions().add( "-X" );
-
- // On linux and macOSX, an exception is thrown if a build failure occurs underneath
- try
- {
- verifier.executeGoal( "package" );
- }
- catch ( VerificationException e )
- {
- //@TODO needs to be handled nicely in the verifier
- if ( expectNoError || e.getMessage().indexOf( "Exit code was non-zero" ) == -1 )
- {
- throw e;
- }
- }
-
- // If no error is expected make sure that error logs are free
- if ( expectNoError )
- {
- verifier.verifyErrorFreeLog();
- }
- verifier.resetStreams();
- return testDir;
- }
-
-
- /**
- * Execute the source plugin for the specified project.
- *
* @param projectName the name of the project
- * @param properties extra properties to be used by the embedder
* @return the base directory of the project
* @throws Exception if an error occured
*/
- protected File executeMojo( final String projectName, final Properties properties )
+ protected void executeMojo( final String projectName )
throws Exception
{
- return executeMojo( projectName, properties, true );
+ File testPom = new File( getBasedir(), getTestDir( projectName ) + "/pom.xml" );
+ AbstractSourceJarMojo mojo = (AbstractSourceJarMojo) lookupMojo( getGoal(), testPom );
+
+ mojo.execute();
}
/**
@@ -123,21 +88,22 @@
final String[] expectedTestSourceFiles )
throws Exception
{
- final File baseDir = executeMojo( projectName, new Properties() );
+ executeMojo( projectName );
+ final File testTargetDir = getTestTargetDir( projectName );
if ( expectSourceArchive )
{
- assertSourceArchive( baseDir, projectName );
- assertJarContent( getSourceArchive( baseDir, projectName ), expectedSourceFiles );
+ assertSourceArchive( testTargetDir, projectName );
+ assertJarContent( getSourceArchive( testTargetDir, projectName ), expectedSourceFiles );
}
if ( expectTestSourceArchive )
{
- assertTestSourceArchive( baseDir, projectName );
- assertJarContent( getTestSourceArchive( baseDir, projectName ), expectedTestSourceFiles );
+ assertTestSourceArchive( testTargetDir, projectName );
+ assertJarContent( getTestSourceArchive( testTargetDir, projectName ), expectedTestSourceFiles );
}
- return baseDir;
+ return testTargetDir;
}
/**
@@ -170,31 +136,27 @@
}
- protected void assertSourceArchive( final File baseDir, final String projectName )
+ protected void assertSourceArchive( final File testTargetDir, final String projectName )
{
- final File expectedFile = getSourceArchive( baseDir, projectName );
- assertTrue( "Source archive does not exist["+expectedFile.getAbsolutePath()+"]", expectedFile.exists() );
+ final File expectedFile = getSourceArchive( testTargetDir, projectName );
+ assertTrue( "Source archive does not exist[" + expectedFile.getAbsolutePath() + "]", expectedFile.exists() );
}
- protected void assertTestSourceArchive( final File baseDir, final String projectName )
+ protected void assertTestSourceArchive( final File testTargetDir, final String projectName )
{
- final File expectedFile = getTestSourceArchive( baseDir, projectName );
- assertTrue( "Test source archive does not exist["+expectedFile.getAbsolutePath()+"]", expectedFile.exists() );
+ final File expectedFile = getTestSourceArchive( testTargetDir, projectName );
+ assertTrue( "Test source archive does not exist[" + expectedFile.getAbsolutePath() + "]",
+ expectedFile.exists() );
}
- protected File getTargetDirectory( final File basedir )
+ protected File getSourceArchive( final File testTargetDir, final String projectName )
{
- return new File( basedir, "target" );
+ return new File( testTargetDir, buildFinalSourceName( projectName ) + ".jar" );
}
- protected File getSourceArchive( final File baseDir, final String projectName )
+ protected File getTestSourceArchive( final File testTargetDir, final String projectName )
{
- return new File( getTargetDirectory( baseDir ), buildFinalSourceName( projectName ) + ".jar" );
- }
-
- protected File getTestSourceArchive( final File baseDir, final String projectName )
- {
- return new File( getTargetDirectory( baseDir ), buildFinalTestSourceName( projectName ) + ".jar" );
+ return new File( testTargetDir, buildFinalTestSourceName( projectName ) + ".jar" );
}
protected String buildFinalSourceName( final String projectName )
@@ -210,26 +172,12 @@
protected File getTestDir( String projectName )
throws IOException
{
- return ResourceExtractor.simpleExtractResources( getClass(), "/projects/" + projectName );
- }
-
- protected File getBasedir()
- {
- if ( basedir != null )
- {
- return basedir;
- }
-
- final String basedirString = System.getProperty( "basedir" );
- if ( basedirString == null )
- {
- basedir = new File( "" );
- }
- else
+ File f = new File( "target/test-classes/unit/" + projectName );
+ if ( !new File( f, "pom.xml" ).exists() )
{
- basedir = new File( basedirString );
+ throw new IllegalStateException( "No pom file found in " + f.getPath() );
}
- return basedir;
+ return f;
}
protected void assertJarContent( final File jarFile, final String[] expectedFiles )
@@ -257,5 +205,10 @@
assertTrue( "Missing entries " + expected.toString() + " in " + jarFile, expected.isEmpty() );
}
+ }
+
+ protected File getTestTargetDir( String projectName )
+ {
+ return new File( getBasedir(), "target/test/unit/" + projectName + "/target" );
}
}
Modified: maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/SourceJarMojoTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/SourceJarMojoTest.java?view=diff&rev=525146&r1=525145&r2=525146
==============================================================================
--- maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/SourceJarMojoTest.java (original)
+++ maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/SourceJarMojoTest.java Tue Apr 3 05:05:19 2007
@@ -29,17 +29,20 @@
extends AbstractSourcePluginTestCase
{
+ protected String getGoal()
+ {
+ return "jar";
+ }
- public void testProject001()
+ public void testDefaultConfiguration()
throws Exception
{
doTestProjectWithSourceArchive( "project-001", new String[]{"default-configuration.properties",
- "foo/project001/App.java", "foo/project001/", "foo/", "META-INF/MANIFEST.MF", "META-INF/"
-
- } );
+ "foo/project001/App.java", "foo/project001/", "foo/", "META-INF/MANIFEST.MF", "META-INF/"} );
}
- public void testProject003()
+
+ public void testExcludes()
throws Exception
{
doTestProjectWithSourceArchive( "project-003", new String[]{"default-configuration.properties",
@@ -48,18 +51,18 @@
} );
}
- public void testProject005()
+
+ public void testNoSources()
throws Exception
{
- final File baseDir = executeMojo( "project-005", new Properties() );
+ executeMojo( "project-005" );
// Now make sure that no archive got created
- final File expectedFile = getSourceArchive( baseDir, "project-005" );
+ final File expectedFile = getTestTargetDir( "project-005" );
assertFalse( "Source archive should not have been created[" + expectedFile.getAbsolutePath() + "]",
expectedFile.exists() );
-
}
- public void testProject007()
+ public void testIncludes()
throws Exception
{
doTestProjectWithSourceArchive( "project-007", new String[]{"templates/configuration-template.properties",
Modified: maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/TestSourceJarMojoTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/TestSourceJarMojoTest.java?view=diff&rev=525146&r1=525145&r2=525146
==============================================================================
--- maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/TestSourceJarMojoTest.java (original)
+++ maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/TestSourceJarMojoTest.java Tue Apr 3 05:05:19 2007
@@ -20,7 +20,6 @@
*/
import java.io.File;
-import java.util.Properties;
/**
* @author <a href="mailto:oching@exist.com">Maria Odea Ching</a>
@@ -29,33 +28,41 @@
extends AbstractSourcePluginTestCase
{
- public void testProject002()
+ protected String getGoal()
+ {
+ return "test-jar";
+ }
+
+
+ public void testDefaultConfiguration()
throws Exception
{
- doTestProjectWithTestSourceArchive( "project-002", new String[]{"test-default-configuration.properties",
- "foo/project002/AppTest.java", "foo/project002/", "foo/", "META-INF/MANIFEST.MF", "META-INF/"
+ doTestProjectWithTestSourceArchive( "project-001", new String[]{"test-default-configuration.properties",
+ "foo/project001/AppTest.java", "foo/project001/", "foo/", "META-INF/MANIFEST.MF", "META-INF/"
} );
}
- public void testProject004()
+
+ public void testExcludes()
throws Exception
{
- doTestProjectWithTestSourceArchive( "project-004", new String[]{"test-default-configuration.properties",
- "foo/project004/AppTest.java", "foo/project004/", "foo/", "META-INF/MANIFEST.MF", "META-INF/"
+ doTestProjectWithTestSourceArchive( "project-003", new String[]{"test-default-configuration.properties",
+ "foo/project003/AppTest.java", "foo/project003/", "foo/", "META-INF/MANIFEST.MF", "META-INF/"
} );
}
- public void testProject006()
+
+ public void testNoSources()
throws Exception
{
- final File baseDir = executeMojo( "project-006", new Properties() );
+ executeMojo( "project-005" );
+
// Now make sure that no archive got created
- final File expectedFile = getTestSourceArchive( baseDir, "project-006" );
+ final File expectedFile = getTestTargetDir( "project-005" );
assertFalse( "Test source archive should not have been created[" + expectedFile.getAbsolutePath() + "]",
expectedFile.exists() );
-
}
}
Added: maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/stubs/Project001Stub.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/stubs/Project001Stub.java?view=auto&rev=525146
==============================================================================
--- maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/stubs/Project001Stub.java (added)
+++ maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/stubs/Project001Stub.java Tue Apr 3 05:05:19 2007
@@ -0,0 +1,123 @@
+package org.apache.maven.plugin.source.stubs;
+
+/*
+ * 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.plugin.testing.stubs.MavenProjectStub;
+import org.apache.maven.plugin.testing.stubs.ArtifactStub;
+import org.apache.maven.model.Build;
+import org.apache.maven.model.Model;
+import org.apache.maven.model.Resource;
+import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
+import org.apache.maven.artifact.Artifact;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.io.FileReader;
+import java.io.File;
+
+/**
+ * @author <a href="mailto:oching@exist.com">Maria Odea Ching</a>
+ */
+public class Project001Stub
+ extends MavenProjectStub
+{
+ private Build build;
+
+ private List resources;
+
+ private List testResources;
+
+ public Project001Stub()
+ {
+ MavenXpp3Reader pomReader = new MavenXpp3Reader();
+ Model model;
+
+ try
+ {
+ model = pomReader.read(
+ new FileReader( new File( getBasedir() + "/target/test-classes/unit/project-001/pom.xml" ) ) );
+ setModel( model );
+
+ setGroupId( model.getGroupId() );
+ setArtifactId( model.getArtifactId() );
+ setVersion( model.getVersion() );
+ setName( model.getName() );
+ setUrl( model.getUrl() );
+ setPackaging( model.getPackaging() );
+
+ Build build = new Build();
+ build.setFinalName( getArtifactId() + "-" + getVersion() );
+ build.setDirectory( getBasedir() + "/target/test/unit/project-001/target" );
+ setBuild( build );
+
+ String basedir = getBasedir().getAbsolutePath();
+ List compileSourceRoots = new ArrayList();
+ compileSourceRoots.add( basedir + "/target/test-classes/unit/project-001/src/main/java" );
+ setCompileSourceRoots( compileSourceRoots );
+
+ List testCompileSourceRoots = new ArrayList();
+ testCompileSourceRoots.add( basedir + "/target/test-classes/unit/project-001/src/test/java" );
+ setTestCompileSourceRoots( testCompileSourceRoots );
+
+ setResources( model.getBuild().getResources() );
+ setTestResources( model.getBuild().getTestResources() );
+
+ Artifact artifact =
+ new SourcePluginArtifactStub( getGroupId(), getArtifactId(), getVersion(), getPackaging(), null );
+ setArtifact( artifact );
+
+ }
+ catch ( Exception e )
+ {
+ e.printStackTrace();
+ }
+ }
+
+ public Build getBuild()
+ {
+ return build;
+ }
+
+ public void setBuild( Build build )
+ {
+ this.build = build;
+ }
+
+ public List getResources()
+ {
+ return resources;
+ }
+
+ public void setResources( List resources )
+ {
+ this.resources = resources;
+ }
+
+ public List getTestResources()
+ {
+ return testResources;
+ }
+
+ public void setTestResources( List testResources )
+ {
+ this.testResources = testResources;
+ }
+}
Added: maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/stubs/Project003Stub.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/stubs/Project003Stub.java?view=auto&rev=525146
==============================================================================
--- maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/stubs/Project003Stub.java (added)
+++ maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/stubs/Project003Stub.java Tue Apr 3 05:05:19 2007
@@ -0,0 +1,124 @@
+package org.apache.maven.plugin.source.stubs;
+
+/*
+ * 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.plugin.testing.stubs.MavenProjectStub;
+import org.apache.maven.model.Build;
+import org.apache.maven.model.Model;
+import org.apache.maven.model.Resource;
+import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
+import org.apache.maven.artifact.Artifact;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.io.FileReader;
+import java.io.File;
+
+/**
+ * @author <a href="mailto:oching@exist.com">Maria Odea Ching</a>
+ */
+public class Project003Stub
+ extends MavenProjectStub
+{
+ private Build build;
+
+ private List resources;
+
+ private List testResources;
+
+ public Project003Stub()
+ {
+ MavenXpp3Reader pomReader = new MavenXpp3Reader();
+ Model model;
+
+ try
+ {
+ model = pomReader.read(
+ new FileReader( new File( getBasedir() + "/target/test-classes/unit/project-003/pom.xml" ) ) );
+ setModel( model );
+
+ setGroupId( model.getGroupId() );
+ setArtifactId( model.getArtifactId() );
+ setVersion( model.getVersion() );
+ setName( model.getName() );
+ setUrl( model.getUrl() );
+ setPackaging( model.getPackaging() );
+
+ Build build = new Build();
+ build.setFinalName( getArtifactId() + "-" + getVersion() );
+ build.setDirectory( getBasedir() + "/target/test/unit/project-003/target" );
+ setBuild( build );
+
+ String basedir = getBasedir().getAbsolutePath();
+ List compileSourceRoots = new ArrayList();
+ compileSourceRoots.add( basedir + "/target/test-classes/unit/project-003/src/main/java" );
+ setCompileSourceRoots( compileSourceRoots );
+
+ List testCompileSourceRoots = new ArrayList();
+ testCompileSourceRoots.add( basedir + "/target/test-classes/unit/project-003/src/test/java" );
+ setTestCompileSourceRoots( testCompileSourceRoots );
+
+ setResources( model.getBuild().getResources() );
+ setTestResources( model.getBuild().getTestResources() );
+
+ Artifact artifact =
+ new SourcePluginArtifactStub( getGroupId(), getArtifactId(), getVersion(), getPackaging(), null );
+ setArtifact( artifact );
+
+ }
+ catch ( Exception e )
+ {
+ e.printStackTrace();
+ }
+ }
+
+ public Build getBuild()
+ {
+ return build;
+ }
+
+ public void setBuild( Build build )
+ {
+ this.build = build;
+ }
+
+ public List getResources()
+ {
+ return resources;
+ }
+
+ public void setResources( List resources )
+ {
+ this.resources = resources;
+ }
+
+ public List getTestResources()
+ {
+ return testResources;
+ }
+
+ public void setTestResources( List testResources )
+ {
+ this.testResources = testResources;
+ }
+
+
+}
Added: maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/stubs/Project005Stub.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/stubs/Project005Stub.java?view=auto&rev=525146
==============================================================================
--- maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/stubs/Project005Stub.java (added)
+++ maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/stubs/Project005Stub.java Tue Apr 3 05:05:19 2007
@@ -0,0 +1,90 @@
+package org.apache.maven.plugin.source.stubs;
+
+import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
+import org.apache.maven.model.Build;
+import org.apache.maven.model.Model;
+import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
+import org.apache.maven.artifact.Artifact;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.io.FileReader;
+import java.io.File;
+
+/**
+ * @author <a href="mailto:oching@exist.com">Maria Odea Ching</a>
+ */
+public class Project005Stub
+ extends MavenProjectStub
+{
+ private Build build;
+
+ private List resources;
+
+ private List testResources;
+
+ public Project005Stub()
+ {
+ MavenXpp3Reader pomReader = new MavenXpp3Reader();
+ Model model;
+
+ try
+ {
+ model = pomReader.read(
+ new FileReader( new File( getBasedir() + "/target/test-classes/unit/project-005/pom.xml" ) ) );
+ setModel( model );
+
+ setGroupId( model.getGroupId() );
+ setArtifactId( model.getArtifactId() );
+ setVersion( model.getVersion() );
+ setName( model.getName() );
+ setUrl( model.getUrl() );
+ setPackaging( model.getPackaging() );
+
+ Build build = new Build();
+ build.setFinalName( getArtifactId() + "-" + getVersion() );
+ build.setDirectory( getBasedir() + "/target/test/unit/project-005/target" );
+ setBuild( build );
+
+ Artifact artifact =
+ new SourcePluginArtifactStub( getGroupId(), getArtifactId(), getVersion(), getPackaging(), null );
+ setArtifact( artifact );
+
+ }
+ catch ( Exception e )
+ {
+ e.printStackTrace();
+ }
+ }
+
+ public Build getBuild()
+ {
+ return build;
+ }
+
+ public void setBuild( Build build )
+ {
+ this.build = build;
+ }
+
+ public List getResources()
+ {
+ return resources;
+ }
+
+ public void setResources( List resources )
+ {
+ this.resources = resources;
+ }
+
+ public List getTestResources()
+ {
+ return testResources;
+ }
+
+ public void setTestResources( List testResources )
+ {
+ this.testResources = testResources;
+ }
+
+}
Added: maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/stubs/Project007Stub.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/stubs/Project007Stub.java?view=auto&rev=525146
==============================================================================
--- maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/stubs/Project007Stub.java (added)
+++ maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/stubs/Project007Stub.java Tue Apr 3 05:05:19 2007
@@ -0,0 +1,120 @@
+package org.apache.maven.plugin.source.stubs;
+
+/*
+ * 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.plugin.testing.stubs.MavenProjectStub;
+import org.apache.maven.model.Build;
+import org.apache.maven.model.Model;
+import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
+import org.apache.maven.artifact.Artifact;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.io.FileReader;
+import java.io.File;
+
+/**
+ * @author <a href="mailto:oching@exist.com">Maria Odea Ching</a>
+ */
+public class Project007Stub
+ extends MavenProjectStub
+{
+ private Build build;
+
+ private List resources;
+
+ private List testResources;
+
+ public Project007Stub()
+ {
+ MavenXpp3Reader pomReader = new MavenXpp3Reader();
+ Model model;
+
+ try
+ {
+ model = pomReader.read(
+ new FileReader( new File( getBasedir() + "/target/test-classes/unit/project-007/pom.xml" ) ) );
+ setModel( model );
+
+ setGroupId( model.getGroupId() );
+ setArtifactId( model.getArtifactId() );
+ setVersion( model.getVersion() );
+ setName( model.getName() );
+ setUrl( model.getUrl() );
+ setPackaging( model.getPackaging() );
+
+ Build build = new Build();
+ build.setFinalName( getArtifactId() + "-" + getVersion() );
+ build.setDirectory( getBasedir() + "/target/test/unit/project-007/target" );
+ setBuild( build );
+
+ String basedir = getBasedir().getAbsolutePath();
+ List compileSourceRoots = new ArrayList();
+ compileSourceRoots.add( basedir + "/target/test-classes/unit/project-007/src/main/java" );
+ setCompileSourceRoots( compileSourceRoots );
+
+ List testCompileSourceRoots = new ArrayList();
+ testCompileSourceRoots.add( basedir + "/target/test-classes/unit/project-007/src/test/java" );
+ setTestCompileSourceRoots( testCompileSourceRoots );
+
+ setResources( model.getBuild().getResources() );
+ setTestResources( model.getBuild().getTestResources() );
+
+ Artifact artifact =
+ new SourcePluginArtifactStub( getGroupId(), getArtifactId(), getVersion(), getPackaging(), null );
+ setArtifact( artifact );
+
+ }
+ catch ( Exception e )
+ {
+ e.printStackTrace();
+ }
+ }
+
+ public Build getBuild()
+ {
+ return build;
+ }
+
+ public void setBuild( Build build )
+ {
+ this.build = build;
+ }
+
+ public List getResources()
+ {
+ return resources;
+ }
+
+ public void setResources( List resources )
+ {
+ this.resources = resources;
+ }
+
+ public List getTestResources()
+ {
+ return testResources;
+ }
+
+ public void setTestResources( List testResources )
+ {
+ this.testResources = testResources;
+ }
+}
Added: maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/stubs/SourcePluginArtifactStub.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/stubs/SourcePluginArtifactStub.java?view=auto&rev=525146
==============================================================================
--- maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/stubs/SourcePluginArtifactStub.java (added)
+++ maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/stubs/SourcePluginArtifactStub.java Tue Apr 3 05:05:19 2007
@@ -0,0 +1,119 @@
+package org.apache.maven.plugin.source.stubs;
+
+/*
+ * 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.plugin.testing.stubs.ArtifactStub;
+
+/**
+ * @author <a href="mailto:oching@exist.com">Maria Odea Ching</a>
+ */
+public class SourcePluginArtifactStub
+ extends ArtifactStub
+{
+
+ private String groupId;
+
+ private String artifactId;
+
+ private String version;
+
+ private String type;
+
+ private String classifier;
+
+ public SourcePluginArtifactStub( String groupId, String artifactId, String version, String type, String classifier )
+ {
+ this.groupId = groupId;
+ this.artifactId = artifactId;
+ this.version = version;
+ this.type = type;
+ this.classifier = classifier;
+ }
+
+ public void setGroupId( String groupId )
+ {
+ this.groupId = groupId;
+ }
+
+ public String getGroupId()
+ {
+ return groupId;
+ }
+
+ public void setArtifactId( String artifactId )
+ {
+ this.artifactId = artifactId;
+ }
+
+ public String getArtifactId()
+ {
+ return artifactId;
+ }
+
+ public void setVersion( String version )
+ {
+ this.version = version;
+ }
+
+ public String getVersion()
+ {
+ return version;
+ }
+
+ public void setType( String packaging )
+ {
+ this.type = packaging;
+ }
+
+ public String getType()
+ {
+ return type;
+ }
+
+ public void setClassifier( String classifier )
+ {
+ this.classifier = classifier;
+ }
+
+ public String getClassifier()
+ {
+ return classifier;
+ }
+
+ public boolean hasClassifier()
+ {
+ return classifier != null;
+ }
+
+ public String getId()
+ {
+ String id = groupId + ":" + artifactId + ":" + type + ":";
+
+ if ( hasClassifier() )
+ {
+ id = id + getClassifier() + ":";
+ }
+
+ id = id + version;
+
+ return id;
+ }
+
+}
Added: maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/pom.xml?view=auto&rev=525146
==============================================================================
--- maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/pom.xml (added)
+++ maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/pom.xml Tue Apr 3 05:05:19 2007
@@ -0,0 +1,62 @@
+<?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>source</groupId>
+ <artifactId>maven-source-plugin-test-project-001</artifactId>
+ <version>99.0</version>
+ <name>Maven</name>
+ <packaging>jar</packaging>
+ <url>http://maven.apache.org</url>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <resources>
+ <resource>
+ <directory>target/test-classes/unit/project-001/src/main/resources</directory>
+ </resource>
+ </resources>
+ <testResources>
+ <testResource>
+ <directory>target/test-classes/unit/project-001/src/test/resources</directory>
+ </testResource>
+ </testResources>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <configuration>
+ <project implementation="org.apache.maven.plugin.source.stubs.Project001Stub"/>
+ <outputDirectory>${basedir}/target/test/unit/project-001/target</outputDirectory>
+ <finalName>maven-source-plugin-test-project-001-99.0</finalName>
+ <reactorProjects/>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added: maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/src/main/java/foo/project001/App.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/src/main/java/foo/project001/App.java?view=auto&rev=525146
==============================================================================
--- maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/src/main/java/foo/project001/App.java (added)
+++ maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/src/main/java/foo/project001/App.java Tue Apr 3 05:05:19 2007
@@ -0,0 +1,32 @@
+package foo.project001;
+
+/*
+ * 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.
+ */
+
+/**
+ * Hello world!
+ *
+ */
+public class App
+{
+ public static void main( String[] args )
+ {
+ System.out.println( "Hello World!" );
+ }
+}
Added: maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/src/main/resources/.cvsignore
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/src/main/resources/.cvsignore?view=auto&rev=525146
==============================================================================
--- maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/src/main/resources/.cvsignore (added)
+++ maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/src/main/resources/.cvsignore Tue Apr 3 05:05:19 2007
@@ -0,0 +1 @@
+## we don't care about this one since it's handled by default excludes (well at least it should).
\ No newline at end of file
Added: maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/src/main/resources/default-configuration.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/src/main/resources/default-configuration.properties?view=auto&rev=525146
==============================================================================
--- maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/src/main/resources/default-configuration.properties (added)
+++ maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/src/main/resources/default-configuration.properties Tue Apr 3 05:05:19 2007
@@ -0,0 +1,16 @@
+# 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.
Added: maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/src/test/java/foo/project001/AppTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/src/test/java/foo/project001/AppTest.java?view=auto&rev=525146
==============================================================================
--- maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/src/test/java/foo/project001/AppTest.java (added)
+++ maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/src/test/java/foo/project001/AppTest.java Tue Apr 3 05:05:19 2007
@@ -0,0 +1,57 @@
+package foo.project001;
+
+/*
+ * 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 junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ * Unit test for simple App.
+ */
+public class AppTest
+ extends TestCase
+{
+ /**
+ * Create the test case
+ *
+ * @param testName name of the test case
+ */
+ public AppTest( String testName )
+ {
+ super( testName );
+ }
+
+ /**
+ * @return the suite of tests being tested
+ */
+ public static Test suite()
+ {
+ return new TestSuite( AppTest.class );
+ }
+
+ /**
+ * Rigourous Test :-)
+ */
+ public void testApp()
+ {
+ assertTrue( true );
+ }
+}
Added: maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/src/test/resources/.cvsignore
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/src/test/resources/.cvsignore?view=auto&rev=525146
==============================================================================
--- maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/src/test/resources/.cvsignore (added)
+++ maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/src/test/resources/.cvsignore Tue Apr 3 05:05:19 2007
@@ -0,0 +1 @@
+## we don't care about this one since it's handled by default excludes (well at least it should).
\ No newline at end of file
Added: maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/src/test/resources/test-default-configuration.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/src/test/resources/test-default-configuration.properties?view=auto&rev=525146
==============================================================================
--- maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/src/test/resources/test-default-configuration.properties (added)
+++ maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-001/src/test/resources/test-default-configuration.properties Tue Apr 3 05:05:19 2007
@@ -0,0 +1,16 @@
+# 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.
Added: maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/pom.xml?view=auto&rev=525146
==============================================================================
--- maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/pom.xml (added)
+++ maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/pom.xml Tue Apr 3 05:05:19 2007
@@ -0,0 +1,67 @@
+<?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>source</groupId>
+ <artifactId>maven-source-plugin-test-project-003</artifactId>
+ <version>99.0</version>
+ <name>Maven</name>
+ <packaging>jar</packaging>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <resources>
+ <resource>
+ <directory>target/test-classes/unit/project-003/src/main/resources</directory>
+ <excludes>
+ <exclude>excluded-file.txt</exclude>
+ </excludes>
+ </resource>
+ </resources>
+ <testResources>
+ <testResource>
+ <directory>target/test-classes/unit/project-003/src/test/resources</directory>
+ <excludes>
+ <exclude>excluded-file.txt</exclude>
+ </excludes>
+ </testResource>
+ </testResources>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <configuration>
+ <project implementation="org.apache.maven.plugin.source.stubs.Project003Stub"/>
+ <outputDirectory>${basedir}/target/test/unit/project-003/target</outputDirectory>
+ <finalName>maven-source-plugin-test-project-003-99.0</finalName>
+ <reactorProjects/>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added: maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/src/main/java/foo/project003/App.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/src/main/java/foo/project003/App.java?view=auto&rev=525146
==============================================================================
--- maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/src/main/java/foo/project003/App.java (added)
+++ maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/src/main/java/foo/project003/App.java Tue Apr 3 05:05:19 2007
@@ -0,0 +1,32 @@
+package foo.project003;
+
+/*
+ * 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.
+ */
+
+/**
+ * Hello world!
+ *
+ */
+public class App
+{
+ public static void main( String[] args )
+ {
+ System.out.println( "Hello World!" );
+ }
+}
Added: maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/src/main/resources/default-configuration.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/src/main/resources/default-configuration.properties?view=auto&rev=525146
==============================================================================
--- maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/src/main/resources/default-configuration.properties (added)
+++ maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/src/main/resources/default-configuration.properties Tue Apr 3 05:05:19 2007
@@ -0,0 +1,16 @@
+# 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.
Added: maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/src/main/resources/excluded-file.txt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/src/main/resources/excluded-file.txt?view=auto&rev=525146
==============================================================================
--- maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/src/main/resources/excluded-file.txt (added)
+++ maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/src/main/resources/excluded-file.txt Tue Apr 3 05:05:19 2007
@@ -0,0 +1 @@
+This file is excluded by the custom configuration, so shouldn't end up in the end product
\ No newline at end of file
Added: maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/src/test/java/foo/project003/AppTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/src/test/java/foo/project003/AppTest.java?view=auto&rev=525146
==============================================================================
--- maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/src/test/java/foo/project003/AppTest.java (added)
+++ maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/src/test/java/foo/project003/AppTest.java Tue Apr 3 05:05:19 2007
@@ -0,0 +1,57 @@
+package foo.project003;
+
+/*
+ * 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 junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ * Unit test for simple App.
+ */
+public class AppTest
+ extends TestCase
+{
+ /**
+ * Create the test case
+ *
+ * @param testName name of the test case
+ */
+ public AppTest( String testName )
+ {
+ super( testName );
+ }
+
+ /**
+ * @return the suite of tests being tested
+ */
+ public static Test suite()
+ {
+ return new TestSuite( AppTest.class );
+ }
+
+ /**
+ * Rigourous Test :-)
+ */
+ public void testApp()
+ {
+ assertTrue( true );
+ }
+}
Added: maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/src/test/resources/excluded-file.txt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/src/test/resources/excluded-file.txt?view=auto&rev=525146
==============================================================================
--- maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/src/test/resources/excluded-file.txt (added)
+++ maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/src/test/resources/excluded-file.txt Tue Apr 3 05:05:19 2007
@@ -0,0 +1 @@
+This file is excluded by the custom configuration, so shouldn't end up in the end product
\ No newline at end of file
Added: maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/src/test/resources/test-default-configuration.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/src/test/resources/test-default-configuration.properties?view=auto&rev=525146
==============================================================================
--- maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/src/test/resources/test-default-configuration.properties (added)
+++ maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-003/src/test/resources/test-default-configuration.properties Tue Apr 3 05:05:19 2007
@@ -0,0 +1,16 @@
+# 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.
Added: maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-005/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-005/pom.xml?view=auto&rev=525146
==============================================================================
--- maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-005/pom.xml (added)
+++ maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-005/pom.xml Tue Apr 3 05:05:19 2007
@@ -0,0 +1,52 @@
+<?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>source</groupId>
+ <artifactId>maven-source-plugin-test-project-005</artifactId>
+ <version>99.0</version>
+ <name>Maven</name>
+ <!-- POM packaging, no archive should be created -->
+ <packaging>pom</packaging>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <configuration>
+ <project implementation="org.apache.maven.plugin.source.stubs.Project005Stub"/>
+ <outputDirectory>${basedir}/target/test/unit/project-005/target</outputDirectory>
+ <finalName>maven-source-plugin-test-project-005-99.0</finalName>
+ <reactorProjects/>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added: maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-007/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-007/pom.xml?view=auto&rev=525146
==============================================================================
--- maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-007/pom.xml (added)
+++ maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-007/pom.xml Tue Apr 3 05:05:19 2007
@@ -0,0 +1,59 @@
+<?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>source</groupId>
+ <artifactId>maven-source-plugin-test-project-007</artifactId>
+ <version>99.0</version>
+ <name>Maven</name>
+ <packaging>jar</packaging>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <resources>
+ <resource>
+ <directory>target/test-classes/unit/project-007/src/main/resources</directory>
+ <includes>
+ <include>templates/**</include>
+ </includes>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <configuration>
+ <project implementation="org.apache.maven.plugin.source.stubs.Project007Stub"/>
+ <outputDirectory>${basedir}/target/test/unit/project-007/target</outputDirectory>
+ <finalName>maven-source-plugin-test-project-007-99.0</finalName>
+ <reactorProjects/>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added: maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-007/src/main/java/foo/project007/App.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-007/src/main/java/foo/project007/App.java?view=auto&rev=525146
==============================================================================
--- maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-007/src/main/java/foo/project007/App.java (added)
+++ maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-007/src/main/java/foo/project007/App.java Tue Apr 3 05:05:19 2007
@@ -0,0 +1,32 @@
+package foo.project007;
+
+/*
+ * 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.
+ */
+
+/**
+ * Hello world!
+ *
+ */
+public class App
+{
+ public static void main( String[] args )
+ {
+ System.out.println( "Hello World!" );
+ }
+}
Added: maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-007/src/main/resources/default-configuration.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-007/src/main/resources/default-configuration.properties?view=auto&rev=525146
==============================================================================
--- maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-007/src/main/resources/default-configuration.properties (added)
+++ maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-007/src/main/resources/default-configuration.properties Tue Apr 3 05:05:19 2007
@@ -0,0 +1,16 @@
+# 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.
Added: maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-007/src/main/resources/templates/configuration-template.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-007/src/main/resources/templates/configuration-template.properties?view=auto&rev=525146
==============================================================================
--- maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-007/src/main/resources/templates/configuration-template.properties (added)
+++ maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-007/src/main/resources/templates/configuration-template.properties Tue Apr 3 05:05:19 2007
@@ -0,0 +1,16 @@
+# 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.