You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Daniele Dellafiore <il...@gmail.com> on 2009/06/17 18:25:34 UTC

eclipse plugin 2.7: link project instead of repository jar

Hi everyone.

I read here:
http://martijndashorst.com/blog/2009/05/29/maven-eclipse-plugin-woes-fixed/

that eclipse maven plugin 2.7 has a new feature such as "such as
searching your workspace for projects that are snapshot dependencies,
and adding a project link instead of a jar dependency.".
How is that supposed to work?

I have a project A that uses B-1.0-SNAPSHOT but the mvn
eclipse:eclipse still links the jar.
There is some configuration to do?

thanks!

-- 
Daniele Dellafiore
http://blog.ildella.net
http://twitter.com/ildella

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: eclipse plugin 2.7: link project instead of repository jar

Posted by Jim Sellers <ji...@gmail.com>.
Attaching a zip file of the structure that I described.  When I run
eclipse:eclipse for the MyWonderfulProject, in the .classpath file I get:
<classpathentry kind="var"
path="M2_REPO/com/example/MySubModuleLib/0.0.1-SNAPSHOT/MySubModuleLib-0.0.1-SNAPSHOT.jar"/>

HTH
Jim


On Wed, Jun 17, 2009 at 6:06 PM, Barrie Treloar <ba...@gmail.com> wrote:

> On Thu, Jun 18, 2009 at 6:05 AM, Jim Sellers<ji...@gmail.com> wrote:
> > I've found that it only works if your other projects:
> > 1) have the same parent and you run the maven command from the parent
>
> They should be able to have different parents.
>
> > 2) the other project is at the top level of your workspace.  e.g.
> > MyWonderfulProject
> > \ pom.xml
> >
> > MyMasterLib
> > \ pom
> > \ MySubModuleLib
> >  \ pom.xml
> >
> > From MyWonderfulProject, if you have a dependency on MySubModuleLib, it
> > doesn't seem to link it.  If you like to MyMaterLib, it would.
>
> Again this should work too.
>
> I will have to check whether there are integration tests for these
> scenarios, but the intention is that they should link.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: eclipse plugin 2.7: link project instead of repository jar

Posted by Barrie Treloar <ba...@gmail.com>.
On Thu, Jun 18, 2009 at 6:05 AM, Jim Sellers<ji...@gmail.com> wrote:
> I've found that it only works if your other projects:
> 1) have the same parent and you run the maven command from the parent

They should be able to have different parents.

> 2) the other project is at the top level of your workspace.  e.g.
> MyWonderfulProject
> \ pom.xml
>
> MyMasterLib
> \ pom
> \ MySubModuleLib
>  \ pom.xml
>
> From MyWonderfulProject, if you have a dependency on MySubModuleLib, it
> doesn't seem to link it.  If you like to MyMaterLib, it would.

Again this should work too.

I will have to check whether there are integration tests for these
scenarios, but the intention is that they should link.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: eclipse plugin 2.7: link project instead of repository jar

Posted by Barrie Treloar <ba...@gmail.com>.
On Thu, Jun 18, 2009 at 4:10 PM, Martijn
Dashorst<ma...@gmail.com> wrote:
> This is not the functionality I described. What you describe already
> works in 2.5, as it is the multimodule functionality. What I described
> is that you can check out Wicket into your workspace, and start
> hacking on your own Wicket application, where the
> maven-eclipse-plugin:2.7 will find the wicket projects and link them
> as a project instead of a jar dependency.

I dont think what you are discussing is what they are discussing.

I think the term "link" was used to mean selecting the project in the
workspace not the jar file in the local repo

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: eclipse plugin 2.7: link project instead of repository jar

Posted by Barrie Treloar <ba...@gmail.com>.
On Thu, Jun 18, 2009 at 7:42 PM, Daniele Dellafiore<il...@gmail.com> wrote:
> this is exactly what I understood.
>
> I have, in the same folder, two projects, A and B. A uses B as dependancy.
> I expect that when I mvn eclipse:eclipse A it uses B as a link, in eclipse,
> rather than pointing to the jar in M2 repo.
>
> This is actually not happening
>
> For both projects, the name of the folder is the same of the artifact id and
> of the eclipse project.
> Both have 2.7 version of plugin specified in the pom and both eclipse
> projects are built from maven.
>
> So, I am wondering what I am missing...

Dont know.
It should work.

Try
  mvn -X eclipse:eclipse
and see if the debug output tells you whether it finds B in the
workspace (or any other useful information)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: eclipse plugin 2.7: link project instead of repository jar

Posted by Daniele Dellafiore <il...@gmail.com>.
this is exactly what I understood.

I have, in the same folder, two projects, A and B. A uses B as dependancy.
I expect that when I mvn eclipse:eclipse A it uses B as a link, in eclipse,
rather than pointing to the jar in M2 repo.

This is actually not happening

For both projects, the name of the folder is the same of the artifact id and
of the eclipse project.
Both have 2.7 version of plugin specified in the pom and both eclipse
projects are built from maven.

So, I am wondering what I am missing...

On Thu, Jun 18, 2009 at 8:40 AM, Martijn Dashorst <
martijn.dashorst@gmail.com> wrote:

