My Client wants to be able to build our project from source but does not want to connect to the internet to get any dependencies for the build. Note this will include plugin dependencies.
My proposal is that we provide the client with an archive containing all the dependencies in the correct Maven repo file structure, including checksums and meta information. They can then use this as an internal maven repo.
I have configured the maven-assembly-plugin to create such an archive, however it doesn't include all the build/plugin dependencies that their Maven will require to perform the build.
Does anyone know of a way to include build time d开发者_JAVA技巧ependencies in the archive, or can suggest another way to grab these dependencies and wrap them up in the correct structure.
Many thanks, Pat
On a clean repository, you can run mvn dependency:go-offline
. This will download all the plugins
and dependencies
relevant to the project. You can verify that this is good by doing an offline build (mvn -o clean install
).
Once this works fine, you can create an archive of the repository and the sources and pass it on.
Have you taken a look into the maven-dependency-plugin and furthermore i would suggest to do a complete compile and package and after that you can package the local repository from that user ($HOME/.m2/repository). Than you have everything which is needed to do a full compile etc.
Try mvn dependency:copy-dependencies
. This will copy all the dependencies to a directory target\dependency
.
However, I'm not certain whether this includes the dependencies necessary to build, as well and those necessary to install the compiled output.
精彩评论