Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Maven Integration (M2E) » Re: [m2eclipse-user] Tycho: Eclipse plugin dependency resolution from local repository
Re: [m2eclipse-user] Tycho: Eclipse plugin dependency resolution from local repository [message #18676] Tue, 21 October 2008 17:25 Go to next message
Eclipse UserFriend
Originally posted by: igor.ifedorenko.com

m2spring@springdot.org wrote:
>
> Let me clarify that httpclient is just an example.
> Making it and my other 3rd party artifacts to be OSGi bundles is the easy
> part.
> I've planned to deploy them then to my group repository.
>
> However, for my internally developed artifacts it's a different story.
> All of them are Eclipse plugins.
> I want to build them through a CI framework (probably Continuum) and
> deploy them also to the group repository.
> Then, members of my team can work on individual plugins and the plugins'
> OSGi dependencies
> (as expressed in MANIFEST.MF) are resolved from the group repository.
>
> That's my plan in a nutshell. Having a target platform in this picture
> where a base set of plugins are resolved from is fine, too.

Actually, this is the primary use case for "target platform management"
feature we're adding to tycho and I would be very interested to know how
well (or not so well) it works for your projects. There is no user
documentation yet, but here is relatively detailed description of how
this works.

In the just announced tycho 0.3.0-DEV-1756, build target platform can be
specified using dependencyManagement pom.xml section. It is possible to
specify path to local eclipse installation using dependency with system
scope, but more interestingly, it is also possible to specify
eclipse-feature and eclipse-plugin artifacts using maven
groupId/artifactId/version coordinates.

At build time, tycho will resolve all eclipse-feature artifacts
(transitively) and eclipse-plugin artifacts (non-transitively) from
maven repositories and target platform used during the build will
include features/bundles both from local eclipse-installation and from
maven repositories. Build results can be installed/deployed into maven
local/remote repositories by invoking regular "install" or "deploy"
build phases.

So in your scenario, CI framework can run "tycho/bin/mvn deploy" for set
of related projects and everything is expected to work "the maven way"
assuming dependencyManagement is configured properly. We are using
Hudson, btw, but I guess Continuum should work too.

You can see this in action in integration test [1]. The test first runs
build01 to install a feature and couple of bundles into local maven
repository. Then it runs build02 which uses the feature and bundles from
the first build. You can see specification of build02 target platform in
pom.xml [2].

Please note that -Dtycho.targetPlatform OVERRIDES target platform in
pom.xml. In other words, target platform specified in
dependencyManagement sections will be ignored if -Dtycho.targetPlatform
is specified on command line or via settings.xml/pom.xml. (I should have
added a warning, I guess)

Also note that there is no PDE integration yet. We can talk about using
tycho build target platform in PDE if you're happy with how it works on
command line.

[1]
http://svn.sonatype.org/m2eclipse/tycho/trunk/tycho-its/proj ects/tycho164/
[2]
http://svn.sonatype.org/m2eclipse/tycho/trunk/tycho-its/proj ects/tycho164/build02/pom.xml

>
>> but I am open for suggestions
>> about how to make consumption of plain JARs in tycho builds easier.
>
> I wouldn't cater to consuming plain Jars in general with Tycho.
> I would target OSGi bundles only instead.
> If there was a way to map an OSGi dependency into a Maven coordinate,
> and Maven/Tycho was able to resolve the OSGi dependency from a Maven
> repository,
> that might make the consumption of OSGi bundles easier.
>

I think I know what you mean and I might have some ideas how to
implement it, although not necessary exactly as you describe it here. I
can't be more specific at the moment, but stay tuned ;-).

--
Regards,
Igor
Re: [m2eclipse-user] Tycho: Eclipse plugin dependency resolution from local repository [message #21746 is a reply to message #18676] Sun, 08 February 2009 17:41 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wrobinson.gsu.edu

If I understand correctly, tycho can do the following:
1. Read the required Eclipse plugins from the manifest
2. Search and download a required plugin from a maven repository during
compilation

I have installed an eclipse plugin into a maven repository and I can
view/download. You can find it here:
http://wrserver1.cis.gsu.edu:9080/artifactory/

It is referenced in the dependencyManagement section as follows.

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.reqmon</groupId>
<artifactId>org.reqmon.emf.ocl.compiler</artifactId>
<version>1.0.1-SNAPSHOT</version>
<type>eclipse-plugin</type>
</dependency>
</dependencies>
</dependencyManagement>

I have attempted this with both SNAPSHOT and normal release versions (e.g.,
1.0.0)

Each time I run tycho 0.3.0-DEV-1983, it always complains
org.apache.maven.reactor.MavenExecutionException: Bundle
org.reqmon.emf.ocl.compiler.ui cannot be resolved
Resolution errors:
Bundle org.reqmon.emf.ocl.compiler.ui - Missing Constraint:
Require-Bundle: org.reqmon.emf.ocl.compiler; bundle-version="1.0.1"

The maven repository is correctly configured using the ./m2/settings.xml.
(Additionally, I have updated the conf/settings.xml file in tycho.)

Any suggestions?

"Igor Fedorenko" <igor@ifedorenko.com> wrote in message
news:gdl3a9$pt7$1@build.eclipse.org...
> m2spring@springdot.org wrote:
>>
>> Let me clarify that httpclient is just an example.
>> Making it and my other 3rd party artifacts to be OSGi bundles is the easy
>> part.
>> I've planned to deploy them then to my group repository.
>>
>> However, for my internally developed artifacts it's a different story.
>> All of them are Eclipse plugins.
>> I want to build them through a CI framework (probably Continuum) and
>> deploy them also to the group repository.
>> Then, members of my team can work on individual plugins and the plugins'
>> OSGi dependencies
>> (as expressed in MANIFEST.MF) are resolved from the group repository.
>>
>> That's my plan in a nutshell. Having a target platform in this picture
>> where a base set of plugins are resolved from is fine, too.
>
> Actually, this is the primary use case for "target platform management"
> feature we're adding to tycho and I would be very interested to know how
> well (or not so well) it works for your projects. There is no user
> documentation yet, but here is relatively detailed description of how
> this works.
>
> In the just announced tycho 0.3.0-DEV-1756, build target platform can be
> specified using dependencyManagement pom.xml section. It is possible to
> specify path to local eclipse installation using dependency with system
> scope, but more interestingly, it is also possible to specify
> eclipse-feature and eclipse-plugin artifacts using maven
> groupId/artifactId/version coordinates.
>
> At build time, tycho will resolve all eclipse-feature artifacts
> (transitively) and eclipse-plugin artifacts (non-transitively) from
> maven repositories and target platform used during the build will
> include features/bundles both from local eclipse-installation and from
> maven repositories. Build results can be installed/deployed into maven
> local/remote repositories by invoking regular "install" or "deploy"
> build phases.
>
> So in your scenario, CI framework can run "tycho/bin/mvn deploy" for set
> of related projects and everything is expected to work "the maven way"
> assuming dependencyManagement is configured properly. We are using
> Hudson, btw, but I guess Continuum should work too.
>
> You can see this in action in integration test [1]. The test first runs
> build01 to install a feature and couple of bundles into local maven
> repository. Then it runs build02 which uses the feature and bundles from
> the first build. You can see specification of build02 target platform in
> pom.xml [2].
>
> Please note that -Dtycho.targetPlatform OVERRIDES target platform in
> pom.xml. In other words, target platform specified in
> dependencyManagement sections will be ignored if -Dtycho.targetPlatform
> is specified on command line or via settings.xml/pom.xml. (I should have
> added a warning, I guess)
>
> Also note that there is no PDE integration yet. We can talk about using
> tycho build target platform in PDE if you're happy with how it works on
> command line.
>
> [1]
> http://svn.sonatype.org/m2eclipse/tycho/trunk/tycho-its/proj ects/tycho164/
> [2]
> http://svn.sonatype.org/m2eclipse/tycho/trunk/tycho-its/proj ects/tycho164/build02/pom.xml
>
>>
>>> but I am open for suggestions
>>> about how to make consumption of plain JARs in tycho builds easier.
>>
>> I wouldn't cater to consuming plain Jars in general with Tycho.
>> I would target OSGi bundles only instead.
>> If there was a way to map an OSGi dependency into a Maven coordinate,
>> and Maven/Tycho was able to resolve the OSGi dependency from a Maven
>> repository,
>> that might make the consumption of OSGi bundles easier.
>>
>
> I think I know what you mean and I might have some ideas how to
> implement it, although not necessary exactly as you describe it here. I
> can't be more specific at the moment, but stay tuned ;-).
>
> --
> Regards,
> Igor
>
Re: [m2eclipse-user] Tycho: Eclipse plugin dependency resolution from local repository [message #21791 is a reply to message #21746] Mon, 09 February 2009 02:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wrobinson.gsu.edu

After reading a bit further, I discovered that I didn't specify the
parent/module pom's properly. After creating a parent with the (seemly
properly) dependencyManagement, then I get this error:

"d:\program files\tycho\bin\mvn" -Dtycho.targetPlatform="D:/Program
Files/eclipse" compile
[INFO] snapshot org.reqmon:org.reqmon.compiler.POM:1.0.0-SNAPSHOT: checking
for updates from http://wrserver1.cis.gsu.edu:9080/artifactory/repo
[WARNING] repository metadata for: 'snapshot
org.reqmon:org.reqmon.compiler.POM:1.0.0-SNAPSHOT' could not be retrieved
from repository: http://wrserver1.cis.gsu.edu:9080/artifactory/repo due to
an error: Unsupported Protocol: '': Cannot find wagon which supports the
requested protocol:
[INFO] Repository 'http://wrserver1.cis.gsu.edu:9080/artifactory/repo' will
be blacklisted
[INFO] snapshot org.reqmon:org.reqmon.compiler.POM:1.0.0-SNAPSHOT: checking
for updates from http://repository.sonatype.org/content/groups/public
[WARNING] repository metadata for: 'snapshot
org.reqmon:org.reqmon.compiler.POM:1.0.0-SNAPSHOT' could not be retrieved
from repository: http://repository.sonatype.org/content/groups/public due to
an error: Unsupported Protocol: '': Cannot find wagon which supports the
requested protocol:
[INFO] Repository 'http://repository.sonatype.org/content/groups/public'
will be blacklisted
[INFO] snapshot org.reqmon:org.reqmon.compiler.POM:1.0.0-SNAPSHOT: checking
for updates from http://wrserver1.cis.gsu.edu:9080/artifactory/repo
[WARNING] repository metadata for: 'snapshot
org.reqmon:org.reqmon.compiler.POM:1.0.0-SNAPSHOT' could not be retrieved
from repository: http://wrserver1.cis.gsu.edu:9080/artifactory/repo due to
an error: Unsupported Protocol: '': Cannot find wagon which supports the
requested protocol:
[INFO] Repository 'http://wrserver1.cis.gsu.edu:9080/artifactory/repo' will
be blacklisted
[INFO] snapshot org.reqmon:org.reqmon.compiler.POM:1.0.0-SNAPSHOT: checking
for updates from http://repository.sonatype.org/content/groups/public
[WARNING] repository metadata for: 'snapshot
org.reqmon:org.reqmon.compiler.POM:1.0.0-SNAPSHOT' could not be retrieved
from repository: http://repository.sonatype.org/content/groups/public due to
an error: Unsupported Protocol: '': Cannot find wagon which supports the
requested protocol:
[INFO] Repository 'http://repository.sonatype.org/content/groups/public'
will be blacklisted
[ERROR]


To diagnose, I ran it with mvn (not tycho) to see if it might download
something. I changed the project type to jar (rather than eclipse-plugin).
Then, I do get a download.

[DEBUG] org.reqmon:org.reqmon.emf.ocl.compiler.ui:jar:1.0.0-SNAPSHOT
(selected for null)
[DEBUG] Trying repository wrserver1.cis.gsu.edu
Downloading:
http://wrserver1.cis.gsu.edu:9080/artifactory/repo/org/reqmo n/org.reqmon.emf.ocl.compiler/1.0.0/org.reqmon.emf.ocl.compi ler-1.0.0.pom
[DEBUG] Artifact resolved
[DEBUG] org.reqmon:org.reqmon.emf.ocl.compiler:jar:1.0.0:compile (selected
for compile)

For some reason, my tycho doesn't download for dependencyManagement.

Any ideas?

<wrobinson@gsu.edu> wrote in message news:gmn5h9$90s$1@build.eclipse.org...
> If I understand correctly, tycho can do the following:
> 1. Read the required Eclipse plugins from the manifest
> 2. Search and download a required plugin from a maven repository during
> compilation
>
> I have installed an eclipse plugin into a maven repository and I can
> view/download. You can find it here:
> http://wrserver1.cis.gsu.edu:9080/artifactory/
>
> It is referenced in the dependencyManagement section as follows.
>
> <dependencyManagement>
> <dependencies>
> <dependency>
> <groupId>org.reqmon</groupId>
> <artifactId>org.reqmon.emf.ocl.compiler</artifactId>
> <version>1.0.1-SNAPSHOT</version>
> <type>eclipse-plugin</type>
> </dependency>
> </dependencies>
> </dependencyManagement>
>
> I have attempted this with both SNAPSHOT and normal release versions
> (e.g., 1.0.0)
>
> Each time I run tycho 0.3.0-DEV-1983, it always complains
> org.apache.maven.reactor.MavenExecutionException: Bundle
> org.reqmon.emf.ocl.compiler.ui cannot be resolved
> Resolution errors:
> Bundle org.reqmon.emf.ocl.compiler.ui - Missing Constraint:
> Require-Bundle: org.reqmon.emf.ocl.compiler; bundle-version="1.0.1"
>
> The maven repository is correctly configured using the ./m2/settings.xml.
> (Additionally, I have updated the conf/settings.xml file in tycho.)
>
> Any suggestions?
>
> "Igor Fedorenko" <igor@ifedorenko.com> wrote in message
> news:gdl3a9$pt7$1@build.eclipse.org...
>> m2spring@springdot.org wrote:
>>>
>>> Let me clarify that httpclient is just an example.
>>> Making it and my other 3rd party artifacts to be OSGi bundles is the
>>> easy
>>> part.
>>> I've planned to deploy them then to my group repository.
>>>
>>> However, for my internally developed artifacts it's a different story.
>>> All of them are Eclipse plugins.
>>> I want to build them through a CI framework (probably Continuum) and
>>> deploy them also to the group repository.
>>> Then, members of my team can work on individual plugins and the plugins'
>>> OSGi dependencies
>>> (as expressed in MANIFEST.MF) are resolved from the group repository.
>>>
>>> That's my plan in a nutshell. Having a target platform in this picture
>>> where a base set of plugins are resolved from is fine, too.
>>
>> Actually, this is the primary use case for "target platform management"
>> feature we're adding to tycho and I would be very interested to know how
>> well (or not so well) it works for your projects. There is no user
>> documentation yet, but here is relatively detailed description of how
>> this works.
>>
>> In the just announced tycho 0.3.0-DEV-1756, build target platform can be
>> specified using dependencyManagement pom.xml section. It is possible to
>> specify path to local eclipse installation using dependency with system
>> scope, but more interestingly, it is also possible to specify
>> eclipse-feature and eclipse-plugin artifacts using maven
>> groupId/artifactId/version coordinates.
>>
>> At build time, tycho will resolve all eclipse-feature artifacts
>> (transitively) and eclipse-plugin artifacts (non-transitively) from
>> maven repositories and target platform used during the build will
>> include features/bundles both from local eclipse-installation and from
>> maven repositories. Build results can be installed/deployed into maven
>> local/remote repositories by invoking regular "install" or "deploy"
>> build phases.
>>
>> So in your scenario, CI framework can run "tycho/bin/mvn deploy" for set
>> of related projects and everything is expected to work "the maven way"
>> assuming dependencyManagement is configured properly. We are using
>> Hudson, btw, but I guess Continuum should work too.
>>
>> You can see this in action in integration test [1]. The test first runs
>> build01 to install a feature and couple of bundles into local maven
>> repository. Then it runs build02 which uses the feature and bundles from
>> the first build. You can see specification of build02 target platform in
>> pom.xml [2].
>>
>> Please note that -Dtycho.targetPlatform OVERRIDES target platform in
>> pom.xml. In other words, target platform specified in
>> dependencyManagement sections will be ignored if -Dtycho.targetPlatform
>> is specified on command line or via settings.xml/pom.xml. (I should have
>> added a warning, I guess)
>>
>> Also note that there is no PDE integration yet. We can talk about using
>> tycho build target platform in PDE if you're happy with how it works on
>> command line.
>>
>> [1]
>> http://svn.sonatype.org/m2eclipse/tycho/trunk/tycho-its/proj ects/tycho164/
>> [2]
>> http://svn.sonatype.org/m2eclipse/tycho/trunk/tycho-its/proj ects/tycho164/build02/pom.xml
>>
>>>
>>>> but I am open for suggestions
>>>> about how to make consumption of plain JARs in tycho builds easier.
>>>
>>> I wouldn't cater to consuming plain Jars in general with Tycho.
>>> I would target OSGi bundles only instead.
>>> If there was a way to map an OSGi dependency into a Maven coordinate,
>>> and Maven/Tycho was able to resolve the OSGi dependency from a Maven
>>> repository,
>>> that might make the consumption of OSGi bundles easier.
>>>
>>
>> I think I know what you mean and I might have some ideas how to
>> implement it, although not necessary exactly as you describe it here. I
>> can't be more specific at the moment, but stay tuned ;-).
>>
>> --
>> Regards,
>> Igor
>>
>
Re: [m2eclipse-user] Tycho: Eclipse plugin dependency resolution from local repository [message #21836 is a reply to message #21791] Mon, 09 February 2009 14:41 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: igor.ifedorenko.com

There is a chance Tycho does not work properly when installed to a path
with spaces. Can you move tycho to, say, d:\tycho and see if the problem
still exists?

Also, -Dtycho.targetPlatform *overrides* dendencyManagement section in
your pom.xml. You need to specify eclipse installation as dependency
with packaging=eclipse-installation and scope=system in pom.xml
dependencyManagement.

--
Regards,
Igor

wrobinson@gsu.edu wrote:
> After reading a bit further, I discovered that I didn't specify the
> parent/module pom's properly. After creating a parent with the (seemly
> properly) dependencyManagement, then I get this error:
>
> "d:\program files\tycho\bin\mvn" -Dtycho.targetPlatform="D:/Program
> Files/eclipse" compile
> [INFO] snapshot org.reqmon:org.reqmon.compiler.POM:1.0.0-SNAPSHOT:
> checking for updates from
> http://wrserver1.cis.gsu.edu:9080/artifactory/repo
> [WARNING] repository metadata for: 'snapshot
> org.reqmon:org.reqmon.compiler.POM:1.0.0-SNAPSHOT' could not be
> retrieved from repository:
> http://wrserver1.cis.gsu.edu:9080/artifactory/repo due to an error:
> Unsupported Protocol: '': Cannot find wagon which supports the requested
> protocol:
> [INFO] Repository 'http://wrserver1.cis.gsu.edu:9080/artifactory/repo'
> will be blacklisted
> [INFO] snapshot org.reqmon:org.reqmon.compiler.POM:1.0.0-SNAPSHOT:
> checking for updates from
> http://repository.sonatype.org/content/groups/public
> [WARNING] repository metadata for: 'snapshot
> org.reqmon:org.reqmon.compiler.POM:1.0.0-SNAPSHOT' could not be
> retrieved from repository:
> http://repository.sonatype.org/content/groups/public due to an error:
> Unsupported Protocol: '': Cannot find wagon which supports the requested
> protocol:
> [INFO] Repository 'http://repository.sonatype.org/content/groups/public'
> will be blacklisted
> [INFO] snapshot org.reqmon:org.reqmon.compiler.POM:1.0.0-SNAPSHOT:
> checking for updates from
> http://wrserver1.cis.gsu.edu:9080/artifactory/repo
> [WARNING] repository metadata for: 'snapshot
> org.reqmon:org.reqmon.compiler.POM:1.0.0-SNAPSHOT' could not be
> retrieved from repository:
> http://wrserver1.cis.gsu.edu:9080/artifactory/repo due to an error:
> Unsupported Protocol: '': Cannot find wagon which supports the requested
> protocol:
> [INFO] Repository 'http://wrserver1.cis.gsu.edu:9080/artifactory/repo'
> will be blacklisted
> [INFO] snapshot org.reqmon:org.reqmon.compiler.POM:1.0.0-SNAPSHOT:
> checking for updates from
> http://repository.sonatype.org/content/groups/public
> [WARNING] repository metadata for: 'snapshot
> org.reqmon:org.reqmon.compiler.POM:1.0.0-SNAPSHOT' could not be
> retrieved from repository:
> http://repository.sonatype.org/content/groups/public due to an error:
> Unsupported Protocol: '': Cannot find wagon which supports the requested
> protocol:
> [INFO] Repository 'http://repository.sonatype.org/content/groups/public'
> will be blacklisted
> [ERROR]
>
>
> To diagnose, I ran it with mvn (not tycho) to see if it might download
> something. I changed the project type to jar (rather than
> eclipse-plugin). Then, I do get a download.
>
> [DEBUG] org.reqmon:org.reqmon.emf.ocl.compiler.ui:jar:1.0.0-SNAPSHOT
> (selected for null)
> [DEBUG] Trying repository wrserver1.cis.gsu.edu
> Downloading:
> http://wrserver1.cis.gsu.edu:9080/artifactory/repo/org/reqmo n/org.reqmon.emf.ocl.compiler/1.0.0/org.reqmon.emf.ocl.compi ler-1.0.0.pom
>
> [DEBUG] Artifact resolved
> [DEBUG] org.reqmon:org.reqmon.emf.ocl.compiler:jar:1.0.0:compile
> (selected for compile)
>
> For some reason, my tycho doesn't download for dependencyManagement.
>
> Any ideas?
>
> <wrobinson@gsu.edu> wrote in message news:gmn5h9$90s$1@build.eclipse.org...
>> If I understand correctly, tycho can do the following:
>> 1. Read the required Eclipse plugins from the manifest
>> 2. Search and download a required plugin from a maven repository
>> during compilation
>>
>> I have installed an eclipse plugin into a maven repository and I can
>> view/download. You can find it here:
>> http://wrserver1.cis.gsu.edu:9080/artifactory/
>>
>> It is referenced in the dependencyManagement section as follows.
>>
>> <dependencyManagement>
>> <dependencies>
>> <dependency>
>> <groupId>org.reqmon</groupId>
>> <artifactId>org.reqmon.emf.ocl.compiler</artifactId>
>> <version>1.0.1-SNAPSHOT</version>
>> <type>eclipse-plugin</type>
>> </dependency>
>> </dependencies>
>> </dependencyManagement>
>>
>> I have attempted this with both SNAPSHOT and normal release versions
>> (e.g., 1.0.0)
>>
>> Each time I run tycho 0.3.0-DEV-1983, it always complains
>> org.apache.maven.reactor.MavenExecutionException: Bundle
>> org.reqmon.emf.ocl.compiler.ui cannot be resolved
>> Resolution errors:
>> Bundle org.reqmon.emf.ocl.compiler.ui - Missing Constraint:
>> Require-Bundle: org.reqmon.emf.ocl.compiler; bundle-version="1.0.1"
>>
>> The maven repository is correctly configured using the
>> ./m2/settings.xml. (Additionally, I have updated the conf/settings.xml
>> file in tycho.)
>>
>> Any suggestions?
>>
>> "Igor Fedorenko" <igor@ifedorenko.com> wrote in message
>> news:gdl3a9$pt7$1@build.eclipse.org...
>>> m2spring@springdot.org wrote:
>>>>
>>>> Let me clarify that httpclient is just an example.
>>>> Making it and my other 3rd party artifacts to be OSGi bundles is the
>>>> easy
>>>> part.
>>>> I've planned to deploy them then to my group repository.
>>>>
>>>> However, for my internally developed artifacts it's a different story.
>>>> All of them are Eclipse plugins.
>>>> I want to build them through a CI framework (probably Continuum) and
>>>> deploy them also to the group repository.
>>>> Then, members of my team can work on individual plugins and the
>>>> plugins'
>>>> OSGi dependencies
>>>> (as expressed in MANIFEST.MF) are resolved from the group repository.
>>>>
>>>> That's my plan in a nutshell. Having a target platform in this picture
>>>> where a base set of plugins are resolved from is fine, too.
>>>
>>> Actually, this is the primary use case for "target platform management"
>>> feature we're adding to tycho and I would be very interested to know how
>>> well (or not so well) it works for your projects. There is no user
>>> documentation yet, but here is relatively detailed description of how
>>> this works.
>>>
>>> In the just announced tycho 0.3.0-DEV-1756, build target platform can be
>>> specified using dependencyManagement pom.xml section. It is possible to
>>> specify path to local eclipse installation using dependency with system
>>> scope, but more interestingly, it is also possible to specify
>>> eclipse-feature and eclipse-plugin artifacts using maven
>>> groupId/artifactId/version coordinates.
>>>
>>> At build time, tycho will resolve all eclipse-feature artifacts
>>> (transitively) and eclipse-plugin artifacts (non-transitively) from
>>> maven repositories and target platform used during the build will
>>> include features/bundles both from local eclipse-installation and from
>>> maven repositories. Build results can be installed/deployed into maven
>>> local/remote repositories by invoking regular "install" or "deploy"
>>> build phases.
>>>
>>> So in your scenario, CI framework can run "tycho/bin/mvn deploy" for set
>>> of related projects and everything is expected to work "the maven way"
>>> assuming dependencyManagement is configured properly. We are using
>>> Hudson, btw, but I guess Continuum should work too.
>>>
>>> You can see this in action in integration test [1]. The test first runs
>>> build01 to install a feature and couple of bundles into local maven
>>> repository. Then it runs build02 which uses the feature and bundles from
>>> the first build. You can see specification of build02 target platform in
>>> pom.xml [2].
>>>
>>> Please note that -Dtycho.targetPlatform OVERRIDES target platform in
>>> pom.xml. In other words, target platform specified in
>>> dependencyManagement sections will be ignored if -Dtycho.targetPlatform
>>> is specified on command line or via settings.xml/pom.xml. (I should have
>>> added a warning, I guess)
>>>
>>> Also note that there is no PDE integration yet. We can talk about using
>>> tycho build target platform in PDE if you're happy with how it works on
>>> command line.
>>>
>>> [1]
>>> http://svn.sonatype.org/m2eclipse/tycho/trunk/tycho-its/proj ects/tycho164/
>>>
>>> [2]
>>> http://svn.sonatype.org/m2eclipse/tycho/trunk/tycho-its/proj ects/tycho164/build02/pom.xml
>>>
>>>
>>>>
>>>>> but I am open for suggestions
>>>>> about how to make consumption of plain JARs in tycho builds easier.
>>>>
>>>> I wouldn't cater to consuming plain Jars in general with Tycho.
>>>> I would target OSGi bundles only instead.
>>>> If there was a way to map an OSGi dependency into a Maven coordinate,
>>>> and Maven/Tycho was able to resolve the OSGi dependency from a Maven
>>>> repository,
>>>> that might make the consumption of OSGi bundles easier.
>>>>
>>>
>>> I think I know what you mean and I might have some ideas how to
>>> implement it, although not necessary exactly as you describe it here. I
>>> can't be more specific at the moment, but stay tuned ;-).
>>>
>>> --
>>> Regards,
>>> Igor
>>>
>>
>
Re: [m2eclipse-user] Tycho: Eclipse plugin dependency resolution from local repository [message #21881 is a reply to message #21836] Mon, 09 February 2009 16:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wrobinson.gsu.edu

It turns out that spaces in the maven path are not a problem, in this case.

The problem was my multi-project layout. My parent and child (modules)
projects are in the same directory. (I didn't want to use subdirectory child
modules because of source control issues. )

See this:
http://www.waltercedric.com/java-j2ee-mainmenu-53/361-maven- build-system/1363-maven-multi-module-support-in-m2eclipse.ht ml

I followed the tip in the above link to include the relativePath in the
child module:

<relativePath>../org.reqmon.compiler.POM/pom.xml</relativePath >

That solved the problem. :-)

"Igor Fedorenko" <igor@ifedorenko.com> wrote in message
news:49904089.3050901@ifedorenko.com...
> There is a chance Tycho does not work properly when installed to a path
> with spaces. Can you move tycho to, say, d:\tycho and see if the problem
> still exists?
>
> Also, -Dtycho.targetPlatform *overrides* dendencyManagement section in
> your pom.xml. You need to specify eclipse installation as dependency with
> packaging=eclipse-installation and scope=system in pom.xml
> dependencyManagement.
>
> --
> Regards,
> Igor
>
> wrobinson@gsu.edu wrote:
>> After reading a bit further, I discovered that I didn't specify the
>> parent/module pom's properly. After creating a parent with the (seemly
>> properly) dependencyManagement, then I get this error:
>>
>> "d:\program files\tycho\bin\mvn" -Dtycho.targetPlatform="D:/Program
>> Files/eclipse" compile
>> [INFO] snapshot org.reqmon:org.reqmon.compiler.POM:1.0.0-SNAPSHOT:
>> checking for updates from
>> http://wrserver1.cis.gsu.edu:9080/artifactory/repo
>> [WARNING] repository metadata for: 'snapshot
>> org.reqmon:org.reqmon.compiler.POM:1.0.0-SNAPSHOT' could not be retrieved
>> from repository: http://wrserver1.cis.gsu.edu:9080/artifactory/repo due
>> to an error: Unsupported Protocol: '': Cannot find wagon which supports
>> the requested protocol:
>> [INFO] Repository 'http://wrserver1.cis.gsu.edu:9080/artifactory/repo'
>> will be blacklisted
>> [INFO] snapshot org.reqmon:org.reqmon.compiler.POM:1.0.0-SNAPSHOT:
>> checking for updates from
>> http://repository.sonatype.org/content/groups/public
>> [WARNING] repository metadata for: 'snapshot
>> org.reqmon:org.reqmon.compiler.POM:1.0.0-SNAPSHOT' could not be retrieved
>> from repository: http://repository.sonatype.org/content/groups/public due
>> to an error: Unsupported Protocol: '': Cannot find wagon which supports
>> the requested protocol:
>> [INFO] Repository 'http://repository.sonatype.org/content/groups/public'
>> will be blacklisted
>> [INFO] snapshot org.reqmon:org.reqmon.compiler.POM:1.0.0-SNAPSHOT:
>> checking for updates from
>> http://wrserver1.cis.gsu.edu:9080/artifactory/repo
>> [WARNING] repository metadata for: 'snapshot
>> org.reqmon:org.reqmon.compiler.POM:1.0.0-SNAPSHOT' could not be retrieved
>> from repository: http://wrserver1.cis.gsu.edu:9080/artifactory/repo due
>> to an error: Unsupported Protocol: '': Cannot find wagon which supports
>> the requested protocol:
>> [INFO] Repository 'http://wrserver1.cis.gsu.edu:9080/artifactory/repo'
>> will be blacklisted
>> [INFO] snapshot org.reqmon:org.reqmon.compiler.POM:1.0.0-SNAPSHOT:
>> checking for updates from
>> http://repository.sonatype.org/content/groups/public
>> [WARNING] repository metadata for: 'snapshot
>> org.reqmon:org.reqmon.compiler.POM:1.0.0-SNAPSHOT' could not be retrieved
>> from repository: http://repository.sonatype.org/content/groups/public due
>> to an error: Unsupported Protocol: '': Cannot find wagon which supports
>> the requested protocol:
>> [INFO] Repository 'http://repository.sonatype.org/content/groups/public'
>> will be blacklisted
>> [ERROR]
>>
>>
>> To diagnose, I ran it with mvn (not tycho) to see if it might download
>> something. I changed the project type to jar (rather than
>> eclipse-plugin). Then, I do get a download.
>>
>> [DEBUG] org.reqmon:org.reqmon.emf.ocl.compiler.ui:jar:1.0.0-SNAPSHOT
>> (selected for null)
>> [DEBUG] Trying repository wrserver1.cis.gsu.edu
>> Downloading:
>> http://wrserver1.cis.gsu.edu:9080/artifactory/repo/org/reqmo n/org.reqmon.emf.ocl.compiler/1.0.0/org.reqmon.emf.ocl.compi ler-1.0.0.pom
>> [DEBUG] Artifact resolved
>> [DEBUG] org.reqmon:org.reqmon.emf.ocl.compiler:jar:1.0.0:compile
>> (selected for compile)
>>
>> For some reason, my tycho doesn't download for dependencyManagement.
>>
>> Any ideas?
>>
>> <wrobinson@gsu.edu> wrote in message
>> news:gmn5h9$90s$1@build.eclipse.org...
>>> If I understand correctly, tycho can do the following:
>>> 1. Read the required Eclipse plugins from the manifest
>>> 2. Search and download a required plugin from a maven repository during
>>> compilation
>>>
>>> I have installed an eclipse plugin into a maven repository and I can
>>> view/download. You can find it here:
>>> http://wrserver1.cis.gsu.edu:9080/artifactory/
>>>
>>> It is referenced in the dependencyManagement section as follows.
>>>
>>> <dependencyManagement>
>>> <dependencies>
>>> <dependency>
>>> <groupId>org.reqmon</groupId>
>>> <artifactId>org.reqmon.emf.ocl.compiler</artifactId>
>>> <version>1.0.1-SNAPSHOT</version>
>>> <type>eclipse-plugin</type>
>>> </dependency>
>>> </dependencies>
>>> </dependencyManagement>
>>>
>>> I have attempted this with both SNAPSHOT and normal release versions
>>> (e.g., 1.0.0)
>>>
>>> Each time I run tycho 0.3.0-DEV-1983, it always complains
>>> org.apache.maven.reactor.MavenExecutionException: Bundle
>>> org.reqmon.emf.ocl.compiler.ui cannot be resolved
>>> Resolution errors:
>>> Bundle org.reqmon.emf.ocl.compiler.ui - Missing Constraint:
>>> Require-Bundle: org.reqmon.emf.ocl.compiler; bundle-version="1.0.1"
>>>
>>> The maven repository is correctly configured using the
>>> ./m2/settings.xml. (Additionally, I have updated the conf/settings.xml
>>> file in tycho.)
>>>
>>> Any suggestions?
>>>
>>> "Igor Fedorenko" <igor@ifedorenko.com> wrote in message
>>> news:gdl3a9$pt7$1@build.eclipse.org...
>>>> m2spring@springdot.org wrote:
>>>>>
>>>>> Let me clarify that httpclient is just an example.
>>>>> Making it and my other 3rd party artifacts to be OSGi bundles is the
>>>>> easy
>>>>> part.
>>>>> I've planned to deploy them then to my group repository.
>>>>>
>>>>> However, for my internally developed artifacts it's a different story.
>>>>> All of them are Eclipse plugins.
>>>>> I want to build them through a CI framework (probably Continuum) and
>>>>> deploy them also to the group repository.
>>>>> Then, members of my team can work on individual plugins and the
>>>>> plugins'
>>>>> OSGi dependencies
>>>>> (as expressed in MANIFEST.MF) are resolved from the group repository.
>>>>>
>>>>> That's my plan in a nutshell. Having a target platform in this
>>>>> picture
>>>>> where a base set of plugins are resolved from is fine, too.
>>>>
>>>> Actually, this is the primary use case for "target platform management"
>>>> feature we're adding to tycho and I would be very interested to know
>>>> how
>>>> well (or not so well) it works for your projects. There is no user
>>>> documentation yet, but here is relatively detailed description of how
>>>> this works.
>>>>
>>>> In the just announced tycho 0.3.0-DEV-1756, build target platform can
>>>> be
>>>> specified using dependencyManagement pom.xml section. It is possible to
>>>> specify path to local eclipse installation using dependency with system
>>>> scope, but more interestingly, it is also possible to specify
>>>> eclipse-feature and eclipse-plugin artifacts using maven
>>>> groupId/artifactId/version coordinates.
>>>>
>>>> At build time, tycho will resolve all eclipse-feature artifacts
>>>> (transitively) and eclipse-plugin artifacts (non-transitively) from
>>>> maven repositories and target platform used during the build will
>>>> include features/bundles both from local eclipse-installation and from
>>>> maven repositories. Build results can be installed/deployed into maven
>>>> local/remote repositories by invoking regular "install" or "deploy"
>>>> build phases.
>>>>
>>>> So in your scenario, CI framework can run "tycho/bin/mvn deploy" for
>>>> set
>>>> of related projects and everything is expected to work "the maven way"
>>>> assuming dependencyManagement is configured properly. We are using
>>>> Hudson, btw, but I guess Continuum should work too.
>>>>
>>>> You can see this in action in integration test [1]. The test first runs
>>>> build01 to install a feature and couple of bundles into local maven
>>>> repository. Then it runs build02 which uses the feature and bundles
>>>> from
>>>> the first build. You can see specification of build02 target platform
>>>> in
>>>> pom.xml [2].
>>>>
>>>> Please note that -Dtycho.targetPlatform OVERRIDES target platform in
>>>> pom.xml. In other words, target platform specified in
>>>> dependencyManagement sections will be ignored if -Dtycho.targetPlatform
>>>> is specified on command line or via settings.xml/pom.xml. (I should
>>>> have
>>>> added a warning, I guess)
>>>>
>>>> Also note that there is no PDE integration yet. We can talk about using
>>>> tycho build target platform in PDE if you're happy with how it works on
>>>> command line.
>>>>
>>>> [1]
>>>> http://svn.sonatype.org/m2eclipse/tycho/trunk/tycho-its/proj ects/tycho164/
>>>> [2]
>>>> http://svn.sonatype.org/m2eclipse/tycho/trunk/tycho-its/proj ects/tycho164/build02/pom.xml
>>>>
>>>>>
>>>>>> but I am open for suggestions
>>>>>> about how to make consumption of plain JARs in tycho builds easier.
>>>>>
>>>>> I wouldn't cater to consuming plain Jars in general with Tycho.
>>>>> I would target OSGi bundles only instead.
>>>>> If there was a way to map an OSGi dependency into a Maven coordinate,
>>>>> and Maven/Tycho was able to resolve the OSGi dependency from a Maven
>>>>> repository,
>>>>> that might make the consumption of OSGi bundles easier.
>>>>>
>>>>
>>>> I think I know what you mean and I might have some ideas how to
>>>> implement it, although not necessary exactly as you describe it here. I
>>>> can't be more specific at the moment, but stay tuned ;-).
>>>>
>>>> --
>>>> Regards,
>>>> Igor
>>>>
>>>
>>
Re: [m2eclipse-user] Tycho: Eclipse plugin dependency resolution from local repository [message #25781 is a reply to message #21881] Fri, 08 May 2009 19:52 Go to previous message
Thomas  ichstädt-Engelen is currently offline Thomas ichstädt-EngelenFriend
Messages: 50
Registered: July 2009
Member

> That solved the problem. :-)

great to read that you got the tycho build running finally. Would you mind
sharing the wokring pom which is capeable of resolving dependencies from
maven repository?

Cheers,

Thomas E.-E.
Previous Topic:Using tycho to build target platform
Next Topic:Meaning of different profiles (install, package, clean etc)?
Goto Forum:
  


Current Time: Wed Nov 26 02:00:40 GMT 2014

Powered by FUDForum. Page generated in 0.02517 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software