Maven command to list lifecycle phases along with bound goals?

The buildplan-maven-plugin is an excellent tool for showing how goals are bound to phases. Below are examples of commands you can run. The commands will automatically download and install the plugin if it hasn’t already been installed. List goals by the order they will execute > mvn fr.jcgay.maven.plugins:buildplan-maven-plugin:list PLUGIN | PHASE | ID | GOAL … Read more

How to keep Maven profiles which are activeByDefault active even if another profile gets activated?

One trick is to avoid activeByDefault, and instead activate the profile by the absence of a property, eg: <profiles> <profile> <id>firstProfile</id> <activation> <property> <name>!skipFirstProfile</name> </property> </activation> … </profile> </profiles> You should then be able to deactivate the profile with -DskipFirstProfile or with -P !firstProfile, but otherwise the profile will be active. See: Maven: The Complete … Read more

How to disable maven blocking external HTTP repositories?

I found a solution to do this by inspecting the commit in the Maven git repository that is responsible for the default HTTP blocking: https://github.com/apache/maven/commit/907d53ad3264718f66ff15e1363d76b07dd0c05f My solution is as follows: In the Maven settings (located in ${maven.home}/conf/settings.xml or ${user.home}/.m2/settings.xml), the following entry must be removed: <mirror> <id>maven-default-http-blocker</id> <mirrorOf>external:http:*</mirrorOf> <name>Pseudo repository to mirror external repositories initially … Read more

Maven: The packaging for this project did not assign a file to the build artifact

I don’t know if this is the answer or not but it might lead you in the right direction… (I believe these steps are for people working with Intellij IDE. The install:install is available in the Maven panel on the right by default. The below steps are alternative to it.) The command install:install is actually … Read more

How do I force Maven to use my local repository rather than going out to remote repos to retrieve artifacts?

The dependency has a snapshot version. For snapshots, Maven will check the local repository and if the artifact found in the local repository is too old, it will attempt to find an updated one in the remote repositories. That is probably what you are seeing. Note that this behavior is controlled by the updatePolicy directive … Read more

Error “The goal you specified requires a project to execute but there is no POM in this directory” after executing maven command

This link helped: https://stackoverflow.com/a/11199865/1307104 I edit my command by adding quotes for every parameter like this: mvn install:install-file “-DgroupId=org.mozilla” “-DartifactId=jss” “-Dversion=4.2.5” “-Dpackaging=jar” “-Dfile=C:\Users\AArmijos\workspace\componentes-1.0.4\deps\jss-4.2.5.jar” It’s worked.

Maven Could not resolve dependencies, artifacts could not be resolved

Looks like you are missing some Maven repos. Ask for your friend’s .m2/settings.xml, and you’ll probably want to update the POM to include the repositories there. –edit: after some quick googling, try adding this to your POM: <repository> <id>com.springsource.repository.bundles.release</id> <name>SpringSource Enterprise Bundle Repository – SpringSource Bundle Releases</name> <url>http://repository.springsource.com/maven/bundles/release</url> </repository> <repository> <id>com.springsource.repository.bundles.external</id> <name>SpringSource Enterprise Bundle Repository … Read more