[Git][java-team/maven-bundle-plugin][upstream] New upstream version 3.5.1

Emmanuel Bourg gitlab at salsa.debian.org
Mon Jul 30 13:36:00 BST 2018


Emmanuel Bourg pushed to branch upstream at Debian Java Maintainers / maven-bundle-plugin


Commits:
af0251e5 by Emmanuel Bourg at 2018-07-30T12:16:52Z
New upstream version 3.5.1
- - - - -


7 changed files:

- pom.xml
- src/main/java/org/apache/felix/bundleplugin/BundleInfo.java
- src/main/java/org/apache/felix/bundleplugin/JpaPlugin.java
- src/main/resources/org/apache/felix/bundleplugin/jpa.xsl
- src/test/java/org/apache/felix/bundleplugin/AbstractBundlePluginTest.java
- src/test/java/org/apache/felix/bundleplugin/JpaPluginTest.java
- src/test/java/org/apache/maven/shared/osgi/Maven2OsgiConverterTest.java


Changes:

=====================================
pom.xml
=====================================
--- a/pom.xml
+++ b/pom.xml
@@ -28,7 +28,7 @@
  <modelVersion>4.0.0</modelVersion>
 
  <artifactId>maven-bundle-plugin</artifactId>
- <version>3.5.0</version>
+ <version>3.5.1</version>
  <packaging>maven-plugin</packaging>
 
  <name>Maven Bundle Plugin</name>
@@ -42,9 +42,9 @@
  <url>http://felix.apache.org/components/bundle-plugin/</url>
 
  <scm>
-     <connection>scm:svn:http://svn.apache.org/repos/asf/felix/releases/maven-bundle-plugin-3.5.0</connection>
-     <developerConnection>scm:svn:https://svn.apache.org/repos/asf/felix/releases/maven-bundle-plugin-3.5.0</developerConnection>
-     <url>http://svn.apache.org/viewvc/felix/releases/maven-bundle-plugin-3.5.0</url>
+     <connection>scm:svn:http://svn.apache.org/repos/asf/felix/releases/maven-bundle-plugin-3.5.1</connection>
+     <developerConnection>scm:svn:https://svn.apache.org/repos/asf/felix/releases/maven-bundle-plugin-3.5.1</developerConnection>
+     <url>http://svn.apache.org/viewvc/felix/releases/maven-bundle-plugin-3.5.1</url>
  </scm>
 
  <!-- Support for publishing the mvn site. -->


=====================================
src/main/java/org/apache/felix/bundleplugin/BundleInfo.java
=====================================
--- a/src/main/java/org/apache/felix/bundleplugin/BundleInfo.java
+++ b/src/main/java/org/apache/felix/bundleplugin/BundleInfo.java
@@ -28,7 +28,7 @@ import org.apache.maven.artifact.Artifact;
  * Information result of the bundling process
  *
  * @author <a href="mailto:carlos at apache.org">Carlos Sanchez</a>
- * @version $Id$
+ * @version $Id: BundleInfo.java 1786059 2017-03-08 19:30:10Z sseifert $
  */
 public class BundleInfo
 {


=====================================
src/main/java/org/apache/felix/bundleplugin/JpaPlugin.java
=====================================
--- a/src/main/java/org/apache/felix/bundleplugin/JpaPlugin.java
+++ b/src/main/java/org/apache/felix/bundleplugin/JpaPlugin.java
@@ -27,6 +27,7 @@ import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.net.URL;
 import java.util.HashSet;
+import java.util.LinkedHashSet;
 import java.util.Map;
 import java.util.Set;
 
@@ -134,7 +135,7 @@ System.err.println("Output: " + set.toString());
 
     public Set<String> analyze( InputStream in ) throws Exception
     {
-        Set<String> refers = new HashSet<String>();
+        Set<String> refers = new LinkedHashSet<String>();
         ByteArrayOutputStream bout = new ByteArrayOutputStream();
         javax.xml.transform.Result r = new StreamResult( bout );
         javax.xml.transform.Source s = new StreamSource( in );


=====================================
src/main/resources/org/apache/felix/bundleplugin/jpa.xsl
=====================================
--- a/src/main/resources/org/apache/felix/bundleplugin/jpa.xsl
+++ b/src/main/resources/org/apache/felix/bundleplugin/jpa.xsl
@@ -136,19 +136,31 @@
     <xsl:template name="service-capability">
         <xsl:param name="interface"/>
         <xsl:param name="attributes" select="''"/>
-        <xsl:value-of select="concat('Provide-Capability: osgi.service;effective:=active;',
-                                         'objectClass=', $interface, ';',
-                                         $attributes,
-                                         $nl)"/>
+        <xsl:choose>
+            <xsl:when test="string-length($attributes)>0">
+                <xsl:value-of select="concat('Provide-Capability: osgi.service;effective:=active;',
+                                         'objectClass=', $interface, ';', $attributes, $nl)"/>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:value-of select="concat('Provide-Capability: osgi.service;effective:=active;',
+                                         'objectClass=', $interface, $nl)"/>
+            </xsl:otherwise>
+        </xsl:choose>
     </xsl:template>
 
     <xsl:template name="service-requirement">
         <xsl:param name="interface"/>
         <xsl:param name="attributes" select="''"/>
-        <xsl:value-of select="concat('Require-Capability: osgi.service;effective:=active;',
-                                         'objectClass=', $interface, ';',
-                                         $attributes,
-                                         $nl)"/>
+        <xsl:choose>
+            <xsl:when test="string-length($attributes)>0">
+                <xsl:value-of select="concat('Require-Capability: osgi.service;effective:=active;',
+                                         'objectClass=', $interface, ';', $attributes, $nl)"/>
+            </xsl:when>
+            <xsl:otherwise>
+                <xsl:value-of select="concat('Require-Capability: osgi.service;effective:=active;',
+                                         'objectClass=', $interface, $nl)"/>
+            </xsl:otherwise>
+        </xsl:choose>
     </xsl:template>
 
 </xsl:stylesheet>


=====================================
src/test/java/org/apache/felix/bundleplugin/AbstractBundlePluginTest.java
=====================================
--- a/src/test/java/org/apache/felix/bundleplugin/AbstractBundlePluginTest.java
+++ b/src/test/java/org/apache/felix/bundleplugin/AbstractBundlePluginTest.java
@@ -42,7 +42,7 @@ import org.apache.maven.project.ProjectBuilderConfiguration;
  * Common methods for bundle plugin testing
  * 
  * @author <a href="mailto:carlos at apache.org">Carlos Sanchez</a>
- * @version $Id$
+ * @version $Id: AbstractBundlePluginTest.java 1785857 2017-03-07 16:43:30Z sseifert $
  */
 public abstract class AbstractBundlePluginTest extends AbstractMojoTestCase
 {


=====================================
src/test/java/org/apache/felix/bundleplugin/JpaPluginTest.java
=====================================
--- a/src/test/java/org/apache/felix/bundleplugin/JpaPluginTest.java
+++ b/src/test/java/org/apache/felix/bundleplugin/JpaPluginTest.java
@@ -35,7 +35,7 @@ public class JpaPluginTest {
                         "        <jta-data-source>osgi:service/jdbc/h2DS</jta-data-source>\n" +
                         "    </persistence-unit>\n" +
                         "</persistence>";
-        String expectedReqs = "osgi.extender;osgi.extender=aries.jpa,osgi.service;effective:=active;objectClass=javax.transaction.TransactionManager;";
+        String expectedReqs = "osgi.extender;osgi.extender=aries.jpa,osgi.service;effective:=active;objectClass=javax.transaction.TransactionManager";
         assertTransformation(xmlStr, expectedReqs);
     }
 
@@ -46,7 +46,7 @@ public class JpaPluginTest {
                         "        <jta-data-source>osgi:service/javax.sql.DataSource/(&(db=mydb)(version=3.1))</jta-data-source>\n" +
                         "    </persistence-unit>\n" +
                         "</persistence>";
-        String expectedReqs = "osgi.extender;osgi.extender=aries.jpa,osgi.service;effective:=active;objectClass=javax.sql.DataSource;filter:=\"(&(db=mydb)(version=3.1))\",osgi.service;effective:=active;objectClass=javax.transaction.TransactionManager;";
+        String expectedReqs = "osgi.extender;osgi.extender=aries.jpa,osgi.service;effective:=active;objectClass=javax.transaction.TransactionManager,osgi.service;effective:=active;objectClass=javax.sql.DataSource;filter:=\"(&(db=mydb)(version=3.1))\"";
         assertTransformation(xmlStr, expectedReqs);
     }
 
@@ -68,5 +68,6 @@ public class JpaPluginTest {
         plugin.analyzeJar(analyzer);
 
         assertEquals(expectedReqs, analyzer.getProperty("Require-Capability"));
+
     }
 }


=====================================
src/test/java/org/apache/maven/shared/osgi/Maven2OsgiConverterTest.java
=====================================
--- a/src/test/java/org/apache/maven/shared/osgi/Maven2OsgiConverterTest.java
+++ b/src/test/java/org/apache/maven/shared/osgi/Maven2OsgiConverterTest.java
@@ -28,7 +28,7 @@ import org.codehaus.plexus.PlexusTestCase;
  * Test for {@link DefaultMaven2OsgiConverter}
  *
  * @author <a href="mailto:carlos at apache.org">Carlos Sanchez</a>
- * @version $Id$
+ * @version $Id: Maven2OsgiConverterTest.java 1679513 2015-05-15 08:53:36Z cziegeler $
  */
 public class Maven2OsgiConverterTest
     extends PlexusTestCase



View it on GitLab: https://salsa.debian.org/java-team/maven-bundle-plugin/commit/af0251e5b6395f72980ab2258c19a64dabf752fa

-- 
View it on GitLab: https://salsa.debian.org/java-team/maven-bundle-plugin/commit/af0251e5b6395f72980ab2258c19a64dabf752fa
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20180730/60ac44ec/attachment.html>


More information about the pkg-java-commits mailing list