Re: Eclipse plugin and project references

2013-02-25 Thread Stiffler82
I have a problem and can not find any support for it, also not in google. I
created my own lib called core.jar and when I try to refer it as a
dependency in from my POM all works fine: 

dependency
   groupIdcom.innosquared/groupId
   artifactIdcore/artifactId
   version1.1.10/version
/dependency

But when I run mvn eclipse:eclipse Maven creates wrong .classpath and
.project files. It resolves my jar as a java project instead of a jar
library. The following entry will be created in my classpath:

  classpathentry kind=src path=/core/

In my .projects file there is now:

 projects
projectcore/project
  /projects

I do not define anything in my Build-Cycle in POM, so I don't understand
this strange behaviour. What can I do to prevent Maven from resolving my jar
as a java project and resolving it as a normal dependency instead?



--
View this message in context: 
http://maven.40175.n5.nabble.com/Eclipse-plugin-and-project-references-tp99838p5748396.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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



Re: Eclipse plugin and project references

2013-02-25 Thread Andreas Gudian
The plugin will always resolve the artifact as eclipse project, if it
detects that project within your eclipse workspace, or if it is in the
reactor (i.e. part of the maven build).
Remove the other project from the workspace and you should be fine. Or make
sure that core now has a new version (it should be some -SNAPSHOT version
after you created that 1.1.10 version, right?)

Andreas

2013/2/25 Stiffler82 hauptstep...@gmail.com

 I have a problem and can not find any support for it, also not in google. I
 created my own lib called core.jar and when I try to refer it as a
 dependency in from my POM all works fine:

 dependency
groupIdcom.innosquared/groupId
artifactIdcore/artifactId
version1.1.10/version
 /dependency

 But when I run mvn eclipse:eclipse Maven creates wrong .classpath and
 .project files. It resolves my jar as a java project instead of a jar
 library. The following entry will be created in my classpath:

   classpathentry kind=src path=/core/

 In my .projects file there is now:

  projects
 projectcore/project
   /projects

 I do not define anything in my Build-Cycle in POM, so I don't understand
 this strange behaviour. What can I do to prevent Maven from resolving my
 jar
 as a java project and resolving it as a normal dependency instead?



 --
 View this message in context:
 http://maven.40175.n5.nabble.com/Eclipse-plugin-and-project-references-tp99838p5748396.html
 Sent from the Maven - Users mailing list archive at Nabble.com.

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




Re: Eclipse plugin and project references

2013-02-25 Thread Lyons, Roy
From my experience to date, it has proven far better to use the m2eclipse
plugin and import the maven project directly.  It will then perform the
build using maven...

When people come to me with issues such as yours, I generally tell them to
delete the project and re-import using m2eclipse (and never use mvn
eclipse:eclipse again) -- and then everything works wonderfully for them.


Thanks,

Roy Lyons




On 2/25/13 11:03 AM, Stiffler82 hauptstep...@gmail.com wrote:

I have a problem and can not find any support for it, also not in google.
I
created my own lib called core.jar and when I try to refer it as a
dependency in from my POM all works fine:

   dependency
  groupIdcom.innosquared/groupId
  artifactIdcore/artifactId
  version1.1.10/version
   /dependency

But when I run mvn eclipse:eclipse Maven creates wrong .classpath and
.project files. It resolves my jar as a java project instead of a jar
library. The following entry will be created in my classpath:

  classpathentry kind=src path=/core/

In my .projects file there is now:

 projects
projectcore/project
  /projects

I do not define anything in my Build-Cycle in POM, so I don't understand
this strange behaviour. What can I do to prevent Maven from resolving my
jar
as a java project and resolving it as a normal dependency instead?



--
View this message in context:
http://maven.40175.n5.nabble.com/Eclipse-plugin-and-project-references-tp9
9838p5748396.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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



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



Re: Eclipse plugin and project references

2013-02-25 Thread Baptiste MATHUS
+1.
Even the maven-eclipse-plugin developers advice to use M2Eclipse instead.

Cheers


2013/2/25 Lyons, Roy roy.ly...@cmegroup.com

 From my experience to date, it has proven far better to use the m2eclipse
 plugin and import the maven project directly.  It will then perform the
 build using maven...

 When people come to me with issues such as yours, I generally tell them to
 delete the project and re-import using m2eclipse (and never use mvn
 eclipse:eclipse again) -- and then everything works wonderfully for them.


 Thanks,

 Roy Lyons




 On 2/25/13 11:03 AM, Stiffler82 hauptstep...@gmail.com wrote:

 I have a problem and can not find any support for it, also not in google.
 I
 created my own lib called core.jar and when I try to refer it as a
 dependency in from my POM all works fine:
 
