Author: khmarbaise Date: Tue Sep 29 08:56:13 2015 New Revision: 1705818 URL: http://svn.apache.org/viewvc?rev=1705818&view=rev Log: [MSOURCES-81] add jar maven descriptor if configured Note: maven-archiver dependency version was upgraded to take advantage of MavenProject.clone(), which avoids having the new unit test from creating a maven-archiver directory in the maven-source-plugin basedir because the MavenProject() constructor used in 2.5 does not copy the build element.
Patch of Peter Lynch <[email protected]> applied. Added: maven/plugins/trunk/maven-source-plugin/src/main/java/org/apache/maven/plugin/source/SourceArchiveConfiguration.java maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/stubs/Project010Stub.java maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-010/ maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-010/pom.xml maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-010/src/ maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-010/src/main/ maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-010/src/main/java/ maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-010/src/main/java/foo/ maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-010/src/main/java/foo/project010/ maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-010/src/main/java/foo/project010/App.java maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-010/src/main/resources/ maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-010/src/main/resources/.cvsignore maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-010/src/main/resources/default-configuration.properties maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-010/src/test/ maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-010/src/test/java/ maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-010/src/test/java/foo/ maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-010/src/test/java/foo/project010/ maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-010/src/test/java/foo/project010/AppTest.java maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-010/src/test/resources/ maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-010/src/test/resources/.cvsignore maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-010/src/test/resources/test-default-configuration.properties 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/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?rev=1705818&r1=1705817&r2=1705818&view=diff ============================================================================== --- maven/plugins/trunk/maven-source-plugin/pom.xml (original) +++ maven/plugins/trunk/maven-source-plugin/pom.xml Tue Sep 29 08:56:13 2015 @@ -48,6 +48,13 @@ under the License. <role>MSOURCES-55</role> </roles> </contributor> + <contributor> + <name>Peter Lynch</name> + <email>[email protected]</email> + <roles> + <role>MSOURCES-81</role> + </roles> + </contributor> </contributors> <scm> 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?rev=1705818&r1=1705817&r2=1705818&view=diff ============================================================================== --- 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 Sep 29 08:56:13 2015 @@ -101,7 +101,7 @@ public abstract class AbstractSourceJarM * @since 2.1 */ @Parameter - private MavenArchiveConfiguration archive = new MavenArchiveConfiguration(); + private MavenArchiveConfiguration archive = new SourceArchiveConfiguration(); /** * Path to the default MANIFEST file to use. It will be used if <code>useDefaultManifestFile</code> is set to @@ -129,9 +129,8 @@ public abstract class AbstractSourceJarM private boolean attach; /** - * Specifies whether or not to exclude resources from the sources-jar. This - * can be convenient if your project includes large resources, such as - * images, and you don't want to include them in the sources-jar. + * Specifies whether or not to exclude resources from the sources-jar. This can be convenient if your project + * includes large resources, such as images, and you don't want to include them in the sources-jar. * * @since 2.0.4 */ @@ -159,9 +158,8 @@ public abstract class AbstractSourceJarM protected File outputDirectory; /** - * The filename to be used for the generated archive file. - * For the source:jar goal, "-sources" is appended to this filename. - * For the source:test-jar goal, "-test-sources" is appended. + * The filename to be used for the generated archive file. For the source:jar goal, "-sources" is appended to this + * filename. For the source:test-jar goal, "-test-sources" is appended. */ @Parameter( defaultValue = "${project.build.finalName}" ) protected String finalName; @@ -173,9 +171,8 @@ public abstract class AbstractSourceJarM protected List reactorProjects; /** - * Whether creating the archive should be forced. If set to true, the jar will - * always be created. If set to false, the jar will only be created when the - * sources are newer than the jar. + * Whether creating the archive should be forced. If set to true, the jar will always be created. If set to false, + * the jar will only be created when the sources are newer than the jar. * * @since 2.1 */ @@ -254,8 +251,8 @@ public abstract class AbstractSourceJarM if ( project.getArtifact().getClassifier() != null ) { getLog().warn( "NOT adding sources to artifacts with classifier as Maven only supports one classifier " - + "per artifact. Current artifact [" + project.getArtifact().getId() + "] has a [" - + project.getArtifact().getClassifier() + "] classifier." ); + + "per artifact. Current artifact [" + project.getArtifact().getId() + "] has a [" + + project.getArtifact().getClassifier() + "] classifier." ); return; } @@ -288,8 +285,6 @@ public abstract class AbstractSourceJarM try { archiver.setOutputFile( outputFile ); - - archive.setAddMavenDescriptor( false ); archive.setForced( forceCreation ); archiver.createArchive( session, project, archive ); @@ -426,7 +421,7 @@ public abstract class AbstractSourceJarM protected void addDirectory( Archiver archiver, File sourceDirectory, String prefix, String[] includes, String[] excludes ) - throws MojoExecutionException + throws MojoExecutionException { try { @@ -489,8 +484,8 @@ public abstract class AbstractSourceJarM } /** - * Combines the user parameter {@link #excludes}, the default excludes from plexus FileUtils, - * and the contents of the parameter addionalExcludes. + * Combines the user parameter {@link #excludes}, the default excludes from plexus FileUtils, and the contents of + * the parameter addionalExcludes. * * @param additionalExcludes Additional excludes to add to the array * @return The combined list of excludes. Added: maven/plugins/trunk/maven-source-plugin/src/main/java/org/apache/maven/plugin/source/SourceArchiveConfiguration.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/main/java/org/apache/maven/plugin/source/SourceArchiveConfiguration.java?rev=1705818&view=auto ============================================================================== --- maven/plugins/trunk/maven-source-plugin/src/main/java/org/apache/maven/plugin/source/SourceArchiveConfiguration.java (added) +++ maven/plugins/trunk/maven-source-plugin/src/main/java/org/apache/maven/plugin/source/SourceArchiveConfiguration.java Tue Sep 29 08:56:13 2015 @@ -0,0 +1,37 @@ +package org.apache.maven.plugin.source; + +/* + * 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.archiver.MavenArchiveConfiguration; + +/** + * For backwards compatibility, a custom archiver configuration that defaults to not including the Maven descriptor. + * + * @see <a href="https://issues.apache.org/browse/MSOURCES-81">MSOURCES-81</a> + * @since 2.4 + */ +public class SourceArchiveConfiguration + extends MavenArchiveConfiguration +{ + public SourceArchiveConfiguration() + { + setAddMavenDescriptor( false ); + } +} 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?rev=1705818&r1=1705817&r2=1705818&view=diff ============================================================================== --- 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 Sep 29 08:56:13 2015 @@ -56,17 +56,17 @@ public class SourceJarMojoTest executeMojo( "project-005", "sources" ); // Now make sure that no archive got created final File expectedFile = getTestTargetDir( "project-005" ); - assertFalse( "Source archive should not have been created[" + expectedFile.getAbsolutePath() + "]", - expectedFile.exists() ); + assertFalse("Source archive should not have been created[" + expectedFile.getAbsolutePath() + "]", + expectedFile.exists()); } public void testIncludes() throws Exception { - doTestProjectWithSourceArchive( "project-007", new String[]{ "templates/configuration-template.properties", - "foo/project007/App.java", "templates/", "foo/project007/", "foo/", "META-INF/MANIFEST.MF", "META-INF/" + doTestProjectWithSourceArchive("project-007", new String[]{"templates/configuration-template.properties", + "foo/project007/App.java", "templates/", "foo/project007/", "foo/", "META-INF/MANIFEST.MF", "META-INF/" - }, "sources" ); + }, "sources"); } public void testIncludePom() @@ -75,4 +75,19 @@ public class SourceJarMojoTest doTestProjectWithSourceArchive( "project-009", new String[]{ "default-configuration.properties", "pom.xml", "foo/project009/App.java", "foo/project009/", "foo/", "META-INF/MANIFEST.MF", "META-INF/" }, "sources" ); } + + public void testIncludeMavenDescriptorWhenExplicitlyConfigured() + throws Exception { + doTestProjectWithSourceArchive("project-010", + new String[]{ + "default-configuration.properties", "foo/project010/App.java", + "foo/project010/", "foo/", "META-INF/MANIFEST.MF", "META-INF/", + "META-INF/maven/", "META-INF/maven/source/", + "META-INF/maven/source/maven-source-plugin-test-project-010/", + "META-INF/maven/source/maven-source-plugin-test-project-010/pom.xml", + "META-INF/maven/source/maven-source-plugin-test-project-010/pom" + + ".properties" + }, + "sources"); + } } 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?rev=1705818&r1=1705817&r2=1705818&view=diff ============================================================================== --- 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 Sep 29 08:56:13 2015 @@ -59,8 +59,23 @@ public class TestSourceJarMojoTest // Now make sure that no archive got created final File expectedFile = getTestTargetDir( "project-005" ); - assertFalse( "Test source archive should not have been created[" + expectedFile.getAbsolutePath() + "]", - expectedFile.exists() ); + assertFalse("Test source archive should not have been created[" + expectedFile.getAbsolutePath() + "]", + expectedFile.exists()); + } + + public void testIncludeMavenDescriptorWhenExplicitlyConfigured() + throws Exception { + doTestProjectWithSourceArchive("project-010", + new String[]{ + "default-configuration.properties", "foo/project010/App.java", + "foo/project010/", "foo/", "META-INF/MANIFEST.MF", "META-INF/", + "META-INF/maven/", "META-INF/maven/source/", + "META-INF/maven/source/maven-source-plugin-test-project-010/", + "META-INF/maven/source/maven-source-plugin-test-project-010/pom.xml", + "META-INF/maven/source/maven-source-plugin-test-project-010/pom" + + ".properties" + }, + "test-sources"); } } Added: maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/stubs/Project010Stub.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/stubs/Project010Stub.java?rev=1705818&view=auto ============================================================================== --- maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/stubs/Project010Stub.java (added) +++ maven/plugins/trunk/maven-source-plugin/src/test/java/org/apache/maven/plugin/source/stubs/Project010Stub.java Tue Sep 29 08:56:13 2015 @@ -0,0 +1,122 @@ +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.model.Build; +import org.apache.maven.model.Model; +import org.apache.maven.model.io.xpp3.MavenXpp3Reader; +import org.apache.maven.plugin.testing.stubs.MavenProjectStub; +import org.codehaus.plexus.util.ReaderFactory; + +import java.io.File; +import java.util.ArrayList; +import java.util.List; + +public class Project010Stub + extends MavenProjectStub +{ + private Build build; + + private List resources; + + private List testResources; + + public Project010Stub() + { + MavenXpp3Reader pomReader = new MavenXpp3Reader(); + Model model; + + try + { + model = pomReader.read( + ReaderFactory.newXmlReader( new File( getBasedir(), "target/test-classes/unit/project-010/pom.xml" ) ) ); + setModel( model ); + + setFile(new File( getBasedir(), "target/test-classes/unit/project-010/pom.xml" )); + + 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-010/target"); + + setBuild(build); + + String basedir = getBasedir().getAbsolutePath(); + List compileSourceRoots = new ArrayList(); + compileSourceRoots.add( basedir + "/target/test-classes/unit/project-010/src/main/java" ); + setCompileSourceRoots(compileSourceRoots); + + List testCompileSourceRoots = new ArrayList(); + testCompileSourceRoots.add(basedir + "/target/test-classes/unit/project-010/src/test/java"); + setTestCompileSourceRoots(testCompileSourceRoots); + + setResources(model.getBuild().getResources()); + setTestResources(model.getBuild().getTestResources()); + + SourcePluginArtifactStub artifact = + new SourcePluginArtifactStub( getGroupId(), getArtifactId(), getVersion(), getPackaging(), null ); + artifact.setArtifactHandler(new DefaultArtifactHandlerStub()); + artifact.setType("jar"); + artifact.setBaseVersion("1.0-SNAPSHOT"); + 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/resources/unit/project-010/pom.xml URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-010/pom.xml?rev=1705818&view=auto ============================================================================== --- maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-010/pom.xml (added) +++ maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-010/pom.xml Tue Sep 29 08:56:13 2015 @@ -0,0 +1,65 @@ +<?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-010</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-010/src/main/resources</directory> + </resource> + </resources> + <testResources> + <testResource> + <directory>target/test-classes/unit/project-010/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.Project010Stub"/> + <outputDirectory>${basedir}/target/test/unit/project-010/target</outputDirectory> + <finalName>maven-source-plugin-test-project-010-99.0</finalName> + <reactorProjects/> + <archive> + <addMavenDescriptor>true</addMavenDescriptor> + </archive> + </configuration> + </plugin> + </plugins> + </build> +</project> Added: maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-010/src/main/java/foo/project010/App.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-010/src/main/java/foo/project010/App.java?rev=1705818&view=auto ============================================================================== --- maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-010/src/main/java/foo/project010/App.java (added) +++ maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-010/src/main/java/foo/project010/App.java Tue Sep 29 08:56:13 2015 @@ -0,0 +1,32 @@ +package foo.project010; + +/* + * 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-010/src/main/resources/.cvsignore URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-010/src/main/resources/.cvsignore?rev=1705818&view=auto ============================================================================== --- maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-010/src/main/resources/.cvsignore (added) +++ maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-010/src/main/resources/.cvsignore Tue Sep 29 08:56:13 2015 @@ -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-010/src/main/resources/default-configuration.properties URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-010/src/main/resources/default-configuration.properties?rev=1705818&view=auto ============================================================================== --- maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-010/src/main/resources/default-configuration.properties (added) +++ maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-010/src/main/resources/default-configuration.properties Tue Sep 29 08:56:13 2015 @@ -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-010/src/test/java/foo/project010/AppTest.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-010/src/test/java/foo/project010/AppTest.java?rev=1705818&view=auto ============================================================================== --- maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-010/src/test/java/foo/project010/AppTest.java (added) +++ maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-010/src/test/java/foo/project010/AppTest.java Tue Sep 29 08:56:13 2015 @@ -0,0 +1,57 @@ +package foo.project010; + +/* + * 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-010/src/test/resources/.cvsignore URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-010/src/test/resources/.cvsignore?rev=1705818&view=auto ============================================================================== --- maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-010/src/test/resources/.cvsignore (added) +++ maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-010/src/test/resources/.cvsignore Tue Sep 29 08:56:13 2015 @@ -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-010/src/test/resources/test-default-configuration.properties URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-010/src/test/resources/test-default-configuration.properties?rev=1705818&view=auto ============================================================================== --- maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-010/src/test/resources/test-default-configuration.properties (added) +++ maven/plugins/trunk/maven-source-plugin/src/test/resources/unit/project-010/src/test/resources/test-default-configuration.properties Tue Sep 29 08:56:13 2015 @@ -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.
