Running mvn eclipse:eclipse and the build path - eclipse

Apologies if this is a simple question...
When I run the mvn eclipse:eclipse command to resolve the classpaths for eclipse it always appends the projects version as well. So if the project is called "ATestProject" and the version is "3", the build path will look for "ATestProject-3" but eclipse knows it only as "ATestProject". So there is a error unless I manually add the "ATestProject".
Is there a way to exclude the version? OR am I just doing something wrong?

Related

Errors in eclipse pom.xml but maven clean install is successful

It seems that the property ${user.dir} is recognized by Maven but not recognized by Eclipse. I am seeing the errors below in the pom.xml file in eclipse everywhere then there is a reference to this section:
<outputDirectory>${user.dir}\Nightly_Build\lib</outputDirectory>
The errors are:
Cannot invoke "org.eclipse.core.runtime.IPath.segmentCount()" because "outputDir" is null (org.apache.maven.plugins:maven-jar-plugin:2.4:jar:bpcstudioToats:package)
java.lang.NullPointerException: Cannot invoke "org.eclipse.core.runtime.IPath.segmentCount()" because "outputDir" is null
The good thing is that the command mvn clean install is working fine. I run this command from eclipse right-click run/build and from the command line, and all is working fine.
This is causing eclipse not to recognize the maven dependencies correctly, and reporting compilation errors in various places, and the compilation in maven is successful.
Any idea how to resolve this issue?
Update:
I replaced all references to user.dir with project.basedir in all pom.xml, did a project clean, and updated maven, then all errors disappeared. But, I could see a new folder was created under each project base directory. I will check what was the intent of using user.dir and then will provide an update.

Eclipse can't find a class on my classpath

The project is a maven project.
run as maven install works
mvn install works
I have tried mvn eclipse:eclipse to update project, I can see the jar file in my properties order and export
I have closed and reopened the project
I have deleted and re added the project
I have done a refresh
I have done a maven update project
I have cleaned the project
maven disable maven nature and then configure convert to maven project
It builds just fine from:
The command line:
mvn install
In eclipse run as maven install
It works in intellij idea
For the love of all that is holy...
There was a class of the same name in this project with all lines commented out.
Deleting that source file fixed the problem.

how do i compile a file with plugin stuff?

can you please tell me how to compile a folder in .jar?
I modified some source code of a plugin, now i've to try it, but as i said, i don't know how to compile it.
p.s.I use MacOsX
Thanks all of you.
To compile a Maven project:
Invoke mvn compile on a shell in the project's folder or
Select Run → Run as... → Maven build on your project in Eclipse

How to set up IntelliJ external Scala compiler for Maven projects

I'm using IntelliJ 13 community version. I have a Maven project with multiple modules.
Currently, I'm using IntelliJ internal compiler. I find that every time I run maven clean XXX, I have to manually trigger Scala rebuild in IntelliJ before I run any Cucumber acceptance tests. Otherwise IntelliJ will complaints "no class file". It is annoying. It takes 2 to 3 minutes for the clean re-build.
Finally, I decide to try the external compiler. I have no idea how to do it. I does not seems as easy as enable external compiler.
Can any one please teach me how to properly set up external compiler for a multi-module maven Scala project?
Maven clean command deletes your jar and target folder.
therefor you need to compile the maven project with the maven command "compile" / "install" after clean .
if you want to use your command line to clean and compile you can run $ mvn clean compile . but actually since "clean" is the 1st step at maven's build life cycle you only need to run the compile command . it will run "clean" (or $ mvn compile) as the 1st step of the build .
check out maven build life cycle here

Eclipse package error,but all his childPackage has no error

I check out my code from svn, but one package has errors ,but all his sub-packages have no red-error icon.
error img http://postimg.org/image/o2veg9811/
All my project is based on 'aiis-framework' project ,So I want to make the aiis-framework project correct first.
Before I ask this question, I do 'Project->Clean' in eclipse ,and 'mvn clean compile -Dmaven.test.skip' in maven again and again ,but nothing changed.
If someone give me some advice ,it will do me a big favor.
Additional:I see the problems, it says my pom-file is not up-to-date。
But I runs these in my cmd.exe
mvn clean compile -Dmaven.test.skip
mvn eclipse:clean eclipse:eclipse -Dwtpversion=2.0 -Dmaven.test.skip
mvn resources:resources
Then refresh in the eclipse.
what it happens 'pom is not up-to-date'