[ 
https://issues.apache.org/jira/browse/FELIX-3497?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Petrovsky updated FELIX-3497:
------------------------------------

    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>





  was:


Example POM


    
> Wrong artifact type attached as a secondary artifact when project packaging 
> is set to "pom"
> -------------------------------------------------------------------------------------------
>
>                 Key: FELIX-3497
>                 URL: https://issues.apache.org/jira/browse/FELIX-3497
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>    Affects Versions: maven-bundle-plugin-2.3.7
>         Environment: any
>            Reporter: Martin Petrovsky
>              Labels: patch
>
> 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>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to