Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Problems using eclipse-repository package type

Ok,

I have some jars which are built as <packaging>jar</packaging>.

I have also added the maven-bundle-plugin to each of these to produce the META-INF directory with the MANIFEST.MF file to enable Eclipse to recognize them as plugins.

So, following the information below, in order to depend on these jars within a feature, I have wrapped a particular version of the jars into a plugin project using the "New Plugin From Existing JAR Archive" option.

I have then added a pom and built them using the <packaging>eclipse-plugin</packaging> option. So they are created as plugins in the maven repository and can then be added to the feature.

This obviously means that each time any of the jars change, I will have to re-convert them into plugin projects and then re-build them which does not seem to be very future-proof to me.

Is there a way of generating an eclipse-plugin project given a jar on the fly rather than having to use the "New Plugin From Existing JAR Archive" option?

Thanks.


-----Original Message-----
From: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx] On Behalf Of Igor Fedorenko
Sent: 17 October 2011 14:37
To: tycho-user@xxxxxxxxxxx
Subject: Re: [tycho-user] Problems using eclipse-repository package type

Yes, this is possible and there is some information how to add
dependencies on artifacts built with maven-bundle-plugin to tycho
projects in the link I provided in my previous email.

https://docs.sonatype.org/display/TYCHO/Dependency+on+pom-first+artifacts

--
Regards,
Igor

