Skip to main content

[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

Thanks…I will take a look at this. I think it also would work for me, because I defined all dependencies in the manifest.mf file and not like maven in the poms.

 

Von: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx] Im Auftrag von Markward Schubert
Gesendet: Mittwoch, 7. Dezember 2011 12:49
An: Tycho user list
Betreff: 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

 


Back to the top