0

I'm currently trying to deploy a third party jar and 2 dlls to a private artifactory.

I don't have the sources for any of these artifacts. I could install these artifacts manually trough mvn install:install-file but I would have to manually do that every time the jar or dlls are updated.

I was trying to achieve a solution that allowed me to deploy with mvn deploy.

I was thinking about creating a maven project with these 3 artifacts or a parent maven project with 3 child project as dependency. What is the best way to create a maven project in this case where I have no source to compile and put in a jar file?

Federico Nafria
  • 1,397
  • 14
  • 39
  • I've solved this using what is suggested in http://stackoverflow.com/questions/17430382/how-to-publish-a-3rd-party-files-to-remote-maven-repo-using-an-existing-pom-xml – Federico Nafria Mar 24 '14 at 02:14

1 Answers1

0

If you have the case where you three files belong to the same project which means jar file needs the dll's you should deploy them as a main artifact (jar) and supplemental artifacts (classifier) for the dll's which can be achieved by something like this:

mvn deploy:deploy-file \
  -DgroupId=com.soebes.test \
  -DartifactId=t1 \
  -Dversion=1.0.1 \
  -Dpackaging=jar \
  -Dfile=t1.jar \
  -Dfiles=t1.xml,t1.pdf \
  -Dclassifiers=xml,pdf \
  -Dtypes=xml,pdf \
  -Durl=http://localhost:8081/nexus/content/repositories/releases \
  -DrepositoryId=releases

Where file= is the main artiact and files=... the list of artifacts. The classifier is given for every artifact in the list given via files=.... The repositoryId is needed if you have authentication for your repository manager.

khmarbaise
  • 92,914
  • 28
  • 189
  • 235
  • I've already done that, but is what I'm trying to avoid, so next time any of these artifacts is updated I can deploy them just as any other maven project with a pom.xml file with a `mvn deploy`. – Federico Nafria Mar 23 '14 at 20:00