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

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@887856 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/scrplugin/src/main/java/org/apache/felix/scrplugin/mojo/SCRDescriptorMojo.java b/scrplugin/src/main/java/org/apache/felix/scrplugin/mojo/SCRDescriptorMojo.java
index 40af222..428a331 100644
--- a/scrplugin/src/main/java/org/apache/felix/scrplugin/mojo/SCRDescriptorMojo.java
+++ b/scrplugin/src/main/java/org/apache/felix/scrplugin/mojo/SCRDescriptorMojo.java
@@ -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 );
         }
     }