You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by jv...@apache.org on 2006/11/29 15:27:16 UTC
svn commit: r480578 -
/maven/plugins/trunk/maven-source-plugin/src/main/java/org/apache/maven/plugin/source/AbstractJarSourceMojo.java
Author: jvanzyl
Date: Wed Nov 29 06:27:15 2006
New Revision: 480578
URL: http://svn.apache.org/viewvc?view=rev&rev=480578
Log:
o pick up a directory called "maven-shared-archive-resources" and place them in the archive
Modified:
maven/plugins/trunk/maven-source-plugin/src/main/java/org/apache/maven/plugin/source/AbstractJarSourceMojo.java
Modified: maven/plugins/trunk/maven-source-plugin/src/main/java/org/apache/maven/plugin/source/AbstractJarSourceMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-source-plugin/src/main/java/org/apache/maven/plugin/source/AbstractJarSourceMojo.java?view=diff&rev=480578&r1=480577&r2=480578
==============================================================================
--- maven/plugins/trunk/maven-source-plugin/src/main/java/org/apache/maven/plugin/source/AbstractJarSourceMojo.java (original)
+++ maven/plugins/trunk/maven-source-plugin/src/main/java/org/apache/maven/plugin/source/AbstractJarSourceMojo.java Wed Nov 29 06:27:15 2006
@@ -251,12 +251,25 @@
}
protected Archiver createArchiver()
+ throws ArchiverException
{
Archiver archiver = new JarArchiver();
if ( project.getBuild() != null )
{
- archiver.setDotFileDirectory( new File( project.getBuild().getDirectory() ) );
+ List resources = project.getBuild().getResources();
+
+ for ( Iterator i = resources.iterator(); i.hasNext(); )
+ {
+ Resource r = (Resource) i.next();
+
+ if ( r.getDirectory().endsWith( "maven-shared-archive-resources" ) )
+ {
+ archiver.addDirectory( new File( r.getDirectory() ) );
+ }
+ }
+
+ //archiver.setDotFileDirectory( new File( project.getBuild().getDirectory() ) );
}
return archiver;