Repository helper plugin

The Repository helper plugin can be used to install (local repository) or deploy (install plus deploying on a remote repository) multiple jars and their source zips in one pass. It is also possible to provide a pom.xml file, instead of using a generated one (with no additional dependencies). Just name the files as follows:

  • name-version.jar
    • The name will be the artifactId.
    • The version must begin with a digit.
    • The name and the version must be separated with a dash.
    • The file name must end with .jar
    • Like the jar file but with ending
  • name-version-pom.xml
    • Like the jar file but with ending -pom.xml

Create a directory (i.e. libraries), create sub-directories and put your files in them. The subdirectory path where the files are will be taken as groupId (slashes will be replaced with dots - leading and trailing dots will be truncated).

Here is a view of a file explorer:

      + libraries
        + org
          + springframework
            - spring-2.5.jar

Alternatively you can do it using a flat hierarchy:

      + libraries
        + org.springframework
          - spring-2.5.jar

In the repository these artifacts will be available with groupId=org.springframework, artifactId=spring and version=2.0. One will have no classifier (default) and the other artifact will have classifier=sources. FYI, the maven-eclipse-plugin tries to download artifacts with classifier=sources for each dependency of an Eclipse project.

For detailed usage see the plugin info page.