felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r887856 - /felix/trunk/scrplugin/src/main/java/org/apache/felix/scrplugin/mojo/SCRDescriptorMojo.java
Date Mon, 07 Dec 2009 07:43:12 GMT
Author: cziegeler
Date: Mon Dec  7 07:43:11 2009
New Revision: 887856

URL: http://svn.apache.org/viewvc?rev=887856&view=rev
Log:
FELIX-1847: Error with duplicates when using maven-bundle-plugin 2.0.1 and maven-scr-plugin
1.4. Apply patch from Reto Bachmann-Gmür

Modified:
    felix/trunk/scrplugin/src/main/java/org/apache/felix/scrplugin/mojo/SCRDescriptorMojo.java

Modified: felix/trunk/scrplugin/src/main/java/org/apache/felix/scrplugin/mojo/SCRDescriptorMojo.java
URL: http://svn.apache.org/viewvc/felix/trunk/scrplugin/src/main/java/org/apache/felix/scrplugin/mojo/SCRDescriptorMojo.java?rev=887856&r1=887855&r2=887856&view=diff
==============================================================================
--- felix/trunk/scrplugin/src/main/java/org/apache/felix/scrplugin/mojo/SCRDescriptorMojo.java
(original)
+++ felix/trunk/scrplugin/src/main/java/org/apache/felix/scrplugin/mojo/SCRDescriptorMojo.java
Mon Dec  7 07:43:11 2009
@@ -214,7 +214,9 @@
         if ( descriptorFile.exists() )
         {
             String svcComp = project.getProperties().getProperty( "Service-Component" );
-            svcComp = ( svcComp == null ) ? "OSGI-INF/" + finalName : svcComp + ", " + "OSGI-INF/"
+ finalName;
+            final String svcPath = "OSGI-INF/" + finalName;
+            svcComp = ( svcComp == null ) ? svcPath :
+                svcComp.contains(svcPath) ? svcComp : svcComp + ", " + svcPath;
             project.getProperties().setProperty( "Service-Component", svcComp );
         }
     }



Mime
View raw message