[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] [Tycho-user] Target Definition entry to local p2 repository

Maybe I can explain shortly how we solve a similar situation.

We have some own serverside-dependecies and additional thirdparty libraries, our RCP application depends on.
To make them available, we configured a maven project, to generate a p2 repository for these bundles.

Generation works in three steps:

First we resolve all dependencies with the dependency plugin and its copy goal.
Then, also with the maven-depenency-plugin we copy them to a defined destination in the targetfolder.
It is important, that the destination folder is /target/source/plugins or ~/features if you have features.

Then we configured the tycho-p2-extras-plugin to publish the artifacts of this folder into another folder as a valid p2 site.

ÂÂÂ ÂÂÂ ÂÂÂ <plugin>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <groupId>org.eclipse.tycho.extras</groupId>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <artifactId>tycho-p2-extras-plugin</artifactId>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <version>${tycho-version}</version>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <executions>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <execution>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <phase>package</phase>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <goals>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <goal>publish-features-and-bundles</goal>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ </goals>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ </execution>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ </executions>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <configuration>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <compress>false</compress>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ </configuration>
ÂÂÂ ÂÂÂ ÂÂÂ </plugin>

The result is, that all publishable plugins then are published into the default-folder /target/repository/
This folder then can be consumed as a valid p2-repository by tycho.

Please check out https://docs.sonatype.org/display/TYCHO/Tycho-extras+-+FeaturesAndBundlesPublisher for an example. This is what inspired us for this solution.

Hope, this helps.


2011/12/7 Oliver Pfau <Oliver.Pfau@xxxxxxxxxxxx>

No, I am not sureâbecause it is the first p2 repository I created J

But I do not know how to integrate the 3rd party jars in the tycho build otherwise. The maintenance of the p2 repository is a little bit annoying. I ask myself how the people from eclipse do this.

Â

Â

Von: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx] Im Auftrag von Markward Schubert
Gesendet: Dienstag, 6. Dezember 2011 16:46
An: Tycho user list
Betreff: Re: [tycho-user] [Tycho-user] Target Definition entry to local p2 repository

Â

Oliver, are you sure, the local directory you point to is a valid p2 repository, asked before?
I am not an expert on P2, but we have a pretty similar scenario here, which works out for us.

We actually create our local repo by actively publishing bundles from one simple plugin-folder with the help of the tycho-p2-extras-plugin's publish-features-and-bundles-goal. This creates some metadata, wich makes our repo understood by tycho.

As far as i understand, this goal is a wrapper for the "Features And Bundles Publisher Application" of eclipse.

Hope this helps

2011/12/6 Oliver Pfau <Oliver.Pfau@xxxxxxxxxxxx>

This

  <repository>
    <id>indigo</id>
    <layout>p2</layout>
    <url>file:${user.home}/p2-repo</url>
  </repository>

in the parent pom also works for me, but I Âtried to move all in the .target file of eclipse. At this time I have the defintion on 2 places.... pom and target Definition. I thought it is quite easy to give the target definition to tycho.


-----UrsprÃngliche Nachricht-----
Von: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx] Im Auftrag von Aaron Digulla
Gesendet: Dienstag, 6. Dezember 2011 15:22
An: tycho-user@xxxxxxxxxxx
Betreff: Re: [tycho-user] Target definition entry to local p2 repository

Zitat von Oliver Pfau <Oliver.Pfau@xxxxxxxxxxxx>:

> No success. Tycho fails to resolve the dependencies from the local
> p2 repository. Probably I have to define a category in the local p2
> repository. I try this.

No, Tycho ignores categories and features; you can only compile
against bundles.

Are you sure the local repo is valid (artifact and content files are
valid, correct, and up-to-date)?

FWIW, I use this in my POM:

  <repository>
    <id>indigo</id>
    <layout>p2</layout>
    <url>file:${user.home}/p2-repo</url>
  </repository>

and this works.

Regards,

> -----UrsprÃngliche Nachricht-----
> Von: tycho-user-bounces@xxxxxxxxxxx
> [mailto:tycho-user-bounces@xxxxxxxxxxx] Im Auftrag von Aaron Digulla
> Gesendet: Dienstag, 6. Dezember 2011 15:02
> An: tycho-user@xxxxxxxxxxx
> Betreff: Re: [tycho-user] Target definition entry to local p2 repository
>
> Zitat von Oliver Pfau <Oliver.Pfau@xxxxxxxxxxxx>:
>
>> Hi,
>>
>> I have a custom and local p2 repository. If I add the repository to
>> the target definition file in eclipse location type="Directory" I
>> can build in eclipse.
>> Tycho logs a warning that location type="Directory" is not
>> supported. Is it possible to add the local p2 repository to the
>> target definition to get it work in eclipse and tycho?
>> I tried <repository location="file:///D:/p2testrepo"/> without
>> success in tycho and eclpse
>
> Try "file:/D:/..."
>
> Regards,
>
> --
> Aaron "Optimizer" Digulla a.k.a. Philmann Dark
> "It's not the universe that's limited, it's our imagination.
> Follow me and I'll show you something beyond the limits."
> http://www.pdark.de/ Â Â Â Â Â Â Â Â Â http://blog.pdark.de/
> _______________________________________________
> 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
>
>



--
Aaron "Optimizer" Digulla a.k.a. Philmann Dark
"It's not the universe that's limited, it's our imagination.
Follow me and I'll show you something beyond the limits."
http://www.pdark.de/ Â Â Â Â Â Â Â Â Â http://blog.pdark.de/
_______________________________________________
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




--

MArkward Schubert

Im Hederichsfeld 25
51379 Leverkusen



Mobil:0177 - 56 113 12
E-Mail:markward.schubert@xxxxxxxxx