简体   繁体   中英

deploy war to nexus repository or not

This question was raised since our main war file is about 40 Mb size (and it's not a single war file in whole project). And all the rest jar files is about 20 Mb thus every release takes 3 times bigger space then if we will not deploy wars.

So maybe there is an option to not deploy whole war files but only resources so then deploy team could build it from Nexus? If I skip deploy for module where we build war file then deployment team cannot be able to build it without access to source code.

Is it common practice to deploy war files in company local repository?

There are two camps. One camp says: deploy (actually upload) every artifact to Nexus. This way the process for every artifact is the same and everybody knows where to find it. The other camp says: Use Nexus only as dependency repository. If your war-file is the end-product and it isn't a dependency for another project like an ear-file, then there's no reason to upload it to Nexus. In this case you could upload it to a share or to a scm-location and distribute it from there.

For every change - Push to nexus as snapshot !!

In the process of continuous integration development practice - having parallel development, it is never ending process to update the nexus with latest development changes irrespective of size.

Its the best practice to have the deploy goal run and the updated artifacts would be available
to teams working on that -- either deployment team, testing team, other development teams would start consuming the change...

In general I would suggest to just upload the war to Nexus and get your operations team to get it from Nexus for deployment. After Nexus is already server running for managing your binaries . Why would you split it up and use a different storage for your build outputs just because they are a war file vs being a jar or something else. That just makes things more complicated for no good reason.

<maven.deploy.skip>true</maven.deploy.skip>

set this properties maven pom file can fix this problem

The maven deploy plugin has a skip property: http://maven.apache.org/plugins/maven-deploy-plugin/deploy-mojo.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM