Hello! 
I want to make one simple bundle using maven-bundle-plugin (2.3.7). I use 
packaging "bundle" but I got error in eclipse "Project build error: Unknown 
packaging: bundle" and the error "Unknown packaging: bundle @ line 7, column 
13" when I tryed to invoke maven install. When I change version of 
maven-bundle-plugin from 2.3.7 to 1.4.0 error dissapeared. When I tryed to use 
version 2.3.5 or 2.3.6 I got another error:

[ERROR] Failed to execute goal 
org.apache.felix:maven-bundle-plugin:2.3.6:bundle (default-bundle) on project 
bundle: Execution default-bundle of goal 
org.apache.felix:maven-bundle-plugin:2.3.6:bundle failed: A required class was 
missing while executing org.apache.felix:maven-bundle-plugin:2.3.6:bundle: 
aQute/lib/osgi/Resource
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.apache.felix:maven-bundle-plugin:2.3.6
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = 
file:/C:/Users/Chief/.m2/repository/org/apache/felix/maven-bundle-plugin/2.3.6/maven-bundle-plugin-2.3.6.jar
[ERROR] urls[1] = 
file:/C:/Users/Chief/.m2/repository/biz/aQute/bndlib/1.50.0/bndlib-1.50.0.jar
[ERROR] urls[2] = 
file:/C:/Users/Chief/.m2/repository/org/apache/felix/org.apache.felix.bundlerepository/1.6.6/org.apache.felix.bundlerepository-1.6.6.jar
[ERROR] urls[3] = 
file:/C:/Users/Chief/.m2/repository/org/osgi/org.osgi.core/4.1.0/org.osgi.core-4.1.0.jar
[ERROR] urls[4] = 
file:/C:/Users/Chief/.m2/repository/org/easymock/easymock/2.4/easymock-2.4.jar
[ERROR] urls[5] = 
file:/C:/Users/Chief/.m2/repository/org/apache/maven/reporting/maven-reporting-api/2.0.7/maven-reporting-api-2.0.7.jar
[ERROR] urls[6] = 
file:/C:/Users/Chief/.m2/repository/org/apache/maven/doxia/doxia-sink-api/1.0-alpha-7/doxia-sink-api-1.0-alpha-7.jar
[ERROR] urls[7] = 
file:/C:/Users/Chief/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar
[ERROR] urls[8] = 
file:/C:/Users/Chief/.m2/repository/commons-cli/commons-cli/1.0/commons-cli-1.0.jar
[ERROR] urls[9] = 
file:/C:/Users/Chief/.m2/repository/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4.jar
[ERROR] urls[10] = 
file:/C:/Users/Chief/.m2/repository/org/apache/maven/maven-archiver/2.4.1/maven-archiver-2.4.1.jar
[ERROR] urls[11] = 
file:/C:/Users/Chief/.m2/repository/org/codehaus/plexus/plexus-archiver/1.0/plexus-archiver-1.0.jar
[ERROR] urls[12] = 
file:/C:/Users/Chief/.m2/repository/org/codehaus/plexus/plexus-io/1.0/plexus-io-1.0.jar
[ERROR] urls[13] = 
file:/C:/Users/Chief/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.13/plexus-interpolation-1.13.jar
[ERROR] urls[14] = 
file:/C:/Users/Chief/.m2/repository/org/apache/maven/shared/maven-dependency-tree/1.2/maven-dependency-tree-1.2.jar
[ERROR] urls[15] = 
file:/C:/Users/Chief/.m2/repository/org/codehaus/plexus/plexus-utils/2.1/plexus-utils-2.1.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm 
ClassRealm[project>chief37:bundle:0.0.1-SNAPSHOT, parent: ClassRealm[maven.api, 
parent: null]]]
[ERROR] 
[ERROR] -----------------------------------------------------: 
aQute.lib.osgi.Resource
[ERROR] -> [Help 1]
[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/PluginContainerException



Eclipse 4.2 Juno, JDK 1.7.0_09.

What's wrong with my pom.xml? Can you help me?
Thanks in advance.

<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/xsd/maven-4.0.0.xsd";>
        <modelVersion>4.0.0</modelVersion>
        <groupId>chief37</groupId>
        <artifactId>bundle</artifactId>
        <version>0.0.1-SNAPSHOT</version>
        <packaging>bundle</packaging>
        <name>chief37.bundle</name>
        <description>chief37 universal bundle</description>
        <build>
                <sourceDirectory>src</sourceDirectory>
                <plugins>
                        <plugin>
                                <groupId>org.apache.felix</groupId>
                                <artifactId>maven-bundle-plugin</artifactId>
                                <version>2.3.7</version>
                                <extensions>true</extensions>
                                <configuration>
                                        <instructions>
                                                
<Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
                                                
<Bundle-Name>${project.name}</Bundle-Name>
                                                
<Bundle-Version>${project.version}</Bundle-Version>
                                                
<Bundle-Activator>chief37.bundle.Activator</Bundle-Activator>
                                                
<Embed-Dependency>*;scope=compile|runtime;inline=false</Embed-Dependency>
                                                
<Embed-Directory>lib</Embed-Directory>
                                                
<Embed-Transitive>false</Embed-Transitive>
                                        </instructions>
                                </configuration>
                        </plugin>
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-resources-plugin</artifactId>
                                <version>2.6</version>
                                <configuration>
                                        
<encoding>${project.build.sourceEncoding}</encoding>
                                </configuration>
                        </plugin>
                        <plugin>
                                <artifactId>maven-compiler-plugin</artifactId>
                                <version>3.0</version>
                                <configuration>
                                        <source>1.7</source>
                                        <target>1.7</target>
                                </configuration>
                        </plugin>
                </plugins>
        </build>
        <dependencies>
                <dependency>
                        <groupId>org.apache.felix</groupId>
                        <artifactId>org.osgi.core</artifactId>
                        <version>1.4.0</version>
                </dependency>
                <dependency>
                        <groupId>chief37</groupId>
                        <artifactId>datamodel</artifactId>
                        <version>0.0.1-SNAPSHOT</version>
                </dependency>
                <dependency>
                        <groupId>chief37</groupId>
                        <artifactId>service</artifactId>
                        <version>0.0.1-SNAPSHOT</version>
                </dependency>
        </dependencies>
</project> 

-- 
Best regards,
Andrei.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to