To create a public maven repository, I create a local folder (e.g., $HOME/maven-repo
) that is kept synched to a public folder at my web server. To install a jar at such repository, I do
mvn install:install-file -DgroupId=[groupId] -DartifactId=[artifactId] -Dversion=[version] -Dpackaging=jar -Dfile=[pathToJar] -DlocalRepositoryPath=$HOME/maven-repo -DcreateChecksum=true
and then I synchronize the $HOME/maven-repo with the webserver.
However, this creates file maven-metadata-local.xml (at $HOME/maven-repo/[groupId]/[artifactId]
). From what I understand, this is correct only if the repository is local. If it's online it should be just maven-metadata.xml. Of course I could just rename the files, but I guess there's a more correct way of doing this.
The question is: how do I create such public maven repository properly, i.e., with the files just as maven-metadata.xml with no "local" in the filenames, without resorting to rename the files by hand?