You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by mc...@apache.org on 2008/01/30 09:03:58 UTC
svn commit: r616677 -
/felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/ManifestPlugin.java
Author: mcculls
Date: Wed Jan 30 00:03:57 2008
New Revision: 616677
URL: http://svn.apache.org/viewvc?rev=616677&view=rev
Log:
FELIX-461: Ensure bundle:manifest goal creates same manifest when project packaging is bundle
Modified:
felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/ManifestPlugin.java
Modified: felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/ManifestPlugin.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/ManifestPlugin.java?rev=616677&r1=616676&r2=616677&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/ManifestPlugin.java (original)
+++ felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/ManifestPlugin.java Wed Jan 30 00:03:57 2008
@@ -50,7 +50,14 @@
Manifest manifest;
try
{
- manifest = getManifest( project, instructions, properties, classpath );
+ if ( "bundle".equals( project.getPackaging() ) )
+ {
+ manifest = buildOSGiBundle( project, instructions, properties, classpath ).getJar().getManifest();
+ }
+ else
+ {
+ manifest = getManifest( project, instructions, properties, classpath );
+ }
}
catch ( FileNotFoundException e )
{
@@ -60,6 +67,11 @@
catch ( IOException e )
{
throw new MojoExecutionException( "Error trying to generate Manifest", e );
+ }
+ catch ( Exception e )
+ {
+ getLog().error( "An internal error occurred", e );
+ throw new MojoExecutionException( "Internal error in maven-bundle-plugin", e );
}
File outputFile = new File( manifestLocation, "MANIFEST.MF" );