Building Commons Inject

To build Commons Inject, you have to perform the following steps:

  • Checkout the sources
  • Build the jar file
  • Install, or deploy the jar file (Optional)

Checkout the sources

svn co commons-inject

The above command creates a subdirectory commons-inject with the project sources.

Build the jar file

mvn clean package

The above command assumes, that you have Apache Maven installed and in your path. The process to download and install Maven is beyond this documents scope. You can read about that elsewhere.

Install, or deploy the jar file.

To install the jar file into your local Maven repository after building it, run this command:

mvn install:install-file -DgroupId=org.apache.commons.inject -DartifactId=commons-inject
    -Dversion=<SOME_VERSION_YOU_CHOOSE> -Dfile=target/commons-inject-${project.version}.jar

Alternatively, you may upload the jar file into a shared Maven repository (like Nexus, or Artifactory) like this:

mvn deploy:deploy-file -DgroupId=org.apache.commons.inject -DartifactId=commons-inject
    -Dversion=<SOME_VERSION_YOU_CHOOSE> -Dfile=target/commons-inject-${project.version}.jar
    -DpomFile=pom.xml -DrepositoryUrl=<YOUR_REPO_URL> -DrepositoryId=<YOUR_REPO_ID>

Note the use of the repositoryId parameter: It is required, if your upload requires a user name and password. The actual values are read from a server entry in your Maven settings. Assuming that your repository Id is myRepoId, a suitable server entry could be

<settings xmlns=""