dependency
   groupIdcom.innosquared/groupId
   artifactIdcore/artifactId
   version1.1.10/version
/dependency
 
 But when I run mvn eclipse:eclipse Maven creates wrong .classpath and
 .project files. It resolves my jar as a java project instead of a jar
 library. The following entry will be created in my classpath:
 
   classpathentry kind=src path=/core/
 
 In my .projects file there is now:
 
  projects
 projectcore/project
   /projects
 
 I do not define anything in my Build-Cycle in POM, so I don't understand
 this strange behaviour. What can I do to prevent Maven from resolving my
 jar
 as a java project and resolving it as a normal dependency instead?
 
 
 
 --
 View this message in context:
 
 http://maven.40175.n5.nabble.com/Eclipse-plugin-and-project-references-tp9
 9838p5748396.html
 Sent from the Maven - Users mailing list archive at Nabble.com.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
 For additional commands, e-mail: users-h...@maven.apache.org
 


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




-- 
Baptiste Batmat MATHUS - http://batmat.net
Sauvez un arbre,
Mangez un castor !


Re: maven-eclipse-plugin 2.6 project references

2009-04-14 Thread Arnaud HERITIER
Hi Stephen,
  Thx a lot for this feedback. I don't remember when and why  we did these
changes but I understand your problem. It seems that the autodiscovery of
projects dependencies in the workspace is activated by default. I think that
this feature should be deativated by default (First issue to open).
  The problem about projects naming is that maven identifies a project from
groupId/artifactId/version. In Eclipse a link betwwen project is done using
project's name which is by default the artifactId. Having groupID/artifactId
and version in eclipse project's name is the better solution to not have
problem of identification but after that projects are unreadable (except if
you are working on a 54 display). I don't know what to do to have something
logical to identify a maven project in eclipse. I didn't have a look to see
how m2eclise and Q4E are doing to mange these case (several branches of a
project in the same workspace)


On Mon, Apr 13, 2009 at 7:09 PM, Stephen Duncan Jr stephen.dun...@gmail.com
 wrote:

 Amongst several other surprising changes in the 2.6 release of the
 maven-eclipse-plugin, I'd like to explain on one change caused some
 confusion for myself and other members of my development team.  I'm not
 sure
 it's really a bug, or exactly what feature enhancement to file, so I'm
 hoping this thread can help determine a better future outcome.

 Background: We have many different components as individual maven projects,
 no multi-project/reactor projects, and Hudson continuously building and
 deploying SNAPSHOTs to Nexus.  The typical workflow for a developer would
 be
 to check out any particular component they needed to work on, and they
 could
 run 'mvn eclipse:eclipse' to get the classpath right, and to download the
 latest versions of any dependent components (settings.xml defined the
 repository with a updatePolicy of always).  If they wanted to make changes
 to a dependent component locally, they'd make the changes, run mvn install,
 and then refresh the project to get those changes.  This all worked without
 any extra configuration of the eclipse plugin.  Also, the name of the
 project in eclipse didn't necessarily match the artifactId in anyway;
 typically it matched the folder in Subversion (which is sometimes, though
 rarely, different from the artifactId), or the the name of the branch in
 Subversion (artifactId-version, where version might be a SNAPSHOT, or be
 something like 1.2.x).

 With the eclipse plugin 2.6, it seems new work has been done to try to
 identify other projects in the eclipse workspace, and use those as project
 dependencies, instead of jar dependencies in the local repository.  To get
 the workflow described above, I've gone ahead and configured (in our
 corporate parent pom) the eclipse plugin to not do project references at
 all.  However, I didn't have to specify that before (I think it only used
 to
 affect reactor-builds), and therefore our team did get confused by the new
 behavior.

 When all SNAPSHOT dependencies were being downloaded from the repository,
 the version was the timestamp version of the SNAPSHOT, and never matched a
 project in the workspace, and so it behaved as before, so no problem.
 However, once somebody installed a dependency locally, the version was just
 -SNAPSHOT, so the eclipse plugin believed it found a match in the
 workspace.  However, the name it tried to use for the project reference was
 the artifactId, not the actual name of the project in eclipse, and
 therefore
 the project showed up as broken in eclipse, due to the unsatisfied
 dependency.

 I think it would be better if the default went back to only doing project
 references for reactor builds.  I also don't know if there's some better
 way
 to figure out the right project name to use for the reference.  Even if our
 dependency had been named to match the project reference, somebody working
 on the branch may have gotten the WRONG project reference (the trunk would
 have the artifactId, but the wrong version, the branch project name would
 be
 the right version, but not match the expected name).

 --
 Stephen Duncan Jr
 www.stephenduncanjr.com




