i have to zip the property files( property file are not part of war they are maintained externally in folder) .These property file contains database information for all env. I want to zip then and upload in nexus repository.please let me know how we can do it in maven
I would create a Maven JAR project and make the properties files be the sole source resources in it (src/main/resources). That would create a "ZIP" file, since JAR is simply ZIP plus metadata in the META-INF directory.
You can then use Maven to build a product and push that product to Nexus.
How you get it from Nexus to the target server is something I'm less clear about. My own strategy for stuff like that is usually to build an OS install package (RPM, deb, msi or whatever) and hand it off to whoever's deploying the app. Which might be a person or a software provisioning agent such as Puppet or Ansible. You could just manually install the ZIP also, but I like to be kind to my operations team,
Alternatively you could let Jenkins or a similar build control/continuous integration system do the job. Depends on how your shop is organized.
An IDE is no substitute for an Intelligent Developer.
Die Fledermaus does not fear such a tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database