> This is not the functionality I described. What you describe already
> works in 2.5, as it is the multimodule functionality. What I described
> is that you can check out Wicket into your workspace, and start
> hacking on your own Wicket application, where the
> maven-eclipse-plugin:2.7 will find the wicket projects and link them
> as a project instead of a jar dependency.
>
> i.e.:
>
> workspace/wicket/wicket
> workspace/wicket/wicket-extensions
> workspace/wicket/wicket-spring
> workspace/mywicketapp
>
> This become workspace projects like:
>
> wicket
> wicket-extensions
> wicket-spring
> mywicketapp
>
> and if mywicketapp depends on wicket and wicket-spring, those will
> become project dependencies instead of jar dependencies. No need for a
> single parent, no need for a root pom to get this to work.
>
> Martijn
>
> On Wed, Jun 17, 2009 at 10:35 PM, Jim Sellers<ji...@gmail.com>
> wrote:
> > I've found that it only works if your other projects:
> > 1) have the same parent and you run the maven command from the parent
> >
> > 2) the other project is at the top level of your workspace.  e.g.
> > MyWonderfulProject
> > \ pom.xml
> >
> > MyMasterLib
> > \ pom
> > \ MySubModuleLib
> >  \ pom.xml
> >
> > From MyWonderfulProject, if you have a dependency on MySubModuleLib, it
> > doesn't seem to link it.  If you like to MyMaterLib, it would.
> >
> > HTH
> > Jim
> >
> >
> > On Wed, Jun 17, 2009 at 12:25 PM, Daniele Dellafiore <ildella@gmail.com
> >wrote:
> >
> >> Hi everyone.
> >>
> >> I read here:
> >>
> http://martijndashorst.com/blog/2009/05/29/maven-eclipse-plugin-woes-fixed/
> >>
> >> that eclipse maven plugin 2.7 has a new feature such as "such as
> >> searching your workspace for projects that are snapshot dependencies,
> >> and adding a project link instead of a jar dependency.".
> >> How is that supposed to work?
> >>
> >> I have a project A that uses B-1.0-SNAPSHOT but the mvn
> >> eclipse:eclipse still links the jar.
> >> There is some configuration to do?
> >>
> >> thanks!
> >>
> >> --
> >> Daniele Dellafiore
> >> http://blog.ildella.net
> >> http://twitter.com/ildella
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >>
> >
>
>
>
> --
> Become a Wicket expert, learn from the best: http://wicketinaction.com
> Apache Wicket 1.3.5 is released
> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Daniele Dellafiore
http://blog.ildella.net
http://twitter.com/ildella

Re: eclipse plugin 2.7: link project instead of repository jar

Posted by Martijn Dashorst <ma...@gmail.com>.
This is not the functionality I described. What you describe already
works in 2.5, as it is the multimodule functionality. What I described
is that you can check out Wicket into your workspace, and start
hacking on your own Wicket application, where the
maven-eclipse-plugin:2.7 will find the wicket projects and link them
as a project instead of a jar dependency.

i.e.:

workspace/wicket/wicket
workspace/wicket/wicket-extensions
workspace/wicket/wicket-spring
workspace/mywicketapp

This become workspace projects like:

wicket
wicket-extensions
wicket-spring
mywicketapp

and if mywicketapp depends on wicket and wicket-spring, those will
become project dependencies instead of jar dependencies. No need for a
single parent, no need for a root pom to get this to work.

Martijn

On Wed, Jun 17, 2009 at 10:35 PM, Jim Sellers<ji...@gmail.com> wrote:
> I've found that it only works if your other projects:
> 1) have the same parent and you run the maven command from the parent
>
> 2) the other project is at the top level of your workspace.  e.g.
> MyWonderfulProject
> \ pom.xml
>
> MyMasterLib
> \ pom
> \ MySubModuleLib
>  \ pom.xml
>
> From MyWonderfulProject, if you have a dependency on MySubModuleLib, it
> doesn't seem to link it.  If you like to MyMaterLib, it would.
>
> HTH
> Jim
>
>
> On Wed, Jun 17, 2009 at 12:25 PM, Daniele Dellafiore <il...@gmail.com>wrote:
>
>> Hi everyone.
>>
>> I read here:
>> http://martijndashorst.com/blog/2009/05/29/maven-eclipse-plugin-woes-fixed/
>>
>> that eclipse maven plugin 2.7 has a new feature such as "such as
>> searching your workspace for projects that are snapshot dependencies,
>> and adding a project link instead of a jar dependency.".
>> How is that supposed to work?
>>
>> I have a project A that uses B-1.0-SNAPSHOT but the mvn
>> eclipse:eclipse still links the jar.
>> There is some configuration to do?
>>
>> thanks!
>>
>> --
>> Daniele Dellafiore
>> http://blog.ildella.net
>> http://twitter.com/ildella
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.5 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: eclipse plugin 2.7: link project instead of repository jar

Posted by Jim Sellers <ji...@gmail.com>.
I've found that it only works if your other projects:
1) have the same parent and you run the maven command from the parent

2) the other project is at the top level of your workspace.  e.g.
MyWonderfulProject
\ pom.xml

MyMasterLib
\ pom
\ MySubModuleLib
  \ pom.xml

>From MyWonderfulProject, if you have a dependency on MySubModuleLib, it
doesn't seem to link it.  If you like to MyMaterLib, it would.

HTH
Jim


On Wed, Jun 17, 2009 at 12:25 PM, Daniele Dellafiore <il...@gmail.com>wrote:

> Hi everyone.
>
> I read here:
> http://martijndashorst.com/blog/2009/05/29/maven-eclipse-plugin-woes-fixed/
>
> that eclipse maven plugin 2.7 has a new feature such as "such as
> searching your workspace for projects that are snapshot dependencies,
> and adding a project link instead of a jar dependency.".
> How is that supposed to work?
>
> I have a project A that uses B-1.0-SNAPSHOT but the mvn
> eclipse:eclipse still links the jar.
> There is some configuration to do?
>
> thanks!
>
> --
> Daniele Dellafiore
> http://blog.ildella.net
> http://twitter.com/ildella
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>