| Author |
Message |
|
|
Post subject: maven managed jar doesn't add the jars to the project build
Posted: Jun 25, 2008 - 03:13 AM
|
|
Registered Member

Joined: Jun 25, 2008
Posts: 1
|
|
For an existing project, I can run maven builds through run menu and it works fine, but the jars are not added to build path, when I check the javaBuildPath under library/maven managed dependency, jars are not listed and therefore my eclipse workspace is full of red error signs.
Anythought! |
|
|
| |
|
|
|
 |
|
|
Post subject: Re: maven managed jar doesn't add the jars to the project bu
Posted: Jun 25, 2008 - 09:58 AM
|
|
Registered Member

Joined: May 12, 2005
Posts: 472
|
|
| amene wrote: | For an existing project, I can run maven builds through run menu and it works fine, but the jars are not added to build path, when I check the javaBuildPath under library/maven managed dependency, jars are not listed and therefore my eclipse workspace is full of red error signs.
Anythought! |
Do you see any problem descriptions in the Problems view re: missing jars?
Is there any error markers on pom.xml? |
_________________ Eugene
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject: I have the same problem
Posted: Jun 26, 2008 - 01:03 PM
|
|
Registered Member


Joined: Jan 04, 2005
Posts: 16
|
|
The Maven4Myeclipse plugin only works fine with new projects. When I import existing maven projects I get in builth path "org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER" and it is empty.
However with a new projects created checking "add Maven Support" in wizard the project gets the library "Maven Dependencies" configured fine.
Any ideas??
Thanks in advance |
|
|
| |
|
|
|
 |
|
|
Post subject: Re: I have the same problem
Posted: Jun 26, 2008 - 01:11 PM
|
|
Registered Member

Joined: May 12, 2005
Posts: 472
|
|
| dimension wrote: | The Maven4Myeclipse plugin only works fine with new projects. When I import existing maven projects I get in builth path "org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER" and it is empty.
However with a new projects created checking "add Maven Support" in wizard the project gets the library "Maven Dependencies" configured fine. |
Was that project created by MyEclipse? |
_________________ Eugene
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Jun 28, 2008 - 03:44 PM
|
|
Registered Member


Joined: Jan 12, 2005
Posts: 3
|
|
I have exactly the same issue. It is empty.
My project was created by an earlier version of MyEclipse.
Now "build automatically" is not working
No pom.xml error - it was working fine
The Problems tab just says "Symbol can not be resolved to a type" |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Jun 28, 2008 - 06:56 PM
|
|
Registered Member

Joined: May 12, 2005
Posts: 472
|
|
| bridgeforce wrote: | I have exactly the same issue. It is empty.
My project was created by an earlier version of MyEclipse.
Now "build automatically" is not working
No pom.xml error - it was working fine
The Problems tab just says "Symbol can not be resolved to a type" |
Project should be created with MyEclipse 6.5 and have Maven option checked in the project wizard. |
_________________ Eugene
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Jul 01, 2008 - 03:21 PM
|
|
Registered Member

Joined: Mar 26, 2008
Posts: 11
|
|
I ran into the same problem. I solved it by manually editing the .classpath and .project files for each project ( kind of annoying ) to switch from the apache maven plugin to the maven4myeclipse.
Here are some samples that worked for me. I am still deciding what to exclude when from the test folders, and this will be project dependent as well.
Hope this helps!
Tom
Changes to existing eclipse projects to allow use of maven4myeclipse plugin
to any .project files that use maven-plugin:
Add this build command to the <buildSpec>:
<buildCommand>
<name>org.maven.ide.eclipse.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
Replace the org.apache maven nature with:
<nature>com.genuitec.eclipse.maven.maven2Nature</nature>
to the classpath: ( still working out the details )
Will need some exclusions on the test folders, so they don't make it into the build
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="src" path="src/main/resources"/>
<classpathentry kind="src" path="src/test/java"/>
<classpathentry kind="src" path="src/test/resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="output" path="src/main/webapp/WEB-INF/classes"/>
</classpath> |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Jul 02, 2008 - 03:31 AM
|
|
Registered Member

Joined: Mar 26, 2008
Posts: 11
|
|
I posted the above in somewhat of a hurry. I wanted to get the info out while it was fresh. I forgot to mention that you want to *replace* the maven builder with the one above for the <buildCommand>. Also, Eclipse will complain and not build if you specify a source folder in your classpath that is not in your project. In this case, close the project and delete the offending line from your .classpath.
6.5 works well enough in my work's Windows environment. I tried setting up on my Linux laptop at home. My home laptop runs under a Standard license. MyEclipse 6.5 won't let me run a Maven build or deploy my apps to Jetty. It tells me my license doesn't have the privilege to do this, and that I need to upgrade to Professional. I'm doing an absolute clean install before that becomes a new post.
Prost!
Tom |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Jul 03, 2008 - 03:57 PM
|
|
Registered Member


Joined: Jan 12, 2005
Posts: 3
|
|
| support-eugene wrote: | | bridgeforce wrote: | I have exactly the same issue. It is empty.
My project was created by an earlier version of MyEclipse.
Now "build automatically" is not working
No pom.xml error - it was working fine
The Problems tab just says "Symbol can not be resolved to a type" |
Project should be created with MyEclipse 6.5 and have Maven option checked in the project wizard. |
So you mean I need to recreate every project I created before to use Macen support? Does not sound like a good migration plan... |
|
|
| |
|
|
|
 |
|
|