Maven “versions” plugin – how to exclude alpha/beta versions from response?

You can configure the versions plugin like this: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>versions-maven-plugin</artifactId> <version>2.1</version> <configuration> <rulesUri>someUrl</rulesUri> </configuration> </plugin> someUrl can also be a file URL. The syntax of the rules file is given in http://www.mojohaus.org/versions-maven-plugin/version-rules.html, it may contain something like this: <ruleset comparisonMethod=”maven” xmlns=”http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0″ xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=”http://mojo.codehaus.org/versions-maven-plugin/rule/2.0.0 http://mojo.codehaus.org/versions-maven-plugin/xsd/rule-2.0.0.xsd”> <ignoreVersions> <ignoreVersion type=”regex”>.*-beta.</ignoreVersion> <ignoreVersion type=”regex”>.*_ALPHA</ignoreVersion> </ignoreVersions> </ruleset>

How do I create a new packaging type for Maven?

To do as you described, create a Maven project with packaging jar (as stated here, as there won’t be mojo definitions). In the src/main/resources/META-INF/plexus sub-folder create a components.xml with the following contents (assuming you want the packaging type to be “my-custom-type”, change it to “foobar” if you wish). <component-set> <components> <component> <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role> <role-hint>my-custom-type</role-hint> <implementation> org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping … Read more

Maven archetype plugin doesn’t let .resources in archetype-resources through

The bug seems to be still present in the maven-archetype-plugin v3.0.1 . For those who do not want to downgrade the maven-resource-plugin. I managed to establish a more or less ugly workaround. First you rename the archetype-resources/.gitignore to __gitignore__ then inside the archetype-metadata.xml add <requiredProperties> <requiredProperty key=”gitignore”> <defaultValue>.gitignore</defaultValue> </requiredProperty> </requiredProperties> <fileSets> <fileSet> <directory></directory> <includes> <include>__gitignore__</include> … 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

Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved

Your debug output indicates that Clean is the first thing that it’s trying to run, so I’m guessing it’s failing to download any plugins from central. First off, see if you can download the plugin jar directly in a web browser: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.jar If that works then your web browser has connectivity to central but maven … Read more

How to understand Maven dependency tree

It’s a dependency tree. The things below a listing are dependencies of their parent. [INFO] +- org.springframework:spring-core:jar:4.0.2.RELEASE:compile [INFO] | \- commons-logging:commons-logging:jar:1.1.3:compile Spring-core depends on commons-logging. [INFO] +- org.glassfish.jersey.core:jersey-server:jar:2.6:compile [INFO] | +- org.glassfish.jersey.core:jersey-common:jar:2.6:compile [INFO] | | +- (javax.ws.rs:javax.ws.rs-api:jar:2.0:compile – omitted for duplicate) [INFO] | | +- (javax.annotation:javax.annotation-api:jar:1.2:compile – omitted for duplicate) Jersey-server depends on jersey-common. Jersey-common … Read more

How to support multiple Scala versions in a library

Most of this is well supported in sbt within a single source tree Version specific source directories are usually not need. Scala programs tends to be source compatible – so often in fact that crossbuilding (http://www.scala-sbt.org/release/docs/Detailed-Topics/Cross-Build) has first class support in sbt. If you really need version specific code, you can add extra source folders. … Read more

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