Use public maven repository with ivy

You need to add an ivysettings.xml file with the following repositories listed (resolvers in ivy speak) <ivysettings> <settings defaultResolver=”chain”/> <resolvers> <chain name=”chain”> <ibiblio name=”central” m2compatible=”true”/> <ibiblio name=”example” m2compatible=”true” root=”http://example.com/m2/”/> </chain> </resolvers> </ivysettings> In my opinion it makes more sense to separate the dependency declaration (ivy.xml) from the mechanism of retrieval (settings.xml). This is not needed … Read more

Maven 2.1.0 not passing on system properties to Java virtual machine

I don’t think this is a problem in either Maven or Surefire plug-in. Else the surefire is behaving differently. It looks like now, when Surefire forks the JVM, will not take all the system properties from the parent JVM. That’s why you should pass whatever system properties you want for the tests, using argLine. So, … Read more

What does **/* mean in maven syntax?

It is more related to <fileset> Ant convention upon which Maven is built. **/* : all files in all subdirectories: see Ant Patterns. When ** is used as the name of a directory in the pattern, it matches zero or more directories. For example: /test/** matches all files/directories under /test/, such as /test/x.java, or /test/foo/bar/xyz.html, … Read more

Maven specific version of a snapshot dependency

To use a specific snapshot version of a dependency, the referenced artifact should be installed/deployed with a unique snapshot version number. See the uniqueVersion element in the POM reference/Repository. In this case you can reference it like: … <dependency> <groupId>groupid</groupId> <artifactId>artifact-id</artifactId> <version>1.0.0-20090610.041042-5</version> </dependency> … Maven repository manager servers may have additional related features, like overriding … Read more

Is is possible to modify the maven console output to hide the [INFO] logging?

I don’t think there is a way to configure it as a logger but mvn -q hides the [INFO] lines and mvn -X shows the debug messages. Update in 2015: newer versions of maven have added a config file where this is finally possible although as a global per install configuration, check on your $mavenInstallationDir/conf/logging/simplelogger.properties … Read more

JAVA_HOME gets mangled by Maven

Thats the down side of external links in an accepted answer. Codehaus shut down and thus the solution is gone. For reference here’s the content behind the link – you basically only need to copy the <dependencies>…</dependencies> block to your antrun plugin… The maven-antrun-plugin runs ant with JAVA_HOME set to the jre subdirectory of the … Read more

How to wrap an Ant build with Maven?

You can use the maven-antrun-plugin to invoke the ant build. Then use the build-helper-maven-plugin to attach the jar produced by ant to the project. The attached artifact will be installed/deployed alongside the pom. If you specify your project with packaging pom, Maven will not conflict with the ant build. In the example below, the ant … Read more

How to download jars from Maven Central without writing any pom.xml [duplicate]

If you want to download maven dependencies into your lib directory use the dependency plugin with the copy-dependencies function. mvn -DoutputDirectory=./lib -DincludeArtifactIds=commons-logging,commons-io dependency:copy-dependencies Without the -DincludeArtifactIds part you’ll download every dependency. If you want to download a an artifact without having a specific project *see below** : mvn -DgroupId=commons-io -DartifactId=commons-io -Dversion=1.4 dependency:get Resources : maven.apache.org … Read more

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