Hello,
I just took over the maintenance of several OSGi bundles. I added the
mvn-eclipse-plugin to the POM files for each of the bundles because I'd
like to generate the necessary Eclipse project files to work with the
source code and use the OSGi Framework launcher in the Eclipse IDE:
<plugin>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.9</version>
<configuration>
<pde>true</pde>
</configuration>
</plugin>
For reasons I don't understand, running "mvn eclipse:eclipse" generates
a .project file with an incomplete set of linked resources. For
example, I have a POM file for one of the bundles that has the following
3 dependencies:
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.main</artifactId>
<version>4.2.1</version>
</dependency>
<dependency>
<groupId>com.jgoodies</groupId>
<artifactId>looks</artifactId>
<version>2.2.2</version>
</dependency>
The generated .project file for this bundle only has one linked resource
to one of the artifacts:
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.protege.common</name>
<comment>Core Protege Libraries. NO_M2ECLIPSE_SUPPORT: Project files
created with the maven-eclipse-plugin are not supported in
M2Eclipse.</comment>
<projects/>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
</natures>
<linkedResources>
<link>
<name>looks-2.2.2.jar</name>
<type>1</type>
<location>C:/Users/vendetti/.m2/repository/com/jgoodies/looks/2.2.2/looks-2.2.2.jar</location>
</link>
</linkedResources>
</projectDescription>
When I try to import the existing PDE project into Eclipse, I get
compiler errors since the other two artifacts aren't listed as linked
resources.
Is there something I'm missing about how to properly use this plug-in?
I'm using Maven version 3.1.0. Any help and/or advice would be very
much appreciated.
Jennifer
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]