Author: mcculls
Date: Fri Oct 26 01:07:14 2007
New Revision: 588554
URL: http://svn.apache.org/viewvc?rev=588554&view=rev
Log:
Better error messages (and detect difference between internal error and
configuration error)
Modified:
felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
Modified:
felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
URL:
http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java?rev=588554&r1=588553&r2=588554&view=diff
==============================================================================
---
felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
(original)
+++
felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
Fri Oct 26 01:07:14 2007
@@ -296,7 +296,7 @@
{
jarFile.delete();
- throw new MojoFailureException("Found errors, see log");
+ throw new MojoFailureException("Error(s) found in bundle
configuration");
}
}
@@ -323,9 +323,15 @@
// workaround for MNG-1682: force maven to install artifact using
the "jar" handler
bundleArtifact.setArtifactHandler(
artifactHandlerManager.getArtifactHandler( "jar" ) );
}
+ catch (MojoFailureException e)
+ {
+ getLog().error( e.getLocalizedMessage() );
+ throw new MojoExecutionException( "Error(s) found in bundle
configuration", e );
+ }
catch (Exception e)
{
- throw new MojoExecutionException("Unknown error occurred", e);
+ getLog().error( "An internal error occurred", e );
+ throw new MojoExecutionException( "Internal error in
maven-bundle-plugin", e );
}
}