Author: jbonofre
Date: Thu Nov 25 09:25:10 2010
New Revision: 1038967
URL: http://svn.apache.org/viewvc?rev=1038967&view=rev
Log:
[SM-1212] JBI maven plugin now uses the artifactId for SA file name if the name
is not defined in the project POM.
Modified:
servicemix/maven-plugins/jbi-maven-plugin/trunk/src/main/java/org/apache/servicemix/maven/plugin/jbi/GenerateServiceAssemblyDescriptorMojo.java
Modified:
servicemix/maven-plugins/jbi-maven-plugin/trunk/src/main/java/org/apache/servicemix/maven/plugin/jbi/GenerateServiceAssemblyDescriptorMojo.java
URL:
http://svn.apache.org/viewvc/servicemix/maven-plugins/jbi-maven-plugin/trunk/src/main/java/org/apache/servicemix/maven/plugin/jbi/GenerateServiceAssemblyDescriptorMojo.java?rev=1038967&r1=1038966&r2=1038967&view=diff
==============================================================================
---
servicemix/maven-plugins/jbi-maven-plugin/trunk/src/main/java/org/apache/servicemix/maven/plugin/jbi/GenerateServiceAssemblyDescriptorMojo.java
(original)
+++
servicemix/maven-plugins/jbi-maven-plugin/trunk/src/main/java/org/apache/servicemix/maven/plugin/jbi/GenerateServiceAssemblyDescriptorMojo.java
Thu Nov 25 09:25:10 2010
@@ -210,6 +210,13 @@ public class GenerateServiceAssemblyDesc
DependencyInformation info = new DependencyInformation();
info.setName(artifact.getArtifactId());
String fileName = artifact.getFile().getName();
+ if (fileName == null) {
+ // the name is not defined in the POM
+ // try to use the artifactId
+ // as the artifactId is mandatory by maven, we don't
+ // need any additional test
+ fileName = artifact.getArtifactId();
+ }
fileName = fileName.substring(0,
fileName.lastIndexOf('.')) + ".zip";
info.setFilename(fileName);
info.setComponent(getComponentName(project, artifacts,
artifact));