UPDATE: See followup question
I have a Java library whose build process is entirely written in Ant. The project\'s sandbox (the source directory, in which
If you are building your artifacts outside of Maven you need to reference them in your .pom file
At first, set the packaging
of your project to pom
so Maven will not attempt to compile anything.
Then use the build-helper-maven-plugin
to attach your artifact files to the project. Here is an example:
org.codehaus.mojo
build-helper-maven-plugin
1.8
attach-artifacts
package
attach-artifact
build/xbnjava-0.1.1/download/mylibrary-0.1.1.jar
jar
build/xbnjava-0.1.1/download/mylibrary-0.1.1-javadoc.jar
jar
javadoc
build/xbnjava-0.1.1/download/mylibrary-0.1.1-sources.jar
jar
sources
Finally, add the distributionManagement
section to your .pom file as specified here.
You can refer to my own Maven project setup at github which was created to upload manually built .jar files on Maven central.