-- 
Arnaud


maven-eclipse-plugin 2.6 project references

2009-04-13 Thread Stephen Duncan Jr
Amongst several other surprising changes in the 2.6 release of the
maven-eclipse-plugin, I'd like to explain on one change caused some
confusion for myself and other members of my development team.  I'm not sure
it's really a bug, or exactly what feature enhancement to file, so I'm
hoping this thread can help determine a better future outcome.

Background: We have many different components as individual maven projects,
no multi-project/reactor projects, and Hudson continuously building and
deploying SNAPSHOTs to Nexus.  The typical workflow for a developer would be
to check out any particular component they needed to work on, and they could
run 'mvn eclipse:eclipse' to get the classpath right, and to download the
latest versions of any dependent components (settings.xml defined the
repository with a updatePolicy of always).  If they wanted to make changes
to a dependent component locally, they'd make the changes, run mvn install,
and then refresh the project to get those changes.  This all worked without
any extra configuration of the eclipse plugin.  Also, the name of the
project in eclipse didn't necessarily match the artifactId in anyway;
typically it matched the folder in Subversion (which is sometimes, though
rarely, different from the artifactId), or the the name of the branch in
Subversion (artifactId-version, where version might be a SNAPSHOT, or be
something like 1.2.x).

With the eclipse plugin 2.6, it seems new work has been done to try to
identify other projects in the eclipse workspace, and use those as project
dependencies, instead of jar dependencies in the local repository.  To get
the workflow described above, I've gone ahead and configured (in our
corporate parent pom) the eclipse plugin to not do project references at
all.  However, I didn't have to specify that before (I think it only used to
affect reactor-builds), and therefore our team did get confused by the new
behavior.

When all SNAPSHOT dependencies were being downloaded from the repository,
the version was the timestamp version of the SNAPSHOT, and never matched a
project in the workspace, and so it behaved as before, so no problem.
However, once somebody installed a dependency locally, the version was just
-SNAPSHOT, so the eclipse plugin believed it found a match in the
workspace.  However, the name it tried to use for the project reference was
the artifactId, not the actual name of the project in eclipse, and therefore
the project showed up as broken in eclipse, due to the unsatisfied
dependency.

I think it would be better if the default went back to only doing project
references for reactor builds.  I also don't know if there's some better way
to figure out the right project name to use for the reference.  Even if our
dependency had been named to match the project reference, somebody working
on the branch may have gotten the WRONG project reference (the trunk would
have the artifactId, but the wrong version, the branch project name would be
the right version, but not match the expected name).

-- 
Stephen Duncan Jr
www.stephenduncanjr.com


Re: Eclipse plugin and project references

2008-01-20 Thread TM



 Yes, when mvn eclipse:eclipse is run for a multi module project, the
 dependencies between the modules will be project dependencies.
 
I see. After I started it from the root project it did work as wanted.
Thanks.

Still remains the (minor) question to me why does the plugin behaves
different depending on whether it was started from the sub module resp. the
parent project. In my opinion, this shouldn't make a difference.

Thorsten
-- 
View this message in context: 
http://www.nabble.com/Eclipse-plugin-and-project-references-tp14844945s177p14981288.html
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Eclipse plugin and project references

2008-01-15 Thread TM

Hello,

my question is about whether it is possible to let the Maven Eclipse plugin
create the .classpath file in a way that it will directly reference
dependency projects instead of referencing the JAR artifact from the local
repository. The following example .classpath file for a project named foo
illustrates this:

?xml version=1.0 encoding=UTF-8?
classpath
classpathentry kind=src path=src/main/java/
classpathentry kind=src output=target/test-classes
path=src/test/java/
classpathentry kind=con 
path=org.eclipse.jdt.launching.JRE_CONTAINER/
classpathentry combineaccessrules=false kind=src path=/common/
classpathentry combineaccessrules=false kind=src path=/system/
classpathentry combineaccessrules=false kind=src path=/api/
classpathentry kind=output path=target/classes/
/classpath

The version above has three direct references to projects common,
system, and api which are all sibling projects, i.e., are located in the
same folder than project foo. Regarding Maven all four projects are modules
of a parent project.

