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))

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.

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]

Reply via email to