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 3044F9822 for ; Mon, 19 Sep 2011 21:37:14 +0000 (UTC) Received: (qmail 48990 invoked by uid 500); 19 Sep 2011 21:37:13 -0000 Delivered-To: apmail-felix-users-archive@felix.apache.org Received: (qmail 48948 invoked by uid 500); 19 Sep 2011 21:37:13 -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 48940 invoked by uid 99); 19 Sep 2011 21:37:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Sep 2011 21:37:13 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [129.67.1.165] (HELO relay1.mail.ox.ac.uk) (129.67.1.165) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Sep 2011 21:37:06 +0000 Received: from smtp3.nexus.ox.ac.uk ([163.1.154.137] helo=exht03.ad.oak.ox.ac.uk) by relay1.mail.ox.ac.uk with esmtp (Exim 4.75) (envelope-from ) id 1R5lWA-00034x-4c for users@felix.apache.org; Mon, 19 Sep 2011 22:36:46 +0100 Received: from EXMBX01.ad.oak.ox.ac.uk ([169.254.2.253]) by exht03.ad.oak.ox.ac.uk ([163.1.154.54]) with mapi; Mon, 19 Sep 2011 22:36:46 +0100 From: Eamonn Maguire To: "users@felix.apache.org" Date: Mon, 19 Sep 2011 22:36:45 +0100 Subject: Re: Dependencies, Exports and Imports Query Thread-Topic: Dependencies, Exports and Imports Query Thread-Index: Acx3FDsE8at4SrmYQYW7tLmOaCjwQQ== Message-ID: <740A95F9-29B7-4C43-B77B-AA0315031AA4@st-annes.ox.ac.uk> References: <363296266.1549984.1316467337400.JavaMail.root@sz0116a.westchester.pa.mail.comcast.net> <784E773E-C33E-48DB-9A07-9AA9D62729B5@st-annes.ox.ac.uk> In-Reply-To: <784E773E-C33E-48DB-9A07-9AA9D62729B5@st-annes.ox.ac.uk> Accept-Language: en-US, en-GB Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US, en-GB Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org The full error there was: [ERROR] Error building bundle org.isatools.plugins:isavalidatorconvert:bund= le:1.0 : Exception: Not a valid class file (no CAFEBABE header) [ERROR] Error building bundle org.isatools.plugins:isavalidatorconvert:bund= le:1.0 : Invalid class file: *.class For some reason, not everything copied. This is what you get when working l= ate :) Eamonn On 19 Sep 2011, at 22:35, Eamonn Maguire wrote: > Hi, >=20 > Thank you for your prompt response. So, I tried that and the following pr= oblems have come up. >=20 > [ERROR] Error building bundle org.isatools.plugins:isavalidatorconvert:bu= ndle:1.0 : Exception: Not a valid class file (no CAFEBABE header) >=20 > The edited pom.xml file I'm using is here: https://gist.github.com/122757= 6 >=20 > Eamonn >=20 >=20 > On 19 Sep 2011, at 22:22, > wrote: >=20 >=20 >=20 > Eamonn, >=20 >=20 >=20 > The dependencies section is only really used to build your .jar file when= you have pakcages external to your bundle included in the Export-Package s= ection of your maven-bundle plugin. I believe the reason that you're exper= iencing the bundling of your .jar file with your bundle is because of your = maven-assembly-plugin implementation. >=20 >=20 > What I would suggest you do is change your packaging type to "bundle", co= mment out your maven-assembly-plugin section and attempt to compile again. = The maven-bundle-plugin will take care of most of the stuff you're trying t= o do in your maven-assembly-plugin and is a cleaner approach. This will als= o ensure that you don't get erroneous dependant .jar files compiled in with= your application. >=20 >=20 >=20 > The dependancy is still needed if you have references to that external li= brary in your Import-Package section of your maven-bundle-plugin implementa= tion. >=20 >=20 >=20 > So, in short, keep the dependancy, and comment out your maven-assembly-pl= ugin code. >=20 >=20 >=20 > Please let me know if that helps! >=20 >=20 >=20 >=20 >=20 >=20 > ----- Original Message ----- >=20 >=20 > From: "Eamonn Maguire" > > To: users@felix.apache.org > Sent: Monday, September 19, 2011 5:06:24 PM > Subject: Re: Dependencies, Exports and Imports Query >=20 > Ah, I should have mentioned that BIIObjectStore is in the org.isatools.ta= blib.utils package. >=20 > Thanks again, >=20 > Eamonn >=20 > On 19 Sep 2011, at 21:58, Eamonn Maguire wrote: >=20 > Hi all, >=20 > I'm new to OSGi, I just started implementing before the weekend and altho= ugh the process was relatively pain free, I'm having some problems with get= ting plugins to work without having all my dependencies in the host project= . >=20 > For the plugin I'm using, the pom.xml file can be seen here: https://gist= .github.com/1227576 >=20 > For the dependencies: >=20 > 1) The ISAcreator dependency is the actual host program, where the plugin= s are to be deployed. > 2) The import_layer artifact is used for validation and conversion, which= the plugin does and contains a class called BIIObjectStore (this becomes r= elevant below). It is NOT an OSGi module. >=20 >=20 > The problem > Everything is working as long as the import_layer dependency is in the ho= st pom.xml dependencies, but this defeats the purpose of the plugin. But wh= en it's not included, I get a classnotfoundexception when I attempt to exec= ute the code in the plugin (there are no complaints when felix starts and t= he plugin is loaded). I'm not totally sure why it's not working since the r= esulting jar produced when I run mvn clean install contains the class. It's= just not being 'seen' when it is executed. >=20 > The plugin configuration as seen in the file is probably not doing someth= ing right, and as you can see, the current version of that file is doing ev= erything. >=20 > Any help would be greatly appreciated. I feel like I'm banging my head ag= ainst a brick wall on this one. >=20 > Many thanks, >=20 > Eamonn Maguire >=20 >=20 >=20 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@felix.apache.org For additional commands, e-mail: users-help@felix.apache.org