Author: jdcasey Date: Tue Aug 16 11:23:05 2005 New Revision: 233029 URL: http://svn.apache.org/viewcvs?rev=233029&view=rev Log: Forgot to remove the SNAPSHOT check...this should close MNG-483
Modified: maven/components/trunk/maven-plugins/maven-source-plugin/src/main/java/org/apache/maven/plugin/source/JarSourceMojo.java Modified: maven/components/trunk/maven-plugins/maven-source-plugin/src/main/java/org/apache/maven/plugin/source/JarSourceMojo.java URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugins/maven-source-plugin/src/main/java/org/apache/maven/plugin/source/JarSourceMojo.java?rev=233029&r1=233028&r2=233029&view=diff ============================================================================== --- maven/components/trunk/maven-plugins/maven-source-plugin/src/main/java/org/apache/maven/plugin/source/JarSourceMojo.java (original) +++ maven/components/trunk/maven-plugins/maven-source-plugin/src/main/java/org/apache/maven/plugin/source/JarSourceMojo.java Tue Aug 16 11:23:05 2005 @@ -81,39 +81,31 @@ return; } - // TODO: this should be via a release profile instead - if ( project.getVersion().indexOf( "SNAPSHOT" ) < 0 ) - { - // TODO: use a component lookup? - JarArchiver archiver = new JarArchiver(); - - SourceBundler sourceBundler = new SourceBundler(); + // TODO: use a component lookup? + JarArchiver archiver = new JarArchiver(); - File outputFile = new File( outputDirectory, finalName + "-sources.jar" ); + SourceBundler sourceBundler = new SourceBundler(); - File[] sourceDirectories = new File[compileSourceRoots.size()]; - int count = 0; - for ( Iterator i = compileSourceRoots.iterator(); i.hasNext(); count++ ) - { - sourceDirectories[count] = new File( (String) i.next() ); - } + File outputFile = new File( outputDirectory, finalName + "-sources.jar" ); - try - { - sourceBundler.makeSourceBundle( outputFile, sourceDirectories, archiver ); - } - catch ( Exception e ) - { - throw new MojoExecutionException( "Error building source JAR", e ); - } + File[] sourceDirectories = new File[compileSourceRoots.size()]; + int count = 0; + for ( Iterator i = compileSourceRoots.iterator(); i.hasNext(); count++ ) + { + sourceDirectories[count] = new File( (String) i.next() ); + } - // TODO: these introduced dependencies on the project are going to become problematic - can we export it - // through metadata instead? - projectHelper.attachArtifact( project, "java-source", "sources", outputFile ); + try + { + sourceBundler.makeSourceBundle( outputFile, sourceDirectories, archiver ); } - else + catch ( Exception e ) { - getLog().info( "Not producing source bundle for a SNAPSHOT build" ); + throw new MojoExecutionException( "Error building source JAR", e ); } + + // TODO: these introduced dependencies on the project are going to become problematic - can we export it + // through metadata instead? + projectHelper.attachArtifact( project, "java-source", "sources", outputFile ); } } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]