How can I stop maven from downloading transitive dependencies?

I have a Maven call that downloads artifacts for the purpose of running integration tests: mvn -Dmdep.useRepositoryLayout=true -Dmdep.copyPom=true -Dmdep.useBaseVersion=true dependency:copy-dependencies -DoutputDirectory=deps -DexcludeTransitive=true -e The pom consists purely of dependencies, nothing else. There are other scripts that pick up the artifacts from the deps dir and runs tests on them. Now, my problem is this: Even … Read more

I cannot remove ‘target’ folder on Windows 7 generated by Maven

I am getting a strange error since I compiled, cleaned and recompiled a project with Maven 3.1.1 using Windows 7. Basically the ‘target’ folder generated is no more “removable” and it looks like has no more owner. I have tried to associate an owner to it following the steps here: http://technet.microsoft.com/en-us/library/cc753659.aspx but without any luck … Read more

Unable to find javadoc command: The environment variable JAVA_HOME is not correctly set

When I try to create my project’s Javadoc in IntelliJ IDEA using Maven, the following error appears: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.0.1:javadoc (default-cli) on project spotify-web-api-java: An error has occurred in Javadoc report generation: Unable to find javadoc command: The environment variable JAVA_HOME is not correctly set. -> [Help 1] JAVA_HOME is correctly set … Read more

BASH on Ubuntu on Windows (AKA Linux Subsystem for Windows) 10 – How do I set my PATH?

Thanks to the Anniversary Update, I now have BASH on Ubuntu on Windows 10. Previously, I used Cygwin, and had set up Maven in Cygwin, (and got it fully working), which largely consisted of installing Maven, and then modifying my PATH environment variable (in ~/.bashrc) Well, I’m trying to do the same thing using BUW, … Read more

How to do Maven install or deploy only, without re-package/re-test?

Sometimes I wanted to deploy, but I typed mvn package. Sometimes I want to deploy to another alternative repository (using mvn deploy -DaltDeploymentRepository=…), immediately after the default deploy. So I really don’t want to package and test them again, because they are just succeeded. The result jars are just there, in the target/ directory. I … Read more

How do I install Maven 3?

I am using Ubuntu and need to upgrade to Maven 3 from Maven 2. Can someone please help me install Maven 3? Answer There are two useful publications on this specific topic here: Installing Maven 3 on Ubuntu 10.04 LTS Server « Trial and Terror installing maven 3 from a binary deb on ubuntu « … Read more

Can intellij be set to automatically “Download Sources and Documentation”

I seem to have to maunally click “Download Sources and Documentation” after each clean install, is there a way to get this to happen by default? Answer It is also a setting on the Import Project/Module screen, or available via settings under Maven > Importing: Automatically download sources/documentation If you want to change this setting … Read more