You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Benson Margulies <bi...@gmail.com> on 2009/02/12 16:43:45 UTC
Mysterious missing constraints
I had reached a point of terminal frustration with trying to build a bundle
that just incorporated Spring.
So, I decided to stop hitting myself in the head with a rock, and just go
find the necessary artifacts to get bundles for the spring components.
My POM is below.
When I try to run it, I get a host of complaints about missing
'Import-Package' constraints on my bundle.
I'm really confused about Import-Package. Is it nonstandard? Is it only
Eclipse? Can I get bundle+bnd to generate it, or do I just need to write the
long boring list into the instruction section?
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<properties>
<bundle.symbolicName>com.basistech.rex2009.common</bundle.symbolicName>
<wrapped.groupId>com.basistech.rex2009</wrapped.groupId>
<wrapped.artifactId>common</wrapped.artifactId>
<wrapped.version>1.0-SNAPSHOT</wrapped.version>
</properties>
<modelVersion>4.0.0</modelVersion>
<groupId>com.basistech.rex2009</groupId>
<artifactId>com.basistech.rex2009.common</artifactId>
<version>1.0-SNAPSHOT</version>
<parent>
<groupId>com.basistech.rex2009</groupId>
<artifactId>parent</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
<name>${bundle.symbolicName} ${wrapped.version} [osgi]</name>
<packaging>bundle</packaging>
<dependencies>
<dependency>
<groupId>${wrapped.groupId}</groupId>
<artifactId>${wrapped.artifactId}</artifactId>
<version>${wrapped.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-stax-api_1.0_spec</artifactId>
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>org.springframework.core</artifactId>
<version>2.5.4.A</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>org.springframework.beans</artifactId>
<version>2.5.4.A</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>org.springframework.context</artifactId>
<version>2.5.4.A</version>
</dependency>
<dependency>
<groupId>org.apache.log4j</groupId>
<artifactId>com.springsource.org.apache.log4j</artifactId>
<version>1.2.15</version>
</dependency>
<dependency>
<groupId>org.codehaus.woodstox</groupId>
<artifactId>com.springsource.com.ctc.wstx</artifactId>
<version>3.2.8</version>
</dependency>
<dependency>
<groupId>odfdom</groupId>
<artifactId>odfdom</artifactId>
<version>0.6.16</version>
</dependency>
<dependency>
<groupId>trove</groupId>
<artifactId>trove</artifactId>
<version>2.0.4</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<outputDirectory>${eclipse.outputDirectory}</outputDirectory>
<buildcommands>
<java.lang.String>org.eclipse.jdt.core.javabuilder</java.lang.String>
<java.lang.String>org.eclipse.pde.ManifestBuilder</java.lang.String>
<java.lang.String>org.eclipse.pde.SchemaBuilder</java.lang.String>
<java.lang.String>org.eclipse.pde.api.tools.apiAnalysisBuilder</java.lang.String>
</buildcommands>
<projectnatures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
</projectnatures>
<pde>true</pde>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>1.4.3</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-SymbolicName>${bundle.symbolicName}</Bundle-SymbolicName>
<Bundle-Version>${wrapped.version}</Bundle-Version>
<_exportcontents>com.basistech.rex2009.*</_exportcontents>
<Embed-Dependency>${wrapped.artifactId};inline=false,trove;inline=false,odfdom;inline=false</Embed-Dependency>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>geronimo.specs</id>
<name>Geronimo Specs</name>
<url>http://mirrors.ibiblio.org/pub/mirrors/maven2</url>
</repository>
<repository>
<id>com.springsource.repository.bundles.release</id>
<name>SpringSource Enterprise Bundle Repository - SpringSource Bundle
Releases</name>
<url>http://repository.springsource.com/maven/bundles/release</url>
</repository>
<repository>
<id>com.springsource.repository.bundles.external</id>
<name>SpringSource Enterprise Bundle Repository - External Bundle
Releases</name>
<url>http://repository.springsource.com/maven/bundles/external</url>
</repository>
</repositories>
</project>
Re: Mysterious missing constraints
Posted by "Richard S. Hall" <he...@ungoverned.org>.
Benson Margulies wrote:
> I had reached a point of terminal frustration with trying to build a bundle
> that just incorporated Spring.
>
> So, I decided to stop hitting myself in the head with a rock, and just go
> find the necessary artifacts to get bundles for the spring components.
>
> My POM is below.
>
> When I try to run it, I get a host of complaints about missing
> 'Import-Package' constraints on my bundle.
>
If you include a bunch of stuff in your bundle, BND (from
maven-bundle-plugin) will generate an Import-Package declaration that
includes all packages referenced by you bundle content, but not included
in the bundle (i.e., all external dependencies). At run-time, you need
to supply bundles that export these packages or else you will get
complaints. If you don't really need the imported packages, then you
must tell BND to not generate the imports.
-> richard
> I'm really confused about Import-Package. Is it nonstandard? Is it only
> Eclipse? Can I get bundle+bnd to generate it, or do I just need to write the
> long boring list into the instruction section?
>
>
>
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
> http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
> <properties>
> <bundle.symbolicName>com.basistech.rex2009.common</bundle.symbolicName>
> <wrapped.groupId>com.basistech.rex2009</wrapped.groupId>
> <wrapped.artifactId>common</wrapped.artifactId>
> <wrapped.version>1.0-SNAPSHOT</wrapped.version>
> </properties>
> <modelVersion>4.0.0</modelVersion>
> <groupId>com.basistech.rex2009</groupId>
> <artifactId>com.basistech.rex2009.common</artifactId>
> <version>1.0-SNAPSHOT</version>
> <parent>
> <groupId>com.basistech.rex2009</groupId>
> <artifactId>parent</artifactId>
> <version>1.0-SNAPSHOT</version>
> <relativePath>../parent/pom.xml</relativePath>
> </parent>
> <name>${bundle.symbolicName} ${wrapped.version} [osgi]</name>
> <packaging>bundle</packaging>
> <dependencies>
> <dependency>
> <groupId>${wrapped.groupId}</groupId>
> <artifactId>${wrapped.artifactId}</artifactId>
> <version>${wrapped.version}</version>
> <optional>true</optional>
> </dependency>
> <dependency>
> <groupId>org.apache.geronimo.specs</groupId>
> <artifactId>geronimo-stax-api_1.0_spec</artifactId>
> <version>1.0.1</version>
> </dependency>
> <dependency>
> <groupId>org.springframework</groupId>
> <artifactId>org.springframework.core</artifactId>
> <version>2.5.4.A</version>
> </dependency>
> <dependency>
> <groupId>org.springframework</groupId>
> <artifactId>org.springframework.beans</artifactId>
> <version>2.5.4.A</version>
> </dependency>
> <dependency>
> <groupId>org.springframework</groupId>
> <artifactId>org.springframework.context</artifactId>
> <version>2.5.4.A</version>
> </dependency>
> <dependency>
> <groupId>org.apache.log4j</groupId>
> <artifactId>com.springsource.org.apache.log4j</artifactId>
> <version>1.2.15</version>
> </dependency>
> <dependency>
> <groupId>org.codehaus.woodstox</groupId>
> <artifactId>com.springsource.com.ctc.wstx</artifactId>
> <version>3.2.8</version>
> </dependency>
> <dependency>
> <groupId>odfdom</groupId>
> <artifactId>odfdom</artifactId>
> <version>0.6.16</version>
> </dependency>
> <dependency>
> <groupId>trove</groupId>
> <artifactId>trove</artifactId>
> <version>2.0.4</version>
> </dependency>
> </dependencies>
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-eclipse-plugin</artifactId>
> <configuration>
> <outputDirectory>${eclipse.outputDirectory}</outputDirectory>
> <buildcommands>
>
> <java.lang.String>org.eclipse.jdt.core.javabuilder</java.lang.String>
>
> <java.lang.String>org.eclipse.pde.ManifestBuilder</java.lang.String>
>
> <java.lang.String>org.eclipse.pde.SchemaBuilder</java.lang.String>
>
> <java.lang.String>org.eclipse.pde.api.tools.apiAnalysisBuilder</java.lang.String>
> </buildcommands>
> <projectnatures>
> <nature>org.eclipse.pde.PluginNature</nature>
> <nature>org.eclipse.jdt.core.javanature</nature>
> <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
> </projectnatures>
> <pde>true</pde>
> </configuration>
> </plugin>
> <plugin>
> <groupId>org.apache.felix</groupId>
> <artifactId>maven-bundle-plugin</artifactId>
> <version>1.4.3</version>
> <extensions>true</extensions>
> <configuration>
> <instructions>
>
> <Bundle-SymbolicName>${bundle.symbolicName}</Bundle-SymbolicName>
> <Bundle-Version>${wrapped.version}</Bundle-Version>
> <_exportcontents>com.basistech.rex2009.*</_exportcontents>
>
> <Embed-Dependency>${wrapped.artifactId};inline=false,trove;inline=false,odfdom;inline=false</Embed-Dependency>
> </instructions>
> </configuration>
> </plugin>
> </plugins>
> </build>
> <repositories>
> <repository>
> <id>geronimo.specs</id>
> <name>Geronimo Specs</name>
> <url>http://mirrors.ibiblio.org/pub/mirrors/maven2</url>
> </repository>
> <repository>
> <id>com.springsource.repository.bundles.release</id>
> <name>SpringSource Enterprise Bundle Repository - SpringSource Bundle
> Releases</name>
> <url>http://repository.springsource.com/maven/bundles/release</url>
> </repository>
> <repository>
> <id>com.springsource.repository.bundles.external</id>
> <name>SpringSource Enterprise Bundle Repository - External Bundle
> Releases</name>
> <url>http://repository.springsource.com/maven/bundles/external</url>
> </repository>
> </repositories>
> </project>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: Mysterious missing constraints
Posted by "Richard S. Hall" <he...@ungoverned.org>.
I am not a regular Eclipse user, so I don't really know about Eclipse PDE.
Did you try loading the bundles into a framework and see what it
complains about?
Just because the Spring bundle imports bsh, your bundle should not be
forced to import bsh if you import from the Spring bundle.
-> richard
Benson Margulies wrote:
> OK.
>
> Let's try this again.
>
> My bundle imports a packages, with Import-Package, from Spring. I got the
> Spring bundles from springsource.
>
> I imported all of this into Eclipse. Eclipse complains that MY bundle is
> lacking import-package for the dependencies of the Spring bundle.
>
> Roughly:
>
> my bundle has Import-Package: org.springframework.whatever
>
> The spring bundle has
>
> Import-Package: bsh
>
> and eclipse complains that my bundle is missing an import-package for bsh.
>
> Here's my manifest. I'm clueless.
>
>
>
>
>
> Manifest-Version: 1.0
> Built-By: benson
> Created-By: Apache Maven Bundle Plugin
> Import-Package: com.basistech.rex2009.common,com.basistech.rex2009.com
> mon.data,com.basistech.rex2009.common.decode,com.basistech.rex2009.co
> mmon.model,com.basistech.rex2009.common.plain,com.basistech.rex2009.c
> ommon.score,com.basistech.rex2009.common.text,com.basistech.rex2009.c
> ommon.util,com.ctc.wstx.exc;version="3.2",javax.xml.datatype;version=
> "1.3",javax.xml.namespace;version="1.3",javax.xml.parsers;version="1.
> 3",javax.xml.stream;version="1.0",javax.xml.transform;version="1.3",j
> avax.xml.transform.dom;version="1.3",javax.xml.transform.stream;versi
> on="1.3",javax.xml.xpath;version="1.3",org.apache.log4j;version="1.2"
> ,org.apache.xerces.dom;version="2.8",org.springframework.beans.factor
> y;version="2.5.4.A",org.springframework.beans.factory.annotation;vers
> ion="2.5.4.A",org.springframework.beans.factory.config;version="2.5.4
> .A",org.springframework.beans.factory.support;version="2.5.4.A",org.s
> pringframework.beans.factory.xml;version="2.5.4.A",org.springframewor
> k.context.support;version="2.5.4.A",org.springframework.core.io;versi
> on="2.5.4.A",org.w3c.dom;version="1.3",org.w3c.dom.bootstrap;version=
> "1.3",org.w3c.dom.ls;version="1.3",org.xml.sax;version="1.3",org.xml.
> sax.helpers;version="1.3"
> Bnd-LastModified: 1234451257266
> Export-Package: com.basistech.rex2009.common.data;uses:="com.basistech
> .rex2009.common.model,com.ctc.wstx.exc,javax.xml.namespace,org.w3c.do
> m,javax.xml.xpath,org.apache.log4j,javax.xml.parsers,com.basistech.re
> x2009.common.text,com.basistech.rex2009.common,javax.xml.stream",com.
> basistech.rex2009.common.model,com.basistech.rex2009.common.text;uses
> :="com.basistech.rex2009.common.data",com.basistech.rex2009.common.ut
> il,com.basistech.rex2009.common.plain,com.basistech.rex2009.common;us
> es:="org.springframework.beans.factory.support,org.apache.log4j,org.s
> pringframework.beans.factory.config,org.springframework.beans.factory
> .xml,org.springframework.core.io,org.springframework.context.support,
> org.springframework.beans.factory",com.basistech.rex2009.common.score
> ;uses:="com.basistech.rex2009.common.data,com.basistech.rex2009.commo
> n.model,javax.xml.namespace,org.w3c.dom,javax.xml.xpath,org.apache.lo
> g4j,org.springframework.beans.factory.annotation,com.basistech.rex200
> 9.common,com.basistech.rex2009.common.decode",com.basistech.rex2009.c
> ommon.decode;uses:="com.basistech.rex2009.common.data"
> Bundle-Version: 1.0.0.SNAPSHOT
> Bundle-Name: com.basistech.rex2009.common 1.0-SNAPSHOT [osgi]
> Bundle-ClassPath: .,odfdom-0.6.16.jar,trove-2.0.4.jar,common-1.0-SNAPS
> HOT.jar
> Build-Jdk: 1.5.0_16
> Private-Package: gnu.trove,gnu.trove.decorator,org.openoffice.odf.doc,
> org.openoffice.odf.doc.element,org.openoffice.odf.doc.element.anim,or
> g.openoffice.odf.doc.element.chart,org.openoffice.odf.doc.element.con
> fig,org.openoffice.odf.doc.element.dc,org.openoffice.odf.doc.element.
> dr3d,org.openoffice.odf.doc.element.draw,org.openoffice.odf.doc.eleme
> nt.form,org.openoffice.odf.doc.element.math,org.openoffice.odf.doc.el
> ement.meta,org.openoffice.odf.doc.element.number,org.openoffice.odf.d
> oc.element.office,org.openoffice.odf.doc.element.presentation,org.ope
> noffice.odf.doc.element.script,org.openoffice.odf.doc.element.style,o
> rg.openoffice.odf.doc.element.svg,org.openoffice.odf.doc.element.tabl
> e,org.openoffice.odf.doc.element.text,org.openoffice.odf.doc.element.
> xforms,org.openoffice.odf.dom,org.openoffice.odf.dom.element,org.open
> office.odf.dom.element.anim,org.openoffice.odf.dom.element.chart,org.
> openoffice.odf.dom.element.config,org.openoffice.odf.dom.element.dc,o
> rg.openoffice.odf.dom.element.dr3d,org.openoffice.odf.dom.element.dra
> w,org.openoffice.odf.dom.element.form,org.openoffice.odf.dom.element.
> math,org.openoffice.odf.dom.element.meta,org.openoffice.odf.dom.eleme
> nt.number,org.openoffice.odf.dom.element.office,org.openoffice.odf.do
> m.element.presentation,org.openoffice.odf.dom.element.script,org.open
> office.odf.dom.element.style,org.openoffice.odf.dom.element.svg,org.o
> penoffice.odf.dom.element.table,org.openoffice.odf.dom.element.text,o
> rg.openoffice.odf.dom.element.xforms,org.openoffice.odf.dom.style,org
> .openoffice.odf.dom.style.props,org.openoffice.odf.dom.type,org.openo
> ffice.odf.dom.type.anim,org.openoffice.odf.dom.type.chart,org.openoff
> ice.odf.dom.type.config,org.openoffice.odf.dom.type.dr3d,org.openoffi
> ce.odf.dom.type.draw,org.openoffice.odf.dom.type.fo,org.openoffice.od
> f.dom.type.form,org.openoffice.odf.dom.type.meta,org.openoffice.odf.d
> om.type.number,org.openoffice.odf.dom.type.office,org.openoffice.odf.
> dom.type.presentation,org.openoffice.odf.dom.type.smil,org.openoffice
> .odf.dom.type.style,org.openoffice.odf.dom.type.svg,org.openoffice.od
> f.dom.type.table,org.openoffice.odf.dom.type.text,org.openoffice.odf.
> dom.type.xlink,org.openoffice.odf.dom.util,org.openoffice.odf.pkg,org
> .openoffice.odf.pkg.manifest,resources
> Bundle-ManifestVersion: 2
> Bundle-SymbolicName: com.basistech.rex2009.common
> Tool: Bnd-0.0.255
> Embed-Dependency: common;inline=false,trove;inline=false,odfdom;inline
> =false
>
>
>
> On Thu, Feb 12, 2009 at 10:46 AM, Benson Margulies <bi...@gmail.com>wrote:
>
>
>> I really need coffee today. Please ignore this until I get my head
>> straightened out.
>>
>>
>> On Thu, Feb 12, 2009 at 10:43 AM, Benson Margulies <bi...@gmail.com>wrote:
>>
>>
>>> I had reached a point of terminal frustration with trying to build a
>>> bundle that just incorporated Spring.
>>>
>>> So, I decided to stop hitting myself in the head with a rock, and just go
>>> find the necessary artifacts to get bundles for the spring components.
>>>
>>> My POM is below.
>>>
>>> When I try to run it, I get a host of complaints about missing
>>> 'Import-Package' constraints on my bundle.
>>>
>>> I'm really confused about Import-Package. Is it nonstandard? Is it only
>>> Eclipse? Can I get bundle+bnd to generate it, or do I just need to write the
>>> long boring list into the instruction section?
>>>
>>>
>>>
>>>
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
>>> http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
>>> http://maven.apache.org/POM/4.0.0
>>> http://maven.apache.org/maven-v4_0_0.xsd">
>>> <properties>
>>>
>>> <bundle.symbolicName>com.basistech.rex2009.common</bundle.symbolicName>
>>> <wrapped.groupId>com.basistech.rex2009</wrapped.groupId>
>>> <wrapped.artifactId>common</wrapped.artifactId>
>>> <wrapped.version>1.0-SNAPSHOT</wrapped.version>
>>> </properties>
>>> <modelVersion>4.0.0</modelVersion>
>>> <groupId>com.basistech.rex2009</groupId>
>>> <artifactId>com.basistech.rex2009.common</artifactId>
>>> <version>1.0-SNAPSHOT</version>
>>> <parent>
>>> <groupId>com.basistech.rex2009</groupId>
>>> <artifactId>parent</artifactId>
>>> <version>1.0-SNAPSHOT</version>
>>> <relativePath>../parent/pom.xml</relativePath>
>>> </parent>
>>> <name>${bundle.symbolicName} ${wrapped.version} [osgi]</name>
>>> <packaging>bundle</packaging>
>>> <dependencies>
>>> <dependency>
>>> <groupId>${wrapped.groupId}</groupId>
>>> <artifactId>${wrapped.artifactId}</artifactId>
>>> <version>${wrapped.version}</version>
>>> <optional>true</optional>
>>> </dependency>
>>> <dependency>
>>> <groupId>org.apache.geronimo.specs</groupId>
>>> <artifactId>geronimo-stax-api_1.0_spec</artifactId>
>>> <version>1.0.1</version>
>>> </dependency>
>>> <dependency>
>>> <groupId>org.springframework</groupId>
>>> <artifactId>org.springframework.core</artifactId>
>>> <version>2.5.4.A</version>
>>> </dependency>
>>> <dependency>
>>> <groupId>org.springframework</groupId>
>>> <artifactId>org.springframework.beans</artifactId>
>>> <version>2.5.4.A</version>
>>> </dependency>
>>> <dependency>
>>> <groupId>org.springframework</groupId>
>>> <artifactId>org.springframework.context</artifactId>
>>> <version>2.5.4.A</version>
>>> </dependency>
>>> <dependency>
>>> <groupId>org.apache.log4j</groupId>
>>> <artifactId>com.springsource.org.apache.log4j</artifactId>
>>> <version>1.2.15</version>
>>> </dependency>
>>> <dependency>
>>> <groupId>org.codehaus.woodstox</groupId>
>>> <artifactId>com.springsource.com.ctc.wstx</artifactId>
>>> <version>3.2.8</version>
>>> </dependency>
>>> <dependency>
>>> <groupId>odfdom</groupId>
>>> <artifactId>odfdom</artifactId>
>>> <version>0.6.16</version>
>>> </dependency>
>>> <dependency>
>>> <groupId>trove</groupId>
>>> <artifactId>trove</artifactId>
>>> <version>2.0.4</version>
>>> </dependency>
>>> </dependencies>
>>> <build>
>>> <plugins>
>>> <plugin>
>>> <artifactId>maven-eclipse-plugin</artifactId>
>>> <configuration>
>>> <outputDirectory>${eclipse.outputDirectory}</outputDirectory>
>>> <buildcommands>
>>>
>>> <java.lang.String>org.eclipse.jdt.core.javabuilder</java.lang.String>
>>>
>>> <java.lang.String>org.eclipse.pde.ManifestBuilder</java.lang.String>
>>>
>>> <java.lang.String>org.eclipse.pde.SchemaBuilder</java.lang.String>
>>>
>>> <java.lang.String>org.eclipse.pde.api.tools.apiAnalysisBuilder</java.lang.String>
>>> </buildcommands>
>>> <projectnatures>
>>> <nature>org.eclipse.pde.PluginNature</nature>
>>> <nature>org.eclipse.jdt.core.javanature</nature>
>>> <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
>>> </projectnatures>
>>> <pde>true</pde>
>>> </configuration>
>>> </plugin>
>>> <plugin>
>>> <groupId>org.apache.felix</groupId>
>>> <artifactId>maven-bundle-plugin</artifactId>
>>> <version>1.4.3</version>
>>> <extensions>true</extensions>
>>> <configuration>
>>> <instructions>
>>>
>>> <Bundle-SymbolicName>${bundle.symbolicName}</Bundle-SymbolicName>
>>> <Bundle-Version>${wrapped.version}</Bundle-Version>
>>> <_exportcontents>com.basistech.rex2009.*</_exportcontents>
>>>
>>> <Embed-Dependency>${wrapped.artifactId};inline=false,trove;inline=false,odfdom;inline=false</Embed-Dependency>
>>> </instructions>
>>> </configuration>
>>> </plugin>
>>> </plugins>
>>> </build>
>>> <repositories>
>>> <repository>
>>> <id>geronimo.specs</id>
>>> <name>Geronimo Specs</name>
>>> <url>http://mirrors.ibiblio.org/pub/mirrors/maven2</url>
>>> </repository>
>>> <repository>
>>> <id>com.springsource.repository.bundles.release</id>
>>> <name>SpringSource Enterprise Bundle Repository - SpringSource Bundle
>>> Releases</name>
>>> <url>http://repository.springsource.com/maven/bundles/release</url>
>>> </repository>
>>> <repository>
>>> <id>com.springsource.repository.bundles.external</id>
>>> <name>SpringSource Enterprise Bundle Repository - External Bundle
>>> Releases</name>
>>> <url>http://repository.springsource.com/maven/bundles/external</url>
>>> </repository>
>>> </repositories>
>>> </project>
>>>
>>>
>>>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: Mysterious missing constraints
Posted by Benson Margulies <bi...@gmail.com>.
OK.
Let's try this again.
My bundle imports a packages, with Import-Package, from Spring. I got the
Spring bundles from springsource.
I imported all of this into Eclipse. Eclipse complains that MY bundle is
lacking import-package for the dependencies of the Spring bundle.
Roughly:
my bundle has Import-Package: org.springframework.whatever
The spring bundle has
Import-Package: bsh
and eclipse complains that my bundle is missing an import-package for bsh.
Here's my manifest. I'm clueless.
Manifest-Version: 1.0
Built-By: benson
Created-By: Apache Maven Bundle Plugin
Import-Package: com.basistech.rex2009.common,com.basistech.rex2009.com
mon.data,com.basistech.rex2009.common.decode,com.basistech.rex2009.co
mmon.model,com.basistech.rex2009.common.plain,com.basistech.rex2009.c
ommon.score,com.basistech.rex2009.common.text,com.basistech.rex2009.c
ommon.util,com.ctc.wstx.exc;version="3.2",javax.xml.datatype;version=
"1.3",javax.xml.namespace;version="1.3",javax.xml.parsers;version="1.
3",javax.xml.stream;version="1.0",javax.xml.transform;version="1.3",j
avax.xml.transform.dom;version="1.3",javax.xml.transform.stream;versi
on="1.3",javax.xml.xpath;version="1.3",org.apache.log4j;version="1.2"
,org.apache.xerces.dom;version="2.8",org.springframework.beans.factor
y;version="2.5.4.A",org.springframework.beans.factory.annotation;vers
ion="2.5.4.A",org.springframework.beans.factory.config;version="2.5.4
.A",org.springframework.beans.factory.support;version="2.5.4.A",org.s
pringframework.beans.factory.xml;version="2.5.4.A",org.springframewor
k.context.support;version="2.5.4.A",org.springframework.core.io;versi
on="2.5.4.A",org.w3c.dom;version="1.3",org.w3c.dom.bootstrap;version=
"1.3",org.w3c.dom.ls;version="1.3",org.xml.sax;version="1.3",org.xml.
sax.helpers;version="1.3"
Bnd-LastModified: 1234451257266
Export-Package: com.basistech.rex2009.common.data;uses:="com.basistech
.rex2009.common.model,com.ctc.wstx.exc,javax.xml.namespace,org.w3c.do
m,javax.xml.xpath,org.apache.log4j,javax.xml.parsers,com.basistech.re
x2009.common.text,com.basistech.rex2009.common,javax.xml.stream",com.
basistech.rex2009.common.model,com.basistech.rex2009.common.text;uses
:="com.basistech.rex2009.common.data",com.basistech.rex2009.common.ut
il,com.basistech.rex2009.common.plain,com.basistech.rex2009.common;us
es:="org.springframework.beans.factory.support,org.apache.log4j,org.s
pringframework.beans.factory.config,org.springframework.beans.factory
.xml,org.springframework.core.io,org.springframework.context.support,
org.springframework.beans.factory",com.basistech.rex2009.common.score
;uses:="com.basistech.rex2009.common.data,com.basistech.rex2009.commo
n.model,javax.xml.namespace,org.w3c.dom,javax.xml.xpath,org.apache.lo
g4j,org.springframework.beans.factory.annotation,com.basistech.rex200
9.common,com.basistech.rex2009.common.decode",com.basistech.rex2009.c
ommon.decode;uses:="com.basistech.rex2009.common.data"
Bundle-Version: 1.0.0.SNAPSHOT
Bundle-Name: com.basistech.rex2009.common 1.0-SNAPSHOT [osgi]
Bundle-ClassPath: .,odfdom-0.6.16.jar,trove-2.0.4.jar,common-1.0-SNAPS
HOT.jar
Build-Jdk: 1.5.0_16
Private-Package: gnu.trove,gnu.trove.decorator,org.openoffice.odf.doc,
org.openoffice.odf.doc.element,org.openoffice.odf.doc.element.anim,or
g.openoffice.odf.doc.element.chart,org.openoffice.odf.doc.element.con
fig,org.openoffice.odf.doc.element.dc,org.openoffice.odf.doc.element.
dr3d,org.openoffice.odf.doc.element.draw,org.openoffice.odf.doc.eleme
nt.form,org.openoffice.odf.doc.element.math,org.openoffice.odf.doc.el
ement.meta,org.openoffice.odf.doc.element.number,org.openoffice.odf.d
oc.element.office,org.openoffice.odf.doc.element.presentation,org.ope
noffice.odf.doc.element.script,org.openoffice.odf.doc.element.style,o
rg.openoffice.odf.doc.element.svg,org.openoffice.odf.doc.element.tabl
e,org.openoffice.odf.doc.element.text,org.openoffice.odf.doc.element.
xforms,org.openoffice.odf.dom,org.openoffice.odf.dom.element,org.open
office.odf.dom.element.anim,org.openoffice.odf.dom.element.chart,org.
openoffice.odf.dom.element.config,org.openoffice.odf.dom.element.dc,o
rg.openoffice.odf.dom.element.dr3d,org.openoffice.odf.dom.element.dra
w,org.openoffice.odf.dom.element.form,org.openoffice.odf.dom.element.
math,org.openoffice.odf.dom.element.meta,org.openoffice.odf.dom.eleme
nt.number,org.openoffice.odf.dom.element.office,org.openoffice.odf.do
m.element.presentation,org.openoffice.odf.dom.element.script,org.open
office.odf.dom.element.style,org.openoffice.odf.dom.element.svg,org.o
penoffice.odf.dom.element.table,org.openoffice.odf.dom.element.text,o
rg.openoffice.odf.dom.element.xforms,org.openoffice.odf.dom.style,org
.openoffice.odf.dom.style.props,org.openoffice.odf.dom.type,org.openo
ffice.odf.dom.type.anim,org.openoffice.odf.dom.type.chart,org.openoff
ice.odf.dom.type.config,org.openoffice.odf.dom.type.dr3d,org.openoffi
ce.odf.dom.type.draw,org.openoffice.odf.dom.type.fo,org.openoffice.od
f.dom.type.form,org.openoffice.odf.dom.type.meta,org.openoffice.odf.d
om.type.number,org.openoffice.odf.dom.type.office,org.openoffice.odf.
dom.type.presentation,org.openoffice.odf.dom.type.smil,org.openoffice
.odf.dom.type.style,org.openoffice.odf.dom.type.svg,org.openoffice.od
f.dom.type.table,org.openoffice.odf.dom.type.text,org.openoffice.odf.
dom.type.xlink,org.openoffice.odf.dom.util,org.openoffice.odf.pkg,org
.openoffice.odf.pkg.manifest,resources
Bundle-ManifestVersion: 2
Bundle-SymbolicName: com.basistech.rex2009.common
Tool: Bnd-0.0.255
Embed-Dependency: common;inline=false,trove;inline=false,odfdom;inline
=false
On Thu, Feb 12, 2009 at 10:46 AM, Benson Margulies <bi...@gmail.com>wrote:
> I really need coffee today. Please ignore this until I get my head
> straightened out.
>
>
> On Thu, Feb 12, 2009 at 10:43 AM, Benson Margulies <bi...@gmail.com>wrote:
>
>> I had reached a point of terminal frustration with trying to build a
>> bundle that just incorporated Spring.
>>
>> So, I decided to stop hitting myself in the head with a rock, and just go
>> find the necessary artifacts to get bundles for the spring components.
>>
>> My POM is below.
>>
>> When I try to run it, I get a host of complaints about missing
>> 'Import-Package' constraints on my bundle.
>>
>> I'm really confused about Import-Package. Is it nonstandard? Is it only
>> Eclipse? Can I get bundle+bnd to generate it, or do I just need to write the
>> long boring list into the instruction section?
>>
>>
>>
>>
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
>> http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
>> http://maven.apache.org/POM/4.0.0
>> http://maven.apache.org/maven-v4_0_0.xsd">
>> <properties>
>>
>> <bundle.symbolicName>com.basistech.rex2009.common</bundle.symbolicName>
>> <wrapped.groupId>com.basistech.rex2009</wrapped.groupId>
>> <wrapped.artifactId>common</wrapped.artifactId>
>> <wrapped.version>1.0-SNAPSHOT</wrapped.version>
>> </properties>
>> <modelVersion>4.0.0</modelVersion>
>> <groupId>com.basistech.rex2009</groupId>
>> <artifactId>com.basistech.rex2009.common</artifactId>
>> <version>1.0-SNAPSHOT</version>
>> <parent>
>> <groupId>com.basistech.rex2009</groupId>
>> <artifactId>parent</artifactId>
>> <version>1.0-SNAPSHOT</version>
>> <relativePath>../parent/pom.xml</relativePath>
>> </parent>
>> <name>${bundle.symbolicName} ${wrapped.version} [osgi]</name>
>> <packaging>bundle</packaging>
>> <dependencies>
>> <dependency>
>> <groupId>${wrapped.groupId}</groupId>
>> <artifactId>${wrapped.artifactId}</artifactId>
>> <version>${wrapped.version}</version>
>> <optional>true</optional>
>> </dependency>
>> <dependency>
>> <groupId>org.apache.geronimo.specs</groupId>
>> <artifactId>geronimo-stax-api_1.0_spec</artifactId>
>> <version>1.0.1</version>
>> </dependency>
>> <dependency>
>> <groupId>org.springframework</groupId>
>> <artifactId>org.springframework.core</artifactId>
>> <version>2.5.4.A</version>
>> </dependency>
>> <dependency>
>> <groupId>org.springframework</groupId>
>> <artifactId>org.springframework.beans</artifactId>
>> <version>2.5.4.A</version>
>> </dependency>
>> <dependency>
>> <groupId>org.springframework</groupId>
>> <artifactId>org.springframework.context</artifactId>
>> <version>2.5.4.A</version>
>> </dependency>
>> <dependency>
>> <groupId>org.apache.log4j</groupId>
>> <artifactId>com.springsource.org.apache.log4j</artifactId>
>> <version>1.2.15</version>
>> </dependency>
>> <dependency>
>> <groupId>org.codehaus.woodstox</groupId>
>> <artifactId>com.springsource.com.ctc.wstx</artifactId>
>> <version>3.2.8</version>
>> </dependency>
>> <dependency>
>> <groupId>odfdom</groupId>
>> <artifactId>odfdom</artifactId>
>> <version>0.6.16</version>
>> </dependency>
>> <dependency>
>> <groupId>trove</groupId>
>> <artifactId>trove</artifactId>
>> <version>2.0.4</version>
>> </dependency>
>> </dependencies>
>> <build>
>> <plugins>
>> <plugin>
>> <artifactId>maven-eclipse-plugin</artifactId>
>> <configuration>
>> <outputDirectory>${eclipse.outputDirectory}</outputDirectory>
>> <buildcommands>
>>
>> <java.lang.String>org.eclipse.jdt.core.javabuilder</java.lang.String>
>>
>> <java.lang.String>org.eclipse.pde.ManifestBuilder</java.lang.String>
>>
>> <java.lang.String>org.eclipse.pde.SchemaBuilder</java.lang.String>
>>
>> <java.lang.String>org.eclipse.pde.api.tools.apiAnalysisBuilder</java.lang.String>
>> </buildcommands>
>> <projectnatures>
>> <nature>org.eclipse.pde.PluginNature</nature>
>> <nature>org.eclipse.jdt.core.javanature</nature>
>> <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
>> </projectnatures>
>> <pde>true</pde>
>> </configuration>
>> </plugin>
>> <plugin>
>> <groupId>org.apache.felix</groupId>
>> <artifactId>maven-bundle-plugin</artifactId>
>> <version>1.4.3</version>
>> <extensions>true</extensions>
>> <configuration>
>> <instructions>
>>
>> <Bundle-SymbolicName>${bundle.symbolicName}</Bundle-SymbolicName>
>> <Bundle-Version>${wrapped.version}</Bundle-Version>
>> <_exportcontents>com.basistech.rex2009.*</_exportcontents>
>>
>> <Embed-Dependency>${wrapped.artifactId};inline=false,trove;inline=false,odfdom;inline=false</Embed-Dependency>
>> </instructions>
>> </configuration>
>> </plugin>
>> </plugins>
>> </build>
>> <repositories>
>> <repository>
>> <id>geronimo.specs</id>
>> <name>Geronimo Specs</name>
>> <url>http://mirrors.ibiblio.org/pub/mirrors/maven2</url>
>> </repository>
>> <repository>
>> <id>com.springsource.repository.bundles.release</id>
>> <name>SpringSource Enterprise Bundle Repository - SpringSource Bundle
>> Releases</name>
>> <url>http://repository.springsource.com/maven/bundles/release</url>
>> </repository>
>> <repository>
>> <id>com.springsource.repository.bundles.external</id>
>> <name>SpringSource Enterprise Bundle Repository - External Bundle
>> Releases</name>
>> <url>http://repository.springsource.com/maven/bundles/external</url>
>> </repository>
>> </repositories>
>> </project>
>>
>>
>
Re: Mysterious missing constraints
Posted by Benson Margulies <bi...@gmail.com>.
I really need coffee today. Please ignore this until I get my head
straightened out.
On Thu, Feb 12, 2009 at 10:43 AM, Benson Margulies <bi...@gmail.com>wrote:
> I had reached a point of terminal frustration with trying to build a bundle
> that just incorporated Spring.
>
> So, I decided to stop hitting myself in the head with a rock, and just go
> find the necessary artifacts to get bundles for the spring components.
>
> My POM is below.
>
> When I try to run it, I get a host of complaints about missing
> 'Import-Package' constraints on my bundle.
>
> I'm really confused about Import-Package. Is it nonstandard? Is it only
> Eclipse? Can I get bundle+bnd to generate it, or do I just need to write the
> long boring list into the instruction section?
>
>
>
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
> http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd
> ">
> <properties>
> <bundle.symbolicName>com.basistech.rex2009.common</bundle.symbolicName>
> <wrapped.groupId>com.basistech.rex2009</wrapped.groupId>
> <wrapped.artifactId>common</wrapped.artifactId>
> <wrapped.version>1.0-SNAPSHOT</wrapped.version>
> </properties>
> <modelVersion>4.0.0</modelVersion>
> <groupId>com.basistech.rex2009</groupId>
> <artifactId>com.basistech.rex2009.common</artifactId>
> <version>1.0-SNAPSHOT</version>
> <parent>
> <groupId>com.basistech.rex2009</groupId>
> <artifactId>parent</artifactId>
> <version>1.0-SNAPSHOT</version>
> <relativePath>../parent/pom.xml</relativePath>
> </parent>
> <name>${bundle.symbolicName} ${wrapped.version} [osgi]</name>
> <packaging>bundle</packaging>
> <dependencies>
> <dependency>
> <groupId>${wrapped.groupId}</groupId>
> <artifactId>${wrapped.artifactId}</artifactId>
> <version>${wrapped.version}</version>
> <optional>true</optional>
> </dependency>
> <dependency>
> <groupId>org.apache.geronimo.specs</groupId>
> <artifactId>geronimo-stax-api_1.0_spec</artifactId>
> <version>1.0.1</version>
> </dependency>
> <dependency>
> <groupId>org.springframework</groupId>
> <artifactId>org.springframework.core</artifactId>
> <version>2.5.4.A</version>
> </dependency>
> <dependency>
> <groupId>org.springframework</groupId>
> <artifactId>org.springframework.beans</artifactId>
> <version>2.5.4.A</version>
> </dependency>
> <dependency>
> <groupId>org.springframework</groupId>
> <artifactId>org.springframework.context</artifactId>
> <version>2.5.4.A</version>
> </dependency>
> <dependency>
> <groupId>org.apache.log4j</groupId>
> <artifactId>com.springsource.org.apache.log4j</artifactId>
> <version>1.2.15</version>
> </dependency>
> <dependency>
> <groupId>org.codehaus.woodstox</groupId>
> <artifactId>com.springsource.com.ctc.wstx</artifactId>
> <version>3.2.8</version>
> </dependency>
> <dependency>
> <groupId>odfdom</groupId>
> <artifactId>odfdom</artifactId>
> <version>0.6.16</version>
> </dependency>
> <dependency>
> <groupId>trove</groupId>
> <artifactId>trove</artifactId>
> <version>2.0.4</version>
> </dependency>
> </dependencies>
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-eclipse-plugin</artifactId>
> <configuration>
> <outputDirectory>${eclipse.outputDirectory}</outputDirectory>
> <buildcommands>
>
> <java.lang.String>org.eclipse.jdt.core.javabuilder</java.lang.String>
>
> <java.lang.String>org.eclipse.pde.ManifestBuilder</java.lang.String>
>
> <java.lang.String>org.eclipse.pde.SchemaBuilder</java.lang.String>
>
> <java.lang.String>org.eclipse.pde.api.tools.apiAnalysisBuilder</java.lang.String>
> </buildcommands>
> <projectnatures>
> <nature>org.eclipse.pde.PluginNature</nature>
> <nature>org.eclipse.jdt.core.javanature</nature>
> <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
> </projectnatures>
> <pde>true</pde>
> </configuration>
> </plugin>
> <plugin>
> <groupId>org.apache.felix</groupId>
> <artifactId>maven-bundle-plugin</artifactId>
> <version>1.4.3</version>
> <extensions>true</extensions>
> <configuration>
> <instructions>
>
> <Bundle-SymbolicName>${bundle.symbolicName}</Bundle-SymbolicName>
> <Bundle-Version>${wrapped.version}</Bundle-Version>
> <_exportcontents>com.basistech.rex2009.*</_exportcontents>
>
> <Embed-Dependency>${wrapped.artifactId};inline=false,trove;inline=false,odfdom;inline=false</Embed-Dependency>
> </instructions>
> </configuration>
> </plugin>
> </plugins>
> </build>
> <repositories>
> <repository>
> <id>geronimo.specs</id>
> <name>Geronimo Specs</name>
> <url>http://mirrors.ibiblio.org/pub/mirrors/maven2</url>
> </repository>
> <repository>
> <id>com.springsource.repository.bundles.release</id>
> <name>SpringSource Enterprise Bundle Repository - SpringSource Bundle
> Releases</name>
> <url>http://repository.springsource.com/maven/bundles/release</url>
> </repository>
> <repository>
> <id>com.springsource.repository.bundles.external</id>
> <name>SpringSource Enterprise Bundle Repository - External Bundle
> Releases</name>
> <url>http://repository.springsource.com/maven/bundles/external</url>
> </repository>
> </repositories>
> </project>
>
>