First: add 'Java Argument Validation' as dependency to your project.
<dependency> <groupId>net.sourceforge.argval</groupId> <artifactId>argval</artifactId> <version>###</version> </dependency>
Next: use one of the following scenarios, so Maven 2 can find the artifact.
At this moment 'Java Argument Validation' is not available through one of the central Maven 2 repositories (like repo1.maven.org or http://download.java.net/maven/2/). Therefore one of the above scenarios is required to make the 'Java Argument Validation' available for the Maven 2 build process.
TIP: Use this scenario when you want all current and future releases directly available, but there is no internal repository available.
The 'Java Argument Validation' artifact is located in the following Maven 2 repository http://java-arg-val.sourceforge.net/maven2/.
The xml below shows the repository definition for your projects pom.xml. This is only needed if you don't have a central Maven (proxy) repository available, like Archiva or Artifactory.
<repository> <id>m2_repo_java_arg_val</id> <url>http://java-arg-val.sourceforge.net/maven2/</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </repository>
TIP: Use this scenario when you want all current and future releases directly available, but there is no internal repository available.
todo
TIP: Use this scenario when you can't or don't want to make external network connections, or want to control which (downloaded) artifacts are available.
Download the argval-###.jar direct from the Maven 2 repository at http://java-arg-val.sourceforge.net/maven2/. Or download the full distribution and unpack the archive.
Then use the Maven goal install to install the jar into the local repository (~/.m2/repository):
mvn install:install-file -DgroupId=net.sourceforge.argval -DartifactId=argval \ -Dversion=0.2 -Dpackaging=jar -Dfile=$pathname/java_argument_validation_v0.2/argval-0.2.jar
TIP: Use this scenario when you can't or don't want to make external network connections, or want to control which (downloaded) artifacts are available. And there is an internal repository available.
Download the argval-###.jar direct from the Maven 2 repository at http://java-arg-val.sourceforge.net/maven2/. Or download the full distribution and unpack the archive.
Then use the Maven goal deploy to deploy the jar into the internal repository:
mvn install:install-file -DgroupId=net.sourceforge.argval -DartifactId=argval \ -Dversion=0.2 -Dpackaging=jar -Dfile=$pathname/java_argument_validation_v0.2/argval-0.2.jar \ -Durl=http://$hostname:8010/archiva/repository/internal -DrepositoryId=internal
TIP: Use this scenario when you want all current and future releases directly available, and there is an Archiva installation available.
id : m2_repo_java_arg_val name : Java Argument Validation Maven 2 Repository url : http://java-arg-val.sourceforge.net/maven2/ type : Maven 2.x Repository
Network Proxy : *1 Managed Repository : internal Remote Repository : m2_repo_java_arg_val Policies: releases: once snapshots: daily checksum: ignore *2
TIP: Use this scenario when you want all current and future releases directly available, and there is an Artifactory installation available.
To be done.