开发者

Integrate Eclipse RAP and OSGI/Spring-DM plugins, using Maven for build

开发者 https://www.devze.com 2022-12-22 00:14 出处:网络
The background I have a project containing my domain model and persistence code (created using Spring-ROO). I\'ve changed this into an OSGi bundle, and build & deploy it using Maven (via PAX Const

The background I have a project containing my domain model and persistence code (created using Spring-ROO). I've changed this into an OSGi bundle, and build & deploy it using Maven (via PAX Construct scripts). This bundle deploys nicely to Equinox, and I can access the various services,etc.

I also have a Eclipse RAP plugin/bundle from where I want to call the services/spring beans implemented by the domain bundle. And this is where things get interesting.

The question(s):

1) How do I setup the Eclipse RAP project to be build by Maven? I used the mvn eclipse:to-maven goal to get my Eclipse RAP target platform's plugins into my local repository, but when I use:

`pax-import-bundle -g org.eclipse.rap -a ui -v 1.3.0 -- -DimportTransitive -DwidenScope  `

I get this error:

[INFO] [pax:import-bundle {execution: default-cli}]

[INFO] Importing Eclipse UI to com.propertyselldirect.propsell.build:provision:pom:1.0.0-SNAPSHOT

[INFO] Adding Eclipse UI as dependency to com.propertyselldirect:rap:bundle:1.0.0-SNAPSHOT

[INFO] ------------------------------------------------------------------------

[ERROR] FATAL ERROR

[INFO] ------------------------------------------------------------------------

[INFO] version was null for org.eclipse.core:runtime

[INFO] ------------------------------------------------------------------------

[INFO] Trace

java.lang.NullPointerException: version was null for org.eclipse.core:runtime

at org.apache.maven.artifact.DefaultArtifact.getBaseVersion(DefaultArtifact.java:390)

I have also tried adding every eclipse runtime & rap dependency by hand, and then the project builds, but when I deploy to OSGi (using pax-provision) then most of the Eclipse RAP (and org.eclipse.core.runtime) plugins are not active. They are mostly listed as INSTALLED.

2) Alternatively, should I rather use the Eclipse PDE to build, and then include my domain plugin (and p开发者_JAVA百科robably all the Spring-DM bundles) as dependencies. In this case, how would I (automatically) get Eclipse PDE to get access to those plugins/bundles, which would be deployed to my Maven repository? Do I install them manually to some target platform directoty, and make that my RAP target platform? (i.e. thus having the RAP target platform with all the Spring-DM bundles added).

I have many more questions, but will suffice with these for now.

Any pointers to useful documentation/articles on the web will be very welcome. I have googled, but not found anything specifically helpful.


with some of my friends we create the dynaresume project (http://code.google.com/p/dynaresume/). Our main goal is to leverage best practices araund : - Eclipse RCP - Spring DM - JPA

For the time being It works but It does not many things It's mainly a proof of concept

We try also to provide a Web Client such as Eclipse RAP.

I mavenized all this stuff using Maven 3/Tycho which is IMHO the easiest way to mavenize OSGi bundles.

I suppose we should keep in touch since we aiming the same goal.


I'm not an OSGi expert but maybe have a look at Introduction to OSGi with Pax, Maven, and Nexus Professional. It looks like Sonatype wrote some stuff on this subject.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号