After you start Felix, type "obr list" and you will get a list of some released bundles. iPOJO will be in there, so you can type "obr deploy iPOJO" to install it.

Also, from the way you start Felix it looks like you are using 1.2.1, but then you try to add a dependency for 1.0.2...I am not sure what it up with that.

Further, the dependency you are adding doesn't really make much sense. Are you trying to add a dependency to the framework? If so, that shouldn't be necessary, since I doubt your bundle depends on Felix. Maven won't help you resolve your bundle's dependencies once installed into the framework. Actually, OBR will help you do that. The maven-bundle-plugin generates an OBR repository.xml file in ~/.m2/repository/, so if you add that URL to the list of OBR repository URLs in the conf/config.properties, I believe you will be able to use OBR to deploy your bundle and all of its dependencies, e.g., "obr deploy your-bundle-name".

Regarding your last question, no version of Felix requires to be run from its install directory, but the conf/config.properties file does assume that it will be. If you want to change that assumption, edit the config file so that it uses absolute URLs to refer to the shell bundles, not relative ones. Since we don't use an installer program, we cannot put absolute URLs during installation.

-> richard

clement escoffier wrote:
Hi,


2008/11/9 Brad Cox <[EMAIL PROTECTED]>

I've been trying to figure out how to make eclipse, maven and osgi work
together with no success. Decided to follow Kriens advice and remove eclipse
from the chain. Now building from console in maven and trying to execute in
felix/ipojo. Here's what I'm getting:

/Applications/felix-1.2.1: felix
Welcome to Felix.
=================
Enter profile name: s
-> start
file:/Users/bradcox/.m2/repository/soakit/soakit.core/1.0-SNAPSHOT/soakit.core-1.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Unresolved constraint in bundle 4:
package; (&(package=org.apache.felix.ipojo)(version>=0.9.0))


This error means that the iPOJO bundle is not deployed. To provide the iPOJO
runtime, you need to stat the iPOJO main bundles:
start
http://apache.miroir-francais.fr/felix/org.apache.felix.ipojo-1.0.0.jar



I think I need ipojo and/or felix as a dependency but have been unable to
find anything but its pom (no jar). Can someone help with that? In
particular adding this to the pom doesn't work:

                       <dependency>
                               <groupId>org.apache.felix</groupId>
                               <artifactId>felix</artifactId>
                               <version>1.0.2</version>
                       </dependency>

More fundamentally, why must felix be run from its home directory? How to
execute it elsewhere? When I just moved felix.jar and nothing else, it just
hung.


Not necessary. You should depend only on artifacts containing
"specifications" such as org.osgi.compendium and org.osgi.core to avoid
dependencies on specific implementations.

In your pom file, why do you have both iPOJO and a bundle activator. It is
possible to have both, but it's rare because it means that your bundle
contains a mixed set of iPOJO powered components and "regular" OSGi code.

Regards,

Clement



Here's the pom:
<?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";
<modelVersion>4.0.0</modelVersion>
 <groupId>soakit</groupId>
 <artifactId>soakit.core</artifactId>
 <version>1.0-SNAPSHOT</version>
 <name>soakit.core</name>
 <description>SoaKit Core Bundle. Defines interfaces and abstract classes
for the components defined in sub-moduless and a service (factory class) for
defining soakit composites from an XML configuration file.</description>
 <packaging>bundle</packaging>

 <parent>
   <groupId>soakit</groupId>
   <artifactId>soakit</artifactId>
   <version>1.0-SNAPSHOT</version>
 </parent>

 <dependencies>
                       <dependency>
                               <groupId>org.jdom</groupId>

 <artifactId>com.springsource.org.jdom</artifactId>
                               <version>1.0.0</version>
                       </dependency>
                       <dependency>
                               <groupId>org.apache.commons</groupId>

 <artifactId>com.springsource.org.apache.commons.collections</artifactId>
                               <version>3.2.0</version>
                       </dependency>
</dependencies>

 <build>
   <plugins>
                       <plugin>
                               <groupId>org.apache.felix</groupId>
                               <artifactId>maven-bundle-plugin</artifactId>
                               <version>1.4.3</version>
                               <extensions>true</extensions>
                               <configuration>

 <manifestLocation>META-INF</manifestLocation>
                                       <instructions>

 <Bundle-Version>${pom.version}</Bundle-Version>

 <Bundle-Name>${artifactId}</Bundle-Name>

 <Bundle-SymbolicName>${artifactId}</Bundle-SymbolicName>

 <Bundle-Description>Soakit Core Bundle</Bundle-Description>

<Bundle-Activator>com.gestalt.soakit.core.CompositeActivator</Bundle-Activator>

<Bundle-RequiredExecutionEnvironment>J2SE-1.5</Bundle-RequiredExecutionEnvironment>
                   <Embed-Directory>target/dependency</Embed-Directory>
                                                       <!--
                   <_include>~META-INF/MANIFEST.MF</_include>
                                                       -->
                                                       <_failok/>

 <Bundle-ClassPath>.,lib</Bundle-ClassPath>

 <Embed-Directory>lib</Embed-Directory>

 <Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>

 <Embed-Transitive>true</Embed-Transitive>

 <Import-Package>*;resolution:=optional</Import-Package>
                                                       <Export-Package>

 com.gestalt.soakit.core.*;version="${pom.version}",

 org.jdom.*,

 org.jdom.input.*,

 org.jdom.output.*,

 org.apache.felix.ipojo.*,

 org.apache.commons.collections.*,
                                                       </Export-Package>
                                       </instructions>
                               </configuration>
                       </plugin>
                       <plugin>
                               <groupId>org.apache.felix</groupId>
                               <artifactId>maven-ipojo-plugin</artifactId>
                               <version>1.0.0</version>
                               <executions>
                                       <execution>
                                               <goals>

 <goal>ipojo-bundle</goal>
                                               </goals>
                                       </execution>
                               </executions>
                       </plugin>
               </plugins>
 </build>
</project>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to