Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
maven-bundle-plugin-2.3.7
-
any
Description
When trying to create a ${artifactid}-tests.jar in a maven project that does not produce a primary bundle the plugin attaches the ${artifactid}-tests.jar bundle as ${artifactid}-tests.pom. The plugin does not abide by the "<packaging>jar</packaging>" config.
I have attached both an example POM and a simple fix in the form of a patch.
Example POM:
<project> <groupId>foo</groupId> <artifactId>bar</artifactId> <version>1.5.1-SNAPSHOT</version> <packaging>pom</packaging> <build> <plugins> <!-- Create a Integration test bundle --> <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <executions> <execution> <id>bundle-tests</id> <phase>package</phase> <goals><goal>bundle</goal></goals> </execution> </executions> <configuration> <classifier>tests</classifier> <packaging>jar</packaging> <supportedProjectTypes><supportedProjectType>pom</supportedProjectType></supportedProjectTypes> <outputDirectory>target/test-classes</outputDirectory> <instructions> <Export-Package>com.foo.*</Export-Package> <Sling-Test-Regexp>.*Test</Sling-Test-Regexp> <Bundle-Description>Integration Tests - ${project.description}</Bundle-Description> <Bundle-Name>Integration Tests for ${project.name}</Bundle-Name> <Bundle-SymbolicName>${groupId}.${artifactId}-tests</Bundle-SymbolicName> </instructions> </configuration> </plugin> </plugins> </build> </project>