Return-Path: X-Original-To: apmail-felix-dev-archive@www.apache.org Delivered-To: apmail-felix-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D34D3C23A for ; Thu, 3 May 2012 19:09:10 +0000 (UTC) Received: (qmail 77366 invoked by uid 500); 3 May 2012 19:09:10 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 77316 invoked by uid 500); 3 May 2012 19:09:10 -0000 Mailing-List: contact dev-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list dev@felix.apache.org Received: (qmail 77307 invoked by uid 99); 3 May 2012 19:09:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 May 2012 19:09:10 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 May 2012 19:09:09 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 36A7742E2A0 for ; Thu, 3 May 2012 19:08:49 +0000 (UTC) Date: Thu, 3 May 2012 19:08:49 +0000 (UTC) From: "Martin Petrovsky (JIRA)" To: dev@felix.apache.org Message-ID: <1017945331.23243.1336072129225.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1847415507.23210.1336071655170.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (FELIX-3497) Wrong artifact type attached as a secondary artifact when project packaging is set to "pom" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/FELIX-3497?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Martin Petrovsky updated FELIX-3497: ------------------------------------ Comment: was deleted (was: And here is the patch: Index: src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java =================================================================== --- src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java (revision 1333571) +++ src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java (working copy) @@ -132,6 +132,13 @@ protected String classifier; /** + * Packaging type of the bundle. Retrieved from POM file if specified. + * + * @parameter expression="${packaging}" + */ + private String packaging; + + /** * @component */ private MavenProjectHelper m_projectHelper; @@ -375,7 +382,7 @@ } else { - m_projectHelper.attachArtifact( currentProject, jarFile, classifier ); + m_projectHelper.attachArtifact( currentProject, getPackaging(), classifier, jarFile ); } if ( unpackBundle ) @@ -1237,7 +1244,19 @@ outputDirectory = _outputDirectory; } + protected void setPackaging( String _packaging ) + { + this.packaging = _packaging; + } + protected String getPackaging() + { + if (this.packaging == null || this.packaging.trim().length() == 0) { + this.packaging = getProject().getPackaging(); + } + return packaging; + } + private static void addLocalPackages( File outputDirectory, Analyzer analyzer ) { Collection packages = new TreeSet(); ) > 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: maven, maven-bundle-plugin, patch > Attachments: example.pom, maven-bundle-fix.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 "jar" config. > I have attached both an example POM and a simple fix in the form of a patch. > Example POM: > {code} > > foo > bar > 1.5.1-SNAPSHOT > pom > > > > > org.apache.felix > maven-bundle-plugin > > > bundle-tests > package > bundle > > > > tests > jar > pom > target/test-classes > > com.foo.* > .*Test > Integration Tests - ${project.description} > Integration Tests for ${project.name} > ${groupId}.${artifactId}-tests > > > > > > > {code} -- 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