Sample settings.xml

Here’s the stock “settings.xml” with comments (complete/unchopped file at the bottom) License: <?xml version=”1.0″ encoding=”UTF-8″?> <!– Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, … Read more

mvn clean install vs. deploy vs. release

The clean, install and deploy phases are valid lifecycle phases and invoking them will trigger all the phases preceding them, and the goals bound to these phases. mvn clean install This command invokes the clean phase and then the install phase sequentially: clean: removes files generated at build-time in a project’s directory (target by default) … Read more

Is it possible to rename a maven jar-with-dependencies?

You can specify the finalName property to give the jar the name you want, and specify that appendAssemblyId should be false to avoid the “jar-with-dependencies” suffix. The configuration below will output a jar called “test.jar” <plugin> <artifactId>maven-assembly-plugin</artifactId> <version>2.2-beta-4</version> <executions> <execution> <id>jar-with-dependencies</id> <phase>package</phase> <goals> <goal>single</goal> </goals> <configuration> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> <finalName>test</finalName> <appendAssemblyId>false</appendAssemblyId> </configuration> </execution> </executions> </plugin> … Read more

How to change maven logging level to display only warning and errors?

Answering your question I made a small investigation because I am also interested in the solution. Maven command line verbosity options According to http://books.sonatype.com/mvnref-book/reference/running-sect-options.html#running-sect-verbose-option -e for error -X for debug -q for only error Maven logging config file Currently maven 3.1.x uses SLF4J to log to the System.out . You can modify the logging settings … Read more

Maven: best way of linking custom external JAR to my project?

You can create an In Project Repository, so you don’t have to run mvn install:install-file every time you work on a new computer <repository> <id>in-project</id> <name>In Project Repo</name> <url>file://${project.basedir}/libs</url> </repository> <dependency> <groupId>dropbox</groupId> <artifactId>dropbox-sdk</artifactId> <version>1.3.1</version> </dependency> /groupId/artifactId/version/artifactId-verion.jar detail read this blog post https://web.archive.org/web/20121026021311/charlie.cu.cc/2012/06/how-add-external-libraries-maven

Force re-download of release dependency using Maven

You cannot make Maven re-download dependencies, but what you can do instead is to purge dependencies that were incorrectly downloaded using mvn dependency:purge-local-repository See: http://maven.apache.org/plugins/maven-dependency-plugin/purge-local-repository-mojo.html This looks up the list of all transitive dependencies of the current project, deletes them, then redownloads them. You can even add it as a plugin into your pom if … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)