Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] I need help with third party Maven repos

I still cannot reproduce the directory structure of the demo:
- what a heck is build01 and build02 in a workspace?
- build01 consist of a pom.xml, pomfirst-bundle and pomfirst-thirdparty. What are they? Plain Java project, two separate Maven-projects or something else? A decent Maven-project has totally different structure than proposed by the example.
- the same question stands for the build02 "something".

I don't know what's the use of an incomplete example.

Csaba

2015-03-25 10:01 GMT+01:00 M. Cs. <mohareve@xxxxxxxxx>:
So, basically I'll need to create a new Maven-project with two folders(?) inside, the pomfirst-bundle and pomfirst-thirdparty, and then to turn it into a plugin project? Using the given link I have downloaded the example from git, but it is not retaining the correct structure. What should be build01 and build02?
As I can understand the build02 contains the parent pom.xml for all of them. If I intend to build a feature-based RCP4 application (using Vogella's model) do I need to use the existing parent pom.xml of application.product for that purpose?

I am really sorry, but with Maven everything lies in details, and the demo is not quite expressive.
So if I had an RCP application with following structure:
-application.main
-application.aggregator
-application.product
-application.feature
-application.plugin1
-application.plugin2
-application.plugin3
.....

I would need to create a new Maven project, with pomfirst-bundle and pomfirst-thirdparty?
Then I see that bundle contains a class PomFirst.java which practically wraps the remote class org.codehaus.plexus.util.StringUtils. Does that mean that I have to wrap each class the same way in order to be accessible from my application.plugin2?
Does the application.plugin2 takes the role of tycho.demo.itp02.bundle?

As Jason says, will I be able to insert MyWrappedClass.java into application.plugin2-s class code instead of remote MyClass.java?

I am sorry, but for me it is better to ask than to seek in vain.

Thank you for the answers!

Csaba

2015-03-24 18:15 GMT+01:00 Jason van Zyl <jason@xxxxxxxxx>:
Note that with the wrapper bundle technique you do not need to install anything into your local repository. Everything works from within the workspace.

On Mar 24, 2015, at 12:23 PM, Jeff MAURY <jeffmaury@xxxxxxxxxxxxx> wrote:

> The trick is that the first project is almost a traditional Maven Java project with the exception that the OSGI metadata is generated. Thist first project is then installed in your local Maven repo.
> This project will be refererenced by the second one with is an Eclipse/Tycho project so Tycho will be able to resolve the dependency through the local Maven repo. But it works because the OSGI metada is present in the first project artificats.
>
> Jeff
>
> On Tue, Mar 24, 2015 at 2:24 PM, M. Cs. <mohareve@xxxxxxxxx> wrote:
> I took a look inside linked project. Am I right that the concept would be creation of a local Maven project, which could be seen by the RCP project, and wrapping the required distant objects into local ones? In that way, the RCP could reach the local Maven project, which could reach the distant classes through Maven. That local Maven would bridge the gap between local RCP and Maven-repo. Is this correct?
>
> Csaba
>
> 2015-03-23 21:25 GMT+01:00 Jeff MAURY <jeffmaury@xxxxxxxxxxxxx>:
> Hello,
>
> no it just means that if the dependency you use from the Maven repo is not OSGI compliant (no package exports for example) then Tycho resolution will fails.
> See https://wiki.eclipse.org/Tycho/How_Tos/Dependency_on_pom-first_artifacts from POM declared dependencies.
>
> Regards
> Jeff
>
> On Mon, Mar 23, 2015 at 7:38 PM, M. Cs. <mohareve@xxxxxxxxx> wrote:
> Hello Jeff and thank you for the reply!
> Indeed I need to declare dependencies, but after days of search I'm lost in details. Could you provide me with information on how to declare these dependencies, and in which pom.xml, since I have a lot of them: for each plugin, for the feature, for the main app, and I have for aggregate.... A concrete solution would help a lot. For the second part:
> " if your artifacts from your Maven repo are not OSGI compliant, then it is likely that Tycho resolution will fail", does that mean that I will not be able to use the packages from Maven-repo, except if I download them manually, then turn into plugins?
>
> What is the Tycho good for then? If I had an isolated RCP4 application with all the plugins written in RCP, why would I need Maven at all, after all I could do the export from inside the Eclipse IDE? I am not really familiar with Maven, but I am forced to use it.
>
> Thank you for the answer!
>
> Csaba
>
> 2015-03-23 16:29 GMT+01:00 Jeff MAURY <jeffmaury@xxxxxxxxxxxxx>:
> First, you need to declare Tycho to consider dependencies declared in POM in addition to the ones in MANIFEST.MF.
> Second, it is likely that if your artifacts from your Maven repo are not OSGI compliant, then it is likely that Tycho resolution will fail.
>
> Regards
> Jeff
>
> On Mon, Mar 23, 2015 at 2:29 PM, M. Cs. <mohareve@xxxxxxxxx> wrote:
> Hello!
> First: I have a defined Maven repo in my .m2/settings.xml
>
> <repository>
>                     <id>artifactory-stable-repository</id>
>                     <url>http://myplace.com/build-stable</url>
>                     <releases>
>                         <enabled>true</enabled>
>                     </releases>
>                     <snapshots>
>                         <enabled>false</enabled>
>                     </snapshots>
>                 </repository>
>
> These are non-OSGi Maven-projects with POJOs I need to include into my RCP.
>
> I have created an RCP4 project with features and plugins, and I did convert them into maven project using Lars Vogel's tutorial:
> http://www.vogella.com/tutorials/EclipseTycho/article.html
>
> I did successfully build packages, but in a real-world app, I will need those packages provided by the online Maven-repo.
> I have tried to include them into the pom.xml of main application, where I intend to use the as:
>
> <dependencies>
>             <dependency>
>                 <groupId>com.mcs.app</groupId>
>                 <artifactId>my-third-party</artifactId>
>                 <version>2.9</version>
>             </dependency>
> </dependencies>
>
>
> But if I try to import a class MyClass.java from the my-third-party, it is not resolvable.
> I really need to solve this issue, because there's no point of writing RCP application, without access to the legacy codes.
> I would really appreciate some detailed solution. I have goggled a lot of examples over the internet, but non of them is right one for my case. Thank you!
>
> Csaba
>
> _______________________________________________
> tycho-user mailing list
> tycho-user@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/tycho-user
>
>
>
> --
> Jeff MAURY
>
>
> "Legacy code" often differs from its suggested alternative by actually working and scaling.
>  - Bjarne Stroustrup
>
> http://www.jeffmaury.com
> http://riadiscuss.jeffmaury.com
> http://www.twitter.com/jeffmaury
>
> _______________________________________________
> tycho-user mailing list
> tycho-user@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/tycho-user
>
>
> _______________________________________________
> tycho-user mailing list
> tycho-user@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/tycho-user
>
>
>
> --
> Jeff MAURY
>
>
> "Legacy code" often differs from its suggested alternative by actually working and scaling.
>  - Bjarne Stroustrup
>
> http://www.jeffmaury.com
> http://riadiscuss.jeffmaury.com
> http://www.twitter.com/jeffmaury
>
> _______________________________________________
> tycho-user mailing list
> tycho-user@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/tycho-user
>
>
> _______________________________________________
> tycho-user mailing list
> tycho-user@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/tycho-user
>
>
>
> --
> Jeff MAURY
>
>
> "Legacy code" often differs from its suggested alternative by actually working and scaling.
>  - Bjarne Stroustrup
>
> http://www.jeffmaury.com
> http://riadiscuss.jeffmaury.com
> http://www.twitter.com/jeffmaury
> _______________________________________________
> tycho-user mailing list
> tycho-user@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/tycho-user

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder, Takari and Apache Maven
http://twitter.com/jvanzyl
http://twitter.com/takari_io
---------------------------------------------------------

Three people can keep a secret provided two of them are dead.

 -- Benjamin Franklin












_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user



Back to the top