The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

boydjo (1) [Avatar] Offline
#1
I am having trouble getting the application to build within eclipse. I follow the directions you provided for doing the build from the command line. I then generate the eclipse project files and then import the project. I've also setup the M2_REPO class variable for the repository. The IDE has an error indicating the following: Build path contains duplicate entry: 'Csmilieocuments and Settings/XXXX.XXXX/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar' for project pia-util'

Any suggestions for how to resolve are appreciated.

Best Regards,

John Boyd
ceracm (113) [Avatar] Offline
#2
Re: Pojos In Action Projects in Eclipse with Maven plugin
Hmmm... not sure what is going on.

1. What version of maven are you running "mvn --version"?
2.What is the name of the source code zip that you downloaded?
3. Are you using the eclipse plugin for maven2 - i.e. the plugin that runs inside eclipse? The only time I recall getting that error is in conjunction with that plugin. If you enable that plugin on it can add classpath entries from pom.xml, which causes duplicates.
4. Please could you send the .classpath file.
5. Does "mvn eclipse:clean" followed by "mvn eclipse:eclipse" fix the problem (probably not but worth a try)

Thanks.

Chris
dres (2) [Avatar] Offline
#3
Re: Pojos In Action Projects in Eclipse with Maven plugin
I'm having the same issue after running "mvn eclispse:eclipse". I did have the m2 plugin but disabled and ran it again.
dres (2) [Avatar] Offline
#4
Re: Pojos In Action Projects in Eclipse with Maven plugin
It was the maven eclispse IDE plugin causing the issue. Had to remove the library after disabling the plugin. All good now.