When I now start mvn eclipse:eclipse in project foo it will create a
.classpath file that looks like this:

?xml version=1.0 encoding=UTF-8?
classpath
  classpathentry kind=src path=src/main/java/
  classpathentry kind=src path=src/test/java
output=target/test-classes/
  classpathentry kind=output path=target/classes/
  classpathentry kind=con
path=org.eclipse.jdt.launching.JRE_CONTAINER/
  classpathentry kind=var
path=M2_REPO/org/blahh/common/1.0/common-1.0.jar/
  classpathentry kind=var
path=M2_REPO/org/blahh/system/2.0/system-2.0.jar/
  classpathentry kind=var path=M2_REPO/org/blahh/api/1.2/api-1.2.jar/
/classpath

The three projects are now referenced by the JAR artifact from the
repository. This is not optimal for me since changes to the code in one of
the three projects are not instantly visible to project foo (provided that
Eclipse' auto build is turned on); only after a Maven install rebuild. Is
there any option that I can use to force the Eclipse plugin to reference
dependency projects directly? If it doesn't exist yet, then take this as a
feature request.

Thanks,
Thorsten
-- 
View this message in context: 
http://www.nabble.com/Eclipse-plugin-and-project-references-tp14844945s177p14844945.html
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Eclipse plugin and project references

2008-01-15 Thread Heinrich Nirschl
On Jan 15, 2008 8:14 PM, TM [EMAIL PROTECTED] wrote:

 Hello,

 my question is about whether it is possible to let the Maven Eclipse plugin
 create the .classpath file in a way that it will directly reference
 dependency projects instead of referencing the JAR artifact from the local
 repository. The following example .classpath file for a project named foo

Yes, when mvn eclipse:eclipse is run for a multi module project, the
dependencies between the modules will be project dependencies.

If you have some independent projects, you can come up with an
artificial top level pom that has the projects as modules and start
mvn eclipse:eclipse from there.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Eclipse plugin and project references

2008-01-15 Thread Michael McCallum
the dev version of the m2eclipse plugin will automatically resolve project 
references when the depedency resolves to a snapshot...

you can run mvn eclipse:m2eclipse to generate the project files for the 
m2eclipse plugin

update site... http://m2eclipse.codehaus.org/update-dev/

On Wed, 16 Jan 2008 08:14:29 TM wrote:
 Hello,

 my question is about whether it is possible to let the Maven Eclipse plugin
 create the .classpath file in a way that it will directly reference
 dependency projects instead of referencing the JAR artifact from the local
 repository. The following example .classpath file for a project named foo
 illustrates this:

 ?xml version=1.0 encoding=UTF-8?
 classpath
   classpathentry kind=src path=src/main/java/
   classpathentry kind=src output=target/test-classes
 path=src/test/java/
   classpathentry kind=con
 path=org.eclipse.jdt.launching.JRE_CONTAINER/ classpathentry
 combineaccessrules=false kind=src path=/common/ classpathentry
 combineaccessrules=false kind=src path=/system/ classpathentry
 combineaccessrules=false kind=src path=/api/ classpathentry
 kind=output path=target/classes/
 /classpath

 The version above has three direct references to projects common,
 system, and api which are all sibling projects, i.e., are located in
 the same folder than project foo. Regarding Maven all four projects are
 modules of a parent project.

 When I now start mvn eclipse:eclipse in project foo it will create a
 .classpath file that looks like this:

 ?xml version=1.0 encoding=UTF-8?
 classpath
   classpathentry kind=src path=src/main/java/
   classpathentry kind=src path=src/test/java
 output=target/test-classes/
   classpathentry kind=output path=target/classes/
   classpathentry kind=con
 path=org.eclipse.jdt.launching.JRE_CONTAINER/
   classpathentry kind=var
 path=M2_REPO/org/blahh/common/1.0/common-1.0.jar/
   classpathentry kind=var
 path=M2_REPO/org/blahh/system/2.0/system-2.0.jar/
   classpathentry kind=var path=M2_REPO/org/blahh/api/1.2/api-1.2.jar/
 /classpath

 The three projects are now referenced by the JAR artifact from the
 repository. This is not optimal for me since changes to the code in one of
 the three projects are not instantly visible to project foo (provided that
 Eclipse' auto build is turned on); only after a Maven install rebuild. Is
 there any option that I can use to force the Eclipse plugin to reference
 dependency projects directly? If it doesn't exist yet, then take this as a
 feature request.

 Thanks,
 Thorsten



-- 
Michael McCallum
Enterprise Engineer
mailto:[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]