Reputation: 1635
I always get following error when I try to build/clean and build/run my project with Netbeans 7.1.2.
When I run mvn install from command line it works fine. The error appreared first time when I deleted all files from local maven repository.
Does somebody know how to fix this problem?
Failed to execute goal on project Entities: Could not resolve dependencies for project pl.zsk.samples:Entities:jar:1.2-SNAPSHOT: Failed to collect dependencies for [junit:junit:jar:4.10 (test), org.apache.derby:derby:jar:10.8.2.2 (test), org.apache.derby:derbyclient:jar:10.8.2.2 (test), org.dbunit:dbunit:jar:2.4.8 (test), org.slf4j:slf4j-jdk14:jar:1.6.4 (test), org.eclipse.persistence:javax.persistence:jar:2.0.3 (provided), org.eclipse.persistence:eclipselink:jar:2.3.2 (test), pl.zsk.samples:Exceptions:jar:1.2-SNAPSHOT (test), org.apache.commons:commons-lang3:jar:3.1 (provided)]: Failed to read artifact descriptor for pl.zsk.samples:Exceptions:jar:1.2-SNAPSHOT: Failure to find pl.zsk.samples:ProjektBazowy:pom:1.2012-SNAPSHOT in http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of Maven2 has elapsed or updates are forced -> [Help 1]
Upvotes: 2
Views: 4136
Reputation: 3651
You don't really need to copy files over. In your Netbeans just go to:
Tools -> Options -> Java -> Maven -> Execution
and point Maven Home
to your local installation instead of the Bundled
one.
This setting is internally stored in:
/home/<user>/.netbeans/8.1/config/Preferences/org/netbeans/modules/maven.properties
Upvotes: 4
Reputation: 36
I have an installation of Apache Maven that is separate from my Netbeans.Whenever I upgrade my Netbeans I have to remember to copy my [maven_home]/conf/settings.xml to the [netbeans_home]/java/maven/conf/ directory so all the repositories I use are available to my application. That's the usual reason it will work from the command line and not from Netbeans.
Upvotes: 2