On 11-10-17 9:29 AM, Leon Morley wrote:
> Igor,
>
> I have done this and it seems to be working.
>
> My only issue is that the jar will be fixed within the plugin project itself right? So if any changes are made to the jar, a new plugin project will have to be created and referenced again right?
>
> The problem is that I need to be able to dynamically wrap a jar into a plugin as a result of previous build and reference the new jar within the new plugin:
>
> So:
>
> There are two projects:
>
> 	Project A which contains a standard java project.
>
> And
> 	Project B which contains an Eclipse plugin which references Project A.
>
> Build A builds standard jar A.
>
> Maven then runs the maven-bundle-plugin to produce the Manifest.MF for project A.
>
> Project B should then be built using the results from the build for project A.
>
> Is this possible?
>
> Thanks,
>
> Leon.
> -----Original Message-----
> From: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx] On Behalf Of Igor Fedorenko
> Sent: 11 October 2011 16:46
> To: tycho-user@xxxxxxxxxxx
> Subject: Re: [tycho-user] Problems using eclipse-repository package type
>
> Although there are other ways to depend on artifacts available from
> maven repositories [1], "converted" projects should still work with tycho.
>
> Make sure that actual jar files are part of their respected converted
> projects, i.e. not referenced from local repository, the projects use
> packaging=eclipse-plugin and are included in the maven build as<module>
> projects.
>
> [1]
> https://docs.sonatype.org/display/TYCHO/Dependency+on+pom-first+artifacts
>
> --
> Regards,
> Igor
>
> On 11-10-11 11:36 AM, Leon Morley wrote:
>> Sorry,
>>
>> They are converted to plug-ins by using the "New Plugin From Existing JAR Archive" project.
>>
>> -----Original Message-----
>> From: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx] On Behalf Of Igor Fedorenko
>> Sent: 11 October 2011 16:15
>> To: tycho-user@xxxxxxxxxxx
>> Subject: Re: [tycho-user] Problems using eclipse-repository package type
>>
>> When you say "converted to plugins", what do you mean by this exactly?
>> How are these converted plugins made available to the build?
>>
>> --
>> Regards,
>> Igor
>>
>> On 11-10-11 10:59 AM, Leon Morley wrote:
>>> Hi
>>>
>>> That works for me now, so thanks for the reply.
>>>
>>> I have one further question and was wondering if there was a pattern I should be following to implement it.
>>>
>>> I have several jar files at the moment which are within a Maven repository. These are required in the feature plugin which I have created, so they have been converted to plugins and added to the plugins section of the feature.
>>>
>>> So, for example:
>>>
>>> bandwagon-collections-0.5.4-RC1.jar
>>>
>>> is now held within the feature as a plugin as:
>>>
>>> bandwagon-collections 0.0.0
>>>
>>> I am now trying to build the feature, however I am receiving the following error:
>>>
>>> [INFO] {org.osgi.framework.executionenvironment=OSGi/Minimum-1.0,OSGi/Minimum-1.1, osgi.ws=win32, osgi.arch=x86, osgi.os=win32, org.eclipse.update.install.features=true, org.osgi.framework.system.packages=}
>>> [INFO] [Software being installed: com.db.osmosis.dev.feature.feature.group 1.0.2.qualifier, Missing requirement: com.db.osmosis.dev.feature.feature.group 1.0.2.qualifier requires 'com.db.bandwagon.core 0.0.0' but it could not be found]
>>> [ERROR] Internal error: java.lang.RuntimeException: org.eclipse.equinox.p2.core.ProvisionException: No solution found because the problem is unsatisfiable. ->    [Help 1]
>>>
>>> I am really not sure what I should do next here. Should I be adding dependencies to the pom and also add the
>>> <pomDependencies>consider</pomDependencies>    option?
>>>
>>> I think the real issue is that it is looking for the plugin which does not exist in my local maven repository at all.
>>>
>>> I am sorry if this seems to be a simple question, but I am still very new to tycho, and any help would be greatly appreciated.
>>>
>>> Regards,
>>>
>>> Leon.
>>> -----Original Message-----
>>> From: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx] On Behalf Of Igor Fedorenko
>>> Sent: 11 October 2011 14:02
>>> To: tycho-user@xxxxxxxxxxx
>>> Subject: Re: [tycho-user] Problems using eclipse-repository package type
>>>
>>> Feature version in category.xml looks suspicious. Where does
>>> "1.0.0.201108051307" come from? If your project version has
>>> 1.0.2-SNAPSHOT in pom.xml and I assume 1.0.2.qualifier in feature.xml,
>>> you should use 1.0.2.qualifier in category.xml as well.
>>>
>>> --
>>> Regards,
>>> Igor
>>>
>>> On 11-10-11 8:12 AM, Leon Morley wrote:
>>>> Thanks for the quick response Igor:
>>>>
>>>> Yes, I have added the feature to the category.xml.
>>>>
>>>> The xml is below:
>>>>
>>>>       <?xml version="1.0" encoding="UTF-8" ?>
>>>> <site>
>>>>      <feature url="features/com.db.osmosis.dev.feature_1.0.0.201108051307.jar" id="com.db.osmosis.dev.feature" version="1.0.0.201108051307">
>>>>       <category name="com.db.osmosis.dev.repository" />
>>>>       </feature>
>>>>       <category-def name="com.db.osmosis.dev.repository" label="com.db.osmosis.dev.repository" />
>>>>       </site>
>>>>
>>>> When I run the build however I get the following output:
>>>>
>>>> [INFO] Cannot complete the request.  Generating details.
>>>> [INFO] {org.osgi.framework.executionenvironment=OSGi/Minimum-1.0,OSGi/Minimum-1.1, osgi.ws=win32, osgi.arch=x86, osgi.os=win32, org.eclipse.update.install.features=true, org.osgi.framework.system.packages=}
>>>> [INFO] [Software being installed: com.db.osmosis.dev.repository raw:1.0.2.'SNAPSHOT'/format(n[.n=0;[.n=0;[-S]]]):1.0.2-SNAPSHOT, Missing requirement: com.db.osmosis.dev.repository raw:1.0.2.'SNAPSHOT'/format(n[.n=0;[.n=0;[-S]]]):1.0.2-SNAPSHOT requires 'com.db.osmosis.dev.feature.feature.group [1.0.0.201108051307]' but it could not be found]
>>>> [ERROR] Internal error: java.lang.RuntimeException: org.eclipse.equinox.p2.core.ProvisionException: No solution found because the problem is unsatisfiable. ->     [Help 1]
>>>> org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: org.eclipse.equinox.p2.core.ProvisionException: No solution found because the problem is unsatisfiable.
>>>> 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168)
>>>>
>>>> There is a version in the maven repository 1.0.2-SNAPSHOT
>>>>
>>>> However, it does not appear to be trying to reference it.
>>>>
>>>> So from your email are you saying that I should not be referencing anything within the target platform within the category.xml file, and should be doing it in some other way?
>>>>
>>>> Regards,
>>>>
>>>> Leon.
>>>>
>>>>
>>>> -----Original Message-----
>>>> From: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx] On Behalf Of Igor Fedorenko
>>>> Sent: 11 October 2011 12:43
>>>> To: tycho-user@xxxxxxxxxxx
>>>> Subject: Re: [tycho-user] Problems using eclipse-repository package type
>>>>
>>>>
>>>>
>>>> On 11-10-11 6:45 AM, Leon Morley wrote:
>>>>> Hi
>>>>>
>>>>> I have been trying to build an eclipse-repository project with no real
>>>>> luck at the moment. I am not sure I am doing things completely
>>>>> correctly, but hope that somebody is able to help.
>>>>>
>>>>> I have build a couple of plug-in projects successfully using tycho.
>>>>>
>>>>> I have also built an eclipse-feature package using tycho.
>>>>>
>>>>> My problem now is that I want to dynamically create an
>>>>> eclipse-repository based on the output from the builds above.
>>>>>
>>>>> I have created a category.xml file which only references a feature which
>>>>> is part of my existing target platform and not the feature generated as
>>>>> part of the builds above.
>>>>>
>>>>> Is it possible to dynamically create the category.xml file so that I can
>>>>> just create one on the fly to create an update site on the fly?
>>>>>
>>>>
>>>> Did you try adding all desired features to category.xml? Tycho is
>>>> expected to resolve dependencies from build reactor first, then from
>>>> local maven repository and only then from remote locations. So bundles
>>>> and feature you built locally are expected to be resolved without any
>>>> special configuration if you add them to category.xml.
>>>>
>>>> --
>>>> Regards,
>>>> Igor
>>>> _______________________________________________
>>>> tycho-user mailing list
>>>> tycho-user@xxxxxxxxxxx
>>>> https://dev.eclipse.org/mailman/listinfo/tycho-user
>>>>
>>>> ---
>>>> This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
>>>> Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures.
>>>> _______________________________________________
>>>> 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
>>>
>>> ---
>>> This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
>>> Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures.
>>> _______________________________________________
>>> 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
>>
>> ---
>> This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
>> Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures.
>> _______________________________________________
>> 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
>
> ---
> This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
> Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures.
> _______________________________________________
> 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

---
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures.


Back to the top