Hi again!
In my quest to integrate maven + Eclipse RCP, I did the follow:
1) I downloaded and unzipped the
eclipse-rcp-europa-fall2-linux-gtk-x86_64.tar.gz file from the
eclipse.org website.
2) I executed the eclipse:to-maven task, using the maven-eclipse-plugin:
mvn eclipse:to-maven
-DeclipseDir=/home/fbdo/Applications/eclipse-rcp/eclipse-maven
where /home/fbdo/Applications/eclipse-rcp/eclipse-maven is the directory
path where I unzipped the file from step 1.
3) In my Eclipse RCP project, I created a new pom.xml file, as Stuart
suggested above. And I added the Eclipse RCP dependencies and others,
some of them was created in step 2, as a result of importing the eclipse
bundles to the local repository. I'm sending the resulting pom.xml attached.
4) Finally, I executed the command:
mvn clean eclipse:clean package eclipse:eclipse -Declipse.pde install
as Stuart also suggested.
Probably is my fault, but the resulting project doesn't compile in the
eclipse workspace. The plug-in dependencies are linked to my old target
platform, and some dependencies aren't resolved at all. I'm sending a
print screen with what I'm seeing.
If any one has a clue, I will be very thankful for your help.
Thanks again!
Stuart McCulloch wrote:
> On 29/01/2008, Fabio Braga de Oliveira <[EMAIL PROTECTED]> wrote:
>> Hi list!
>
>
> Hi Fabio,
>
> Anyone did a sucessful build of a eclipse plugin, using the
>> maven-bundle-plugin?
>
>
> yes :)
>
> If yes, can you share the pom.xml or some tips of
>> how to do? Or the right direction? I'm trying right now, but some pieces
>> doesn't work very well. Some tips of what to do with the plugin.xml,
>> build.properties and the MANIFEST.MF files, how to put in the right
>> position to use the PDE tools are welcome.
>
>
> 1) to get the MANIFEST.MF file in the right place you can use the
> manifestLocation setting:
>
> <plugin>
> <groupId>org.apache.felix</groupId>
> <artifactId>maven-bundle-plugin</artifactId>
> <version>1.2.0</version>
> <extensions>true</extensions>
> <!--
> the following instructions build a simple set of public/private
> classes into an OSGi bundle
> -->
> <configuration>
> <manifestLocation>META-INF</manifestLocation>
> <instructions>
> <!--
> ...your specific BND instructions to create the bundle...
> -->
> </instructions>
> </configuration>
> </plugin>
>
> 2) to get the plugin.xml file (stored in the project root) into your
final
> bundle, use:
>
> <resources>
> <resource>
> <directory>src/main/resources</directory>
> </resource>
> <resource>
> <directory>.</directory>
> <includes>
> <include>plugin.xml</include>
> </includes>
> </resource>
> </resources>
>
> and the bundleplugin will include it automatically to the right place
in the
> bundle.
>
> 3) you don't actually need a build.properties file as maven is
building the
> bundle
>
> 4) to create the Eclipse project metadata use:
>
> mvn clean package eclipse:eclipse -Declipse.pde install
>
> (note the install after the eclipse goal is to fix the manifest,
because the
> eclipse plugin
> can corrupt it by adding a blank line in the middle of the file
rather than
> at the end...)
>
> you should now be able to import your new plugin into Eclipse as an
existing
> project.
> (read http://maven.apache.org/plugins/maven-eclipse-plugin for other
useful
> goals)
<project>
<properties>
<bundle.symbolicName>
br.com.simula.desktop.sample
</bundle.symbolicName>
<bundle.namespace>
br.com.simula.desktop.sample
</bundle.namespace>
</properties>
<modelVersion>4.0.0</modelVersion>
<groupId>br.com.simula</groupId>
<artifactId>br.com.simula.desktop.sample</artifactId>
<version>1.0-SNAPSHOT</version>
<name>${bundle.symbolicName} [${bundle.namespace}]</name>
<packaging>bundle</packaging>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>.</directory>
<includes>
<include>plugin.xml</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>1.2.0</version>
<extensions>true</extensions>
<!--
the following instructions build a simple set of public/private classes into an OSGi bundle
-->
<configuration>
<manifestLocation>META-INF</manifestLocation>
<instructions>
<Bundle-SymbolicName>
${bundle.symbolicName}
</Bundle-SymbolicName>
<Bundle-Version>${pom.version}</Bundle-Version>
<!--
assume public classes are in the top package, and private classes are under ".internal"
-->
<Export-Package>
!${bundle.namespace}.internal.*,${bundle.namespace}.*;version="${pom.version}"
</Export-Package>
<Private-Package>
${bundle.namespace}.internal.*
</Private-Package>
<Bundle-Activator>
${bundle.namespace}.Activator
</Bundle-Activator>
<!--
embed compile/runtime dependencies using path that matches the copied dependency folder
-->
<Embed-Dependency>
*;scope=compile|runtime;inline=false
</Embed-Dependency>
<Embed-Directory>
target/dependency
</Embed-Directory>
<Embed-StripGroup>true</Embed-StripGroup>
</instructions>
</configuration>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<pde>true</pde>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>osgi_R4_core</artifactId>
<version>1.0</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>osgi_R4_compendium</artifactId>
<version>1.0</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>3.2.1.ga</version>
</dependency>
<!-- Eclipse RCP -->
<dependency>
<groupId>org.eclipse.core</groupId>
<artifactId>runtime</artifactId>
<version>3.3.100-v20070530</version>
</dependency>
<dependency>
<groupId>org.eclipse</groupId>
<artifactId>ui</artifactId>
<version>3.3.1-M20070910-0800b</version>
</dependency>
<dependency>
<groupId>org.eclipse.ui</groupId>
<artifactId>forms</artifactId>
<version>3.3.0-v20070511</version>
</dependency>
<dependency>
<groupId>org.eclipse</groupId>
<artifactId>swt</artifactId>
<version>3.3.2-v3347</version>
</dependency>
<dependency>
<groupId>org.eclipse.swt.gtk.linux</groupId>
<artifactId>x86_64</artifactId>
<version>3.3.2-v3347</version>
</dependency>
<dependency>
<groupId>com.ibm</groupId>
<artifactId>icu</artifactId>
<version>3.6.1-v20070906</version>
</dependency>
<dependency>
<groupId>org.eclipse.core</groupId>
<artifactId>commands</artifactId>
<version>3.3.0-I20070605-0010</version>
</dependency>
<dependency>
<groupId>org.eclipse.equinox</groupId>
<artifactId>common</artifactId>
<version>3.3.0-v20070426</version>
</dependency>
<dependency>
<groupId>org.eclipse.equinox</groupId>
<artifactId>registry</artifactId>
<version>3.3.1-R33x_v20070802</version>
</dependency>
<dependency>
<groupId>org.eclipse.core.runtime.compatibility</groupId>
<artifactId>registry</artifactId>
<version>3.2.100-v20070316</version>
</dependency>
<dependency>
<groupId>org.eclipse.equinox</groupId>
<artifactId>preferences</artifactId>
<version>3.2.100-v20070522</version>
</dependency>
<dependency>
<groupId>org.eclipse.core</groupId>
<artifactId>contenttype</artifactId>
<version>3.2.100-v20070319</version>
</dependency>
<dependency>
<groupId>org.eclipse.equinox</groupId>
<artifactId>app</artifactId>
<version>1.0.1-R33x_v20070828</version>
</dependency>
<dependency>
<groupId>org.eclipse.ui</groupId>
<artifactId>workbench</artifactId>
<version>3.3.1-M20070921-1200</version>
</dependency>
<dependency>
<groupId>org.eclipse.ui</groupId>
<artifactId>forms</artifactId>
<version>3.3.0-v20070511</version>
</dependency>
</dependencies>
</project>---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]