You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Stiffler82 <ha...@gmail.com> on 2013/02/25 18:03:19 UTC

Re: Eclipse plugin and project references

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>
	   <groupId>com.innosquared</groupId>
	   <artifactId>core</artifactId>
	   <version>1.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>
    <project>core</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-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Eclipse plugin and project references

Posted by Baptiste MATHUS <bm...@batmat.net>.
+1.
Even the maven-eclipse-plugin developers advice to use M2Eclipse instead.

Cheers


2013/2/25 Lyons, Roy <Ro...@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" <ha...@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>
> >          <groupId>com.innosquared</groupId>
> >          <artifactId>core</artifactId>
> >          <version>1.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>
> >    <project>core</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-unsubscribe@maven.apache.org
> >For additional commands, e-mail: users-help@maven.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


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

Re: Eclipse plugin and project references

Posted by Andreas Gudian <an...@gmail.com>.
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 <ha...@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>
>            <groupId>com.innosquared</groupId>
>            <artifactId>core</artifactId>
>            <version>1.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>
>     <project>core</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-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Eclipse plugin and project references

Posted by "Lyons, Roy" <Ro...@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" <ha...@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>
>	   <groupId>com.innosquared</groupId>
>	   <artifactId>core</artifactId>
>	   <version>1.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>
>    <project>core</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-unsubscribe@maven.apache.org
>For additional commands, e-mail: users-help@maven.apache.org
>


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