Showing posts with label maven. Show all posts
Showing posts with label maven. Show all posts

Wednesday, February 6, 2013

Maven: Could not calculate build plan: Failure to transfer

Last day a very simple thing took little while for us to resolve. I was trying to setup a new project on a machine and did not have all my environment variables setup properly.


I was trying both the command line and eclipse options interchangibly. Initially I had the wrong repository settins in settings.xml so it could not download any jars and I ended up having *.lastUpdated files all over.

Eclipse maven plugin seems to stop downloading the dependencies if it seems *.lastUpdated files. I had to remove the all the *.lastUpdated file and plugin starts to work agian.
I read same clean up can be done using mvn -U clean too.   happy reading Manisha

Wednesday, July 25, 2012

Attaching Source code with Maven

Initially I use to download the source jars and then use to attach them to project. Then started adding source jar as dependencies to pom for dev profile. Recently I found a maven command which does i it seamlessly for us.

I ran below commands to download and attach the source code of all the projects in Eclipse for me.

mvn dependency:sources

mvn eclipse:eclipse -DdownloadSources=true 

Boom! refresh all project in Eclipse and the source code must be attached to your project.                    
Enjoy looking into source
Manisha