I am having problems with the maven-bundle plugin:
I want to deploy my project as an osgi package, so I use packaging as a kit. But it seems that the pump does not know the package in the form of a bundle. Here you can see my pom.xml:
<project ...>... <packaging>bundle</packaging> <version>1.0.0</version> <name>Simple CXF project using spring configuration</name> <properties> <cxf-version>2.4.2</cxf-version> </properties> <build> <pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.5</source> <target>1.5</target> </configuration> </plugin> <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <extensions>true</extensions> <version>2.3.5</version> <configuration> <instructions> <Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName> <Bundle-Name>${project.name}</Bundle-Name> <Bundle-Version>${project.version}</Bundle-Version> <Export-Package>demo.hw.server</Export-Package> <Bundle-Activator>demo.hw.server.Activator</Bundle-Activator> <Require-Bundle>org.apache.cxf.bundle</Require-Bundle> </instructions> </configuration> </plugin> </plugins> </pluginManagement> </build> <dependencies> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-frontend-jaxws</artifactId> <version>${cxf-version}</version> </dependency> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-transports-http</artifactId> <version>${cxf-version}</version> </dependency> <dependency> <groupId>org.apache.felix</groupId> <artifactId>org.osgi.core</artifactId> <version>1.4.0</version> </dependency> </dependencies> </project>
They say that this error has already been fixed (http://jira.codehaus.org/browse/MNG-4338), but it seems to me that this is not so. Has anyone encountered this problem before and found a solution?
The error message looks like this:
[INFO] Scanning for projects... [ERROR] The build could not read 1 project -> [Help 1] [ERROR] [ERROR] The project com.talend.liugang.cxf:java_first_jaxws:1.0.0 (C:\Users\Andreas\workspace\java_first_jaxws\pom.xml) has 1 error [ERROR] Unknown packaging: bundle @ line 7, column 13 [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
Regards, Saen
source share