[
https://issues.apache.org/jira/browse/FELIX-4830?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jens Offenbach updated FELIX-4830:
----------------------------------
Description:
In some cases the manifest file created by maven-bundle-plugin 2.5.2 contains
packages without any version declaration. I was able to reproduce the issue. It
appears when you import a package into bundles which package namespace contains
the imported package name.
Example:
We have 3 bundles, one bundle exports the package "org.test". Another bundle
places its classes in the package "org.test.impl". The last bundle uses the
package "org.testx.impl".
*Bundle-Manifest: org.test*
{code}
Manifest-Version: 1.0
Bnd-LastModified: 1426619825063
Build-Jdk: 1.8.0_31
Bundle-ManifestVersion: 2
Bundle-Name: org.test
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-SymbolicName: org.test
Bundle-Version: 1.0.0.SNAPSHOT
Created-By: Apache Maven Bundle Plugin
Export-Package: org.test;version="1.0.0.SNAPSHOT"
Private-Package: org.test
Tool: Bnd-2.3.0.201405100607
{code}
*Bundle-Manifest: org.test.impl*
{code}
Manifest-Version: 1.0
Bnd-LastModified: 1426619826264
Build-Jdk: 1.8.0_31
Bundle-ManifestVersion: 2
Bundle-Name: org.test.impl
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-SymbolicName: org.test.impl
Bundle-Version: 1.0.0.SNAPSHOT
Created-By: Apache Maven Bundle Plugin
Import-Package: org.test
Private-Package: org.test.impl
Tool: Bnd-2.3.0.201405100607
{code}
*Bundle-Manifest: org.testx.impl*
{code}
Manifest-Version: 1.0
Bnd-LastModified: 1426619826857
Build-Jdk: 1.8.0_31
Bundle-ManifestVersion: 2
Bundle-Name: org.testx.impl
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-SymbolicName: org.test.org.testx.impl
Bundle-Version: 1.0.0.SNAPSHOT
Created-By: Apache Maven Bundle Plugin
Import-Package: org.test;version="[1.0,2)"
Private-Package: org.testx.impl
Tool: Bnd-2.3.0.201405100607
{code}
The package import statement of "org.test.impl" misses the version, whereas the
package import statement of "org.testx.impl" is correct.
The issue does not exist in maven-bundle-plugin-2.4.0.
This is a serious problem on my side. Can you fix it and release
maven-bundle-plugin-2.5.3 quickly.
{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.test</groupId>
<artifactId>org.test.project</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<properties>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<modules>
<module>org.test</module>
<module>org.test.impl</module>
<module>org.testx.impl</module>
</modules>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.test</groupId>
<artifactId>org.test</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.test</groupId>
<artifactId>org.test.impl</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.test</groupId>
<artifactId>org.testx.impl</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version>
<extensions>true</extensions>
<configuration>
<compilerId>eclipse</compilerId>
<source>1.7</source>
<target>1.7</target>
<optimize>true</optimize>
</configuration>
<dependencies>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-compiler-eclipse</artifactId>
<version>2.5</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.5.3</version>
<extensions>true</extensions>
<configuration>
<manifestLocation>META-INF</manifestLocation>
<instructions>
<_versionpolicy>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy>
<_nodefaultversion>false</_nodefaultversion>
<_removeheaders>
Provide-Capability,
Require-Capability,
Include-Resource
</_removeheaders>
<Bundle-Version>${project.version}</Bundle-Version>
<Bundle-RequiredExecutionEnvironment>JavaSE-1.7</Bundle-RequiredExecutionEnvironment>
</instructions>
</configuration>
<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
{code}
was:
In some cases the manifest file created by maven-bundle-plugin 2.5.2 contains
packages without any version declaration. I was able to reproduce the issue. It
appears when you import a package into bundles which package namespace contains
the imported package name.
Example:
We have 3 bundles, one bundle exports the package "org.test". Another bundle
places its classes in the package "org.test.impl". The last bundle uses the
package "org.testx.impl".
*Bundle-Manifest: org.test*
{code}
Manifest-Version: 1.0
Bnd-LastModified: 1426619825063
Build-Jdk: 1.8.0_31
Bundle-ManifestVersion: 2
Bundle-Name: org.test
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-SymbolicName: org.test
Bundle-Version: 1.0.0.SNAPSHOT
Created-By: Apache Maven Bundle Plugin
Export-Package: org.test;version="1.0.0.SNAPSHOT"
Private-Package: org.test
Tool: Bnd-2.3.0.201405100607
{code}
*Bundle-Manifest: org.test.impl*
{code}
Manifest-Version: 1.0
Bnd-LastModified: 1426619826264
Build-Jdk: 1.8.0_31
Bundle-ManifestVersion: 2
Bundle-Name: org.test.impl
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-SymbolicName: org.test.impl
Bundle-Version: 1.0.0.SNAPSHOT
Created-By: Apache Maven Bundle Plugin
Import-Package: org.test
Private-Package: org.test.impl
Tool: Bnd-2.3.0.201405100607
{code}
*Bundle-Manifest: org.testx.impl*
{code}
Manifest-Version: 1.0
Bnd-LastModified: 1426619826857
Build-Jdk: 1.8.0_31
Bundle-ManifestVersion: 2
Bundle-Name: org.testx.impl
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-SymbolicName: org.test.org.testx.impl
Bundle-Version: 1.0.0.SNAPSHOT
Created-By: Apache Maven Bundle Plugin
Import-Package: org.test;version="[1.0,2)"
Private-Package: org.testx.impl
Tool: Bnd-2.3.0.201405100607
{code}
The package import statement of "org.test.impl" misses the version, whereas the
package import statement of "org.testx.impl" is correct.
The issue does not exist in maven-bundle-plugin-2.4.0.
This is a serious problem on my side. Can you fix it and release
maven-bundle-plugin-2.5.3 quickly.
> Missing version of imported packages
> ------------------------------------
>
> Key: FELIX-4830
> URL: https://issues.apache.org/jira/browse/FELIX-4830
> Project: Felix
> Issue Type: Bug
> Components: Maven Bundle Plugin
> Affects Versions: maven-bundle-plugin-2.5.2
> Reporter: Jens Offenbach
>
> In some cases the manifest file created by maven-bundle-plugin 2.5.2 contains
> packages without any version declaration. I was able to reproduce the issue.
> It appears when you import a package into bundles which package namespace
> contains the imported package name.
> Example:
> We have 3 bundles, one bundle exports the package "org.test". Another bundle
> places its classes in the package "org.test.impl". The last bundle uses the
> package "org.testx.impl".
> *Bundle-Manifest: org.test*
> {code}
> Manifest-Version: 1.0
> Bnd-LastModified: 1426619825063
> Build-Jdk: 1.8.0_31
> Bundle-ManifestVersion: 2
> Bundle-Name: org.test
> Bundle-RequiredExecutionEnvironment: JavaSE-1.7
> Bundle-SymbolicName: org.test
> Bundle-Version: 1.0.0.SNAPSHOT
> Created-By: Apache Maven Bundle Plugin
> Export-Package: org.test;version="1.0.0.SNAPSHOT"
> Private-Package: org.test
> Tool: Bnd-2.3.0.201405100607
> {code}
> *Bundle-Manifest: org.test.impl*
> {code}
> Manifest-Version: 1.0
> Bnd-LastModified: 1426619826264
> Build-Jdk: 1.8.0_31
> Bundle-ManifestVersion: 2
> Bundle-Name: org.test.impl
> Bundle-RequiredExecutionEnvironment: JavaSE-1.7
> Bundle-SymbolicName: org.test.impl
> Bundle-Version: 1.0.0.SNAPSHOT
> Created-By: Apache Maven Bundle Plugin
> Import-Package: org.test
> Private-Package: org.test.impl
> Tool: Bnd-2.3.0.201405100607
> {code}
> *Bundle-Manifest: org.testx.impl*
> {code}
> Manifest-Version: 1.0
> Bnd-LastModified: 1426619826857
> Build-Jdk: 1.8.0_31
> Bundle-ManifestVersion: 2
> Bundle-Name: org.testx.impl
> Bundle-RequiredExecutionEnvironment: JavaSE-1.7
> Bundle-SymbolicName: org.test.org.testx.impl
> Bundle-Version: 1.0.0.SNAPSHOT
> Created-By: Apache Maven Bundle Plugin
> Import-Package: org.test;version="[1.0,2)"
> Private-Package: org.testx.impl
> Tool: Bnd-2.3.0.201405100607
> {code}
> The package import statement of "org.test.impl" misses the version, whereas
> the package import statement of "org.testx.impl" is correct.
> The issue does not exist in maven-bundle-plugin-2.4.0.
> This is a serious problem on my side. Can you fix it and release
> maven-bundle-plugin-2.5.3 quickly.
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <project xmlns="http://maven.apache.org/POM/4.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd">
> <modelVersion>4.0.0</modelVersion>
> <groupId>org.test</groupId>
> <artifactId>org.test.project</artifactId>
> <version>1.0.0-SNAPSHOT</version>
> <packaging>pom</packaging>
> <properties>
> <maven.compiler.source>1.7</maven.compiler.source>
> <maven.compiler.target>1.7</maven.compiler.target>
>
> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
> </properties>
> <modules>
> <module>org.test</module>
> <module>org.test.impl</module>
> <module>org.testx.impl</module>
> </modules>
> <dependencyManagement>
> <dependencies>
> <dependency>
> <groupId>org.test</groupId>
> <artifactId>org.test</artifactId>
> <version>${project.version}</version>
> </dependency>
> <dependency>
> <groupId>org.test</groupId>
> <artifactId>org.test.impl</artifactId>
> <version>${project.version}</version>
> </dependency>
> <dependency>
> <groupId>org.test</groupId>
> <artifactId>org.testx.impl</artifactId>
> <version>${project.version}</version>
> </dependency>
> </dependencies>
> </dependencyManagement>
> <build>
> <pluginManagement>
> <plugins>
> <plugin>
>
> <groupId>org.apache.maven.plugins</groupId>
>
> <artifactId>maven-compiler-plugin</artifactId>
> <version>3.2</version>
> <extensions>true</extensions>
> <configuration>
> <compilerId>eclipse</compilerId>
> <source>1.7</source>
> <target>1.7</target>
> <optimize>true</optimize>
> </configuration>
> <dependencies>
> <dependency>
>
> <groupId>org.codehaus.plexus</groupId>
>
> <artifactId>plexus-compiler-eclipse</artifactId>
> <version>2.5</version>
> </dependency>
> </dependencies>
> </plugin>
> <plugin>
> <groupId>org.apache.felix</groupId>
>
> <artifactId>maven-bundle-plugin</artifactId>
> <version>2.5.3</version>
> <extensions>true</extensions>
> <configuration>
>
> <manifestLocation>META-INF</manifestLocation>
> <instructions>
>
> <_versionpolicy>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy>
>
> <_nodefaultversion>false</_nodefaultversion>
> <_removeheaders>
>
> Provide-Capability,
>
> Require-Capability,
> Include-Resource
> </_removeheaders>
>
> <Bundle-Version>${project.version}</Bundle-Version>
>
> <Bundle-RequiredExecutionEnvironment>JavaSE-1.7</Bundle-RequiredExecutionEnvironment>
> </instructions>
> </configuration>
> <executions>
> <execution>
> <id>bundle-manifest</id>
>
> <phase>process-classes</phase>
> <goals>
>
> <goal>manifest</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> </plugins>
> </pluginManagement>
> </build>
> </project>
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)