You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sn...@apache.org on 2009/04/25 08:25:32 UTC
svn commit: r768478 -
/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EarMojo.java
Author: snicoll
Date: Sat Apr 25 06:25:31 2009
New Revision: 768478
URL: http://svn.apache.org/viewvc?rev=768478&view=rev
Log:
MEAR-103: Filtered manifest in the defaut resources directory is now taken into account automagically.
Modified:
maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EarMojo.java
Modified: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EarMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EarMojo.java?rev=768478&r1=768477&r2=768478&view=diff
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EarMojo.java (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EarMojo.java Sat Apr 25 06:25:31 2009
@@ -86,7 +86,7 @@
* Specify that the ear sources should be filtered.
*
* @parameter default-value="false"
- * @since 2.3.2
+ * @since 2.3.2
*/
private boolean filtering;
@@ -126,9 +126,12 @@
protected String escapeString;
/**
- * The location of the manifest file to be used within the ear file.
+ * The location of the manifest file to be used within the ear file. If
+ * not value if specified, the default location in the workDirectory is
+ * taken. If the file does not exist, a manifest will be generated
+ * automatically.
*
- * @parameter expression="${basedir}/src/main/application/META-INF/MANIFEST.MF"
+ * @parameter
*/
private File manifestFile;
@@ -467,16 +470,19 @@
private void includeCustomManifestFile()
{
- File customManifestFile = manifestFile;
+ if ( manifestFile == null )
+ {
+ manifestFile = new File( getWorkDirectory(), "META-INF/MANIFEST.MF" );
+ }
- if ( !customManifestFile.exists() )
+ if ( !manifestFile.exists() )
{
getLog().info( "Could not find manifest file: " + manifestFile + " - Generating one" );
}
else
{
- getLog().info( "Including custom manifest file[" + customManifestFile + "]" );
- archive.setManifestFile( customManifestFile );
+ getLog().info( "Including custom manifest file[" + manifestFile + "]" );
+ archive.setManifestFile( manifestFile );
}
}