Return-Path: X-Original-To: apmail-felix-users-archive@minotaur.apache.org Delivered-To: apmail-felix-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3853610930 for ; Sat, 20 Jul 2013 18:58:54 +0000 (UTC) Received: (qmail 43619 invoked by uid 500); 20 Jul 2013 18:58:53 -0000 Delivered-To: apmail-felix-users-archive@felix.apache.org Received: (qmail 43460 invoked by uid 500); 20 Jul 2013 18:58:52 -0000 Mailing-List: contact users-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@felix.apache.org Delivered-To: mailing list users@felix.apache.org Received: (qmail 43452 invoked by uid 99); 20 Jul 2013 18:58:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 20 Jul 2013 18:58:52 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [194.9.95.113] (HELO s87.loopia.se) (194.9.95.113) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 20 Jul 2013 18:58:43 +0000 Received: from s87.loopia.se (localhost [127.0.0.1]) by s87.loopia.se (Postfix) with ESMTP id 565FB1E16ACF for ; Sat, 20 Jul 2013 20:57:09 +0200 (CEST) X-Virus-Scanned: amavisd-new at outgoing-smtp.loopia.se X-Spam-Score: 0 X-Spam-Level: Received: from s87.loopia.se ([127.0.0.1]) by s87.loopia.se (s87.loopia.se [127.0.0.1]) (amavisd-new, port 10024) with LMTP id aY36NHB18bIs for ; Sat, 20 Jul 2013 20:57:09 +0200 (CEST) Received: from s326.loopia.se (mailcluster.loopia.se [194.9.94.72]) by s87.loopia.se (Postfix) with ESMTP id 084331E16AC9 for ; Sat, 20 Jul 2013 20:57:09 +0200 (CEST) Received: (qmail 54723 invoked from network); 20 Jul 2013 18:57:08 -0000 Received: from c-c7c8e555.04-92-73746f39.cust.bredbandsbolaget.se (HELO [192.168.1.18]) (tommy@natusoft.se@[85.229.200.199]) (envelope-sender ) by s326.loopia.se (qmail-ldap-1.03) with SMTP for ; 20 Jul 2013 18:57:08 -0000 From: Tommy Svensson Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: Prolbem with maven-bundle-plugin version 2.4.0 Date: Sat, 20 Jul 2013 20:57:08 +0200 Message-Id: <088A1574-A156-4581-A946-A423EA98E8F3@natusoft.se> Cc: Peter.Kriens@aQute.biz To: users@felix.apache.org Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) X-Mailer: Apple Mail (2.1508) X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Flag: NO X-Old-Spam-Status: No, score=0 tagged_above=-999 required=15 tests=[none] autolearn=disabled Hello, I have found some problems with maven-bundle-plugin version 2.4.0: It keeps spitting out the following error: [ERROR] Bundle se.natusoft.osgi.aps:aps-apis:bundle:0.9.2 : The = default package '.' is not permitted by the Import-Package syntax.=20 This can be caused by compile errors in Eclipse because Eclipse = creates=20 valid class files regardless of compile errors. The following package(s) import from the default package null My Import-Package looks like this: * This works fine up to version 2.3.7. And no, I'm not using Eclipse.=20 I got the source for the 2.4.0 version and realized that the error = actually comes from bnd. I tried the following "fix": = __________________________________________________________________________= ________ protected boolean reportErrors( String prefix, Analyzer analyzer ) { List errors =3D analyzer.getErrors(); List warnings =3D analyzer.getWarnings(); for ( Iterator w =3D warnings.iterator(); w.hasNext(); ) { String msg =3D ( String ) w.next(); getLog().warn( prefix + " : " + msg ); } boolean hasErrors =3D false; String fileNotFound =3D "Input file does not exist: "; for ( Iterator e =3D errors.iterator(); e.hasNext(); ) { String msg =3D ( String ) e.next(); if ( msg.startsWith( fileNotFound ) && msg.endsWith( "~" ) ) { // treat as warning; this error happens when you have = duplicate entries in Include-Resource String duplicate =3D Processor.removeDuplicateMarker( = msg.substring( fileNotFound.length() ) ); getLog().warn( prefix + " : Duplicate path '" + = duplicate + "' in Include-Resource" ); } // ---- MY ADDITION ---- else if ( msg.contains("The default package '.'")) { getLog().warn( prefix + ":" + msg ); } // ----------------------------- else { getLog().error( prefix + " : " + msg ); hasErrors =3D true; } } return hasErrors; } = __________________________________________________________________________= ________ Then it builds and creates a perfectly fine jar.=20 However when my build came to the war:s no classes are produced in = target/classes and then maven-bundle-plugin/bnd complains about not = finding the specified activator, which is then correct since no classes = were produced! No compilation errors either. There is nothing wrong with = the code being compiled. If I go down to version 2.3.7 of the plugin it = compiles fine and produces classes.=20 Unfortunately Java 1.7 is only supported by version 2.4.0.=20 -- Tommy Svensson --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@felix.apache.org For additional commands, e-mail: users-help@felix.apache.org