[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

Hi,

 

probably it is not possible so easy to use the same target definition in eclipse and tycho?

My target definition in eclipse contains 2 directories (eclipse 3.7.1 and my own p2 repository), but for tycho I have the repositories added in the pom.xml or settings.xml.

Tycho does not support target platform entries of type directory and profile and the self created p2 repository I wasnât able to add in eclipse as site to the target platform. Also with the example from Markward this does not work. Probably a category is missing?

Tried to create a feature project which includes all bundles for the repository and then created a update site project. In the update site project you can add the feature and click âbuild allâ. But I was stuck on an error from eclipse about unresolved dependencies. If I create the p2 with the maven plugin descibed by Markward or with the eclipse.exe, no dependency problem occurs.

 

Von: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx] Im Auftrag von Sandra.Kosmalla@xxxxxxxxxxxxx
Gesendet: Freitag, 9. Dezember 2011 11:01
An: Tycho user list
Betreff: Re: [tycho-user] [Tycho-user] Target Definition entry to local p2 repository

 

Hello,

I track this topic with high interest because it covers my current problem. So I tried Markward's idea out.

Like Markward described I copy my dependencies into a folder and build with the tycho-p2-extras-plugin from this folder a p2 site. Then I want to add this generated p2 site to the target definition, but Eclipse cannot discover the content of this p2 site.

Have anybody an idea where my mistake is?

I'm using Eclipse 3.7.1 and Maven Tycho 0.13.0.

I would be happy about a hint.

Regards,

Sandra Kosmalla




Von:        Markward Schubert <markward.schubert@xxxxxxxxx>
An:        Tycho user list <tycho-user@xxxxxxxxxxx>
Datum:        07.12.2011 12:48
Betreff:        Re: [tycho-user] [Tycho-user] Target Definition entry to local p2        repository
Gesendet von:        tycho-user-bounces@xxxxxxxxxxx





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


_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user