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
  • name-version-src.zip
    • Like the jar file but with ending -src.zip
  • 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:

    SOME_DIR
      + libraries
        + org
          + springframework
            - spring-2.5.jar
            - spring-2.5-src.zip

Alternatively you can do it using a flat hierarchy:

    SOME_DIR
      + libraries
        + org.springframework
          - spring-2.5.jar
          - spring-2.5-src.zip

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.