Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Working with eclipse-plugin in Eclipse with Maven dependencies

Sorry for the late answer. First thank you for explanations/proposal.

I finally choose another solution I want to share. My Maven/Tycho build use a target plateform defined by:
  - definition file: target-platform.target with URL to remote update sites
  - few Maven dependencies (osgi compliant) like commons-io declared in root pom + <pomDependencies>consider</pomDependencies>

In order to work in Eclipse I am using (and enabling) a dev-target-platform.target file that is a copy of target-platform.target with one additional entry for each Maven dependency:
<location path="${M2_REPO}/commons-io/commons-io/2.4" type="Directory"/>

For now I have to take care to keep pom.xml+target-platform.target and dev-target-platform.target in sync with each other. Maybe would it be possible to write a plugin to generate the "dev" target platform file automatically? Something like
mvn tycho:effective-target-platform-def?

This way developers on a Tycho project would have a very easy setup to work in Eclipse.

Does it seem a valuable solution?

Julien

FYI: https://github.com/SonarSource/sonar-eclipse


De : "Oberlies, Tobias" <tobias.oberlies@xxxxxxx>
À : Tycho user list <tycho-user@xxxxxxxxxxx>
Envoyé le : Mercredi 31 octobre 2012 10h17
Objet : Re: [tycho-user] Working with eclipse-plugin in Eclipse with Maven dependencies

Another workaround is to build an eclipse-repository in your project with includeAllDependencies=true, and then set that p2 repository as target platform in Eclipse.

Regards
Tobias

> -----Original Message-----
> From: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-
> bounces@xxxxxxxxxxx] On Behalf Of Igor Fedorenko
> Sent: Dienstag, 30. Oktober 2012 14:34
> To: tycho-user@xxxxxxxxxxx
> Subject: Re: [tycho-user] Working with eclipse-plugin in Eclipse with
> Maven dependencies
>
> This is a PDE limitation. Inside Eclipse workspace it does not allow
> per-project target platform configuration and there is no API to provide
> target platform contents either. There is nothing m2e and/or tycho can
> do unless these PDE limitations are addressed.
>
> --
> Regards,
> Igor
>
> On 12-10-29 4:53 AM, Julien HENRY wrote:
> > [1] =
> > http://repo1.maven.org/maven2/org/slf4j/slf4j-api/1.7.2/slf4j-api-
> 1.7.2.jar
> >
> >    --------------------------------------------------------------------
> ----
> >    *De :* Julien HENRY <henryju@xxxxxxxx>
> >    *À :* "tycho-user@xxxxxxxxxxx" <tycho-user@xxxxxxxxxxx>
> >    *Envoyé le :* Lundi 29 octobre 2012 9h49
> >    *Objet :* [tycho-user] Working with eclipse-plugin in Eclipse with
> >    Maven dependencies
> >
> >    Hi,
> >
> >    I'm working on a project with a similar layout than itp02:
> >        - some third party dependencies are regular Maven/JAR with
> >    correct OSGI informations added to the MANIFEST. These dependencies
> >    are available in my local Maven repository
> >        - I work on an eclipse-plugin (MANIFEST first) with nothing in
> >    the pom but Maven dependencies on JARs (and tycho declaration of
> course)
> >
> >    My concern is that I don't find a way to work in Eclipse without the
> >    requirement to have all third party projects opened in Eclipse. You
> >    can easily reproduce my issue with:
> >
> >    git clone git://git.eclipse.org/gitroot/tycho/org.eclipse.tycho-
> demo.git
> >    cd itp02
> >    mvn clean install
> >
> >    Then in Eclipse (with m2e and Tycho connector) you can import the
> >    whole itp02 projects and everything will be ok.
> >    tycho.demo.itp02.bundle have a workspace "Plug-in Dependencies"
> >    referencing pomfirst-bundle.
> >    But as soon as you close pomfirst-bundle project, the build is red.
> >    I was expecting tycho.demo.itp02.bundle to be updated to have a
> >    dependency on pomfirst-bundle.jar that is installed in my local
> >    Maven repository.
> >
> >
> >    In order to be able to work I am currently forced to create a
> >    "wrapper" bundle that will contains all my third party deps (like
> >    the pomfirst-thirdparty demo). But in this case I think I have to
> >    declare all OSGI informations again in the maven-bundle-plugin
> >    configuration and I don't see the interest of having declared a
> >    correct MANIFEST in my third party deps.
> >
> >    In other words, what is the simplest way to use Maven JAR like [1]
> >    that declare correct OSGI metadata without having to wrap it in a
> >    bundle?
> >
> >    Thanks
> >
> >    Julien
> >
> >    _______________________________________________
> >    tycho-user mailing list
> >    tycho-user@xxxxxxxxxxx <mailto:tycho-user@xxxxxxxxxxx>
> >    https://dev.eclipse.org/mailman/listinfo/tycho-user
> >
> >
> >
> >
> > _______________________________________________
> > tycho-user mailing list
> > tycho-user@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/tycho-user
> >
> _______________________________________________
> tycho-user mailing list
> tycho-user@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user



Back to the top