On 5/30/12 4:37 AM, Christian Schneider wrote:
> Can you try to add the feature of the api to the dependencies of the
> other feature?
>
> We do a similar thing when we define the sprign feature in karaf:
> <dependency>
> <groupId>org.apache.karaf.features</groupId>
> <artifactId>standard</artifactId>
> <version>${project.version}</version>
> <classifier>features</classifier>
> <type>xml</type>
> <scope>provided</scope>
> </dependency>
Ah, yeah, I was already doing that (it's how the api stuff ends up in
features.xml), just hadn't been specific enough in my original mail.
Hopefully attachments are allowed here; attached are the poms and
features.xml files. If not, I'll post them somewhere public. :)
It all looks good *except* that app-features.xml ends up with that extra
"<bundle>mvn:org.opennms.features.topology/org.opennms.features.topology.api/1.11.1-SNAPSHOT</bundle>"
that it should be inheriting from the <feature /> reference to the API
bit instead.
--
Benjamin Reed
The OpenNMS Group
http://www.opennms.org/
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<features xmlns="http://karaf.apache.org/xmlns/features/v1.0.0" name="OpenNMS Topology APIs">
<feature description="OpenNMS Topology APIs" version="1.11.1-SNAPSHOT" name="org.opennms.features.topology.api">
<details>APIs for topology manipulation and display.</details>
<bundle>mvn:org.opennms.features.topology/org.opennms.features.topology.api/1.11.1-SNAPSHOT</bundle>
<bundle>mvn:com.vaadin/vaadin/6.7.3</bundle>
<bundle>wrap:mvn:javax.servlet/servlet-api/2.5</bundle>
</feature>
</features>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<relativePath>../poms/compiled/</relativePath>
<groupId>org.opennms.features.topology.build</groupId>
<artifactId>compiled-bundle-settings</artifactId>
<version>1.11.1-SNAPSHOT</version>
</parent>
<properties>
<bundle.symbolicName>org.opennms.features.topology.api</bundle.symbolicName>
<bundle.namespace>org.opennms.features.topology.api</bundle.namespace>
</properties>
<modelVersion>4.0.0</modelVersion>
<groupId>org.opennms.features.topology</groupId>
<artifactId>org.opennms.features.topology.api</artifactId>
<version>1.11.1-SNAPSHOT</version>
<name>${bundle.symbolicName}</name>
<packaging>bundle</packaging>
<build>
<plugins>
<plugin>
<groupId>org.apache.karaf.tooling</groupId>
<artifactId>karaf-maven-plugin</artifactId>
<version>3.0.0-SNAPSHOT</version>
<executions>
<execution>
<id>generate</id>
<phase>generate-resources</phase>
<goals>
<goal>features-generate-descriptor</goal>
</goals>
<configuration>
<inputFile>src/main/features/features.xml.in</inputFile>
<outputFile>target/features.xml</outputFile>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<!--
| uncomment to add all imported (non-local) bundles to your compilation classpath
<dependency>
<type>pom</type>
<groupId>${parent.groupId}</groupId>
<artifactId>provision</artifactId>
<optional>true</optional>
</dependency>
-->
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</dependency>
</dependencies>
</project>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<features xmlns="http://karaf.apache.org/xmlns/features/v1.0.0" name="OpenNMS Topology Application">
<feature description="OpenNMS Topology Application" version="1.11.1-SNAPSHOT" name="org.opennms.features.topology.app">
<details>The main Vaadin-based OpenNMS topology application.</details>
<feature version="1.11.1-SNAPSHOT">org.opennms.features.topology.api</feature>
<bundle>mvn:org.opennms.features.topology/org.opennms.features.topology.app/1.11.1-SNAPSHOT</bundle>
<bundle>mvn:org.opennms.features.topology/org.opennms.features.topology.api/1.11.1-SNAPSHOT</bundle>
<bundle>mvn:org.ops4j.pax.vaadin/service/0.1.0-SNAPSHOT</bundle>
<bundle>wrap:mvn:com.google.gwt/gwt-user/2.3.0</bundle>
<bundle>wrap:mvn:net.sf.jung/jung-api/2.0.1</bundle>
<bundle>wrap:mvn:net.sourceforge.collections/collections-generic/4.01</bundle>
<bundle>wrap:mvn:net.sf.jung/jung-graph-impl/2.0.1</bundle>
<bundle>wrap:mvn:net.sf.jung/jung-algorithms/2.0.1</bundle>
<bundle>wrap:mvn:colt/colt/1.2.0</bundle>
<bundle>wrap:mvn:concurrent/concurrent/1.3.4</bundle>
<bundle>wrap:mvn:net.sf.jung/jung-visualization/2.0.1</bundle>
</feature>
<feature description="OpenNMS Topology APIs" version="1.11.1-SNAPSHOT" name="org.opennms.features.topology.api">
<details>APIs for topology manipulation and display.</details>
<bundle>mvn:org.opennms.features.topology/org.opennms.features.topology.api/1.11.1-SNAPSHOT</bundle>
<bundle>mvn:com.vaadin/vaadin/6.7.3</bundle>
<bundle>wrap:mvn:javax.servlet/servlet-api/2.5</bundle>
</feature>
</features>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<features xmlns="http://karaf.apache.org/xmlns/features/v1.0.0" name="OpenNMS Topology Application">
<feature name="org.opennms.features.topology.app" version="${project.version}" description="OpenNMS Topology Application">
<details>The main Vaadin-based OpenNMS topology application.</details>
<feature version="${project.version}">org.opennms.features.topology.api</feature>
<bundle>mvn:${project.groupId}/${project.artifactId}/${project.version}</bundle>
</feature>
</features>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<relativePath>../poms/compiled/</relativePath>
<groupId>org.opennms.features.topology.build</groupId>
<artifactId>compiled-bundle-settings</artifactId>
<version>1.11.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.opennms.features.topology</groupId>
<artifactId>org.opennms.features.topology.app</artifactId>
<version>1.11.1-SNAPSHOT</version>
<name>${bundle.symbolicName}</name>
<packaging>bundle</packaging>
<properties>
<bundle.symbolicName>org.opennms.features.topology.app</bundle.symbolicName>
<bundle.namespace>org.opennms.features.topology.app</bundle.namespace>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.karaf.tooling</groupId>
<artifactId>karaf-maven-plugin</artifactId>
<version>3.0.0-SNAPSHOT</version>
<extensions>true</extensions>
<executions>
<execution>
<id>generate</id>
<phase>generate-resources</phase>
<goals>
<goal>features-generate-descriptor</goal>
</goals>
<configuration>
<inputFile>src/main/features/features.xml.in</inputFile>
<outputFile>target/features.xml</outputFile>
<aggregateFeatures>true</aggregateFeatures>
<!-- <includeTransitiveDependency>false</includeTransitiveDependency> -->
</configuration>
</execution>
</executions>
</plugin>
<!-- Compiles your custom GWT components with the GWT compiler -->
<!-- A hosted mode browser for client-side widget debugging can be run with the goal gwt:run after uncommenting the
correct line below. A remote debugger can then be connected to port 8998. Note that e.g. a Jetty server should be running
with the server side parts - use the goal jetty:run . -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>${gwt.plugin.version}</version>
<configuration>
<!-- <modules> <module>org.opennms.features.vaadin.topology.gwt.MyWidgetSet</module> </modules> -->
<webappDirectory>target/gwt/VAADIN/widgetsets</webappDirectory>
<extraJvmArgs>-Xmx512M -Xss1024k</extraJvmArgs>
</configuration>
<executions>
<execution>
<goals>
<goal>resources</goal>
<goal>compile</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-dev</artifactId>
<version>${gwt.version}</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwt.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>1.0.2</version>
<executions>
<execution>
<configuration></configuration>
<goals>
<goal>update-widgetset</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<!--
| uncomment to add all imported (non-local) bundles to your compilation classpath
<dependency>
<type>pom</type>
<groupId>${parent.groupId}</groupId>
<artifactId>provision</artifactId>
<optional>true</optional>
</dependency>
-->
<!-- scope: provided because we include feature=org.opennms.features.topology.api
in src/main/features/features.xml.in -->
<dependency>
<groupId>org.opennms.features.topology</groupId>
<artifactId>org.opennms.features.topology.api</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.opennms.features.topology</groupId>
<artifactId>org.opennms.features.topology.api</artifactId>
<version>${project.version}</version>
<classifier>features</classifier>
<type>xml</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.ops4j.pax.vaadin</groupId>
<artifactId>service</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin</artifactId>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>net.sf.jung</groupId>
<artifactId>jung-api</artifactId>
</dependency>
<dependency>
<groupId>net.sf.jung</groupId>
<artifactId>jung-graph-impl</artifactId>
</dependency>
<dependency>
<groupId>net.sf.jung</groupId>
<artifactId>jung-algorithms</artifactId>
</dependency>
<dependency>
<groupId>net.sf.jung</groupId>
<artifactId>jung-visualization</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
</dependencies>
</project>