简体   繁体   中英

maven - create archive of generated jar files

I am currently building out some projects using an aggregate pom. It calls out some parent poms that build out the artifacts.

The artifacts build out ok.

What I would like is to capture the generated jar files and place them into a directory as they are created build after build, version after version.

Possible?

Thank you!

Without knowing more about why you want to achieve this, it's hard to recommend a solution.

A mvn clean install will install all the artifacts into your local repository, but assuming you want a more custom directory layout - you could use the maven-antrun-plugin and use ant to arrange the relevant files.

If you're happy with the default repository layout, you could also configure the repository settings for the project to deploy your plugin into a specific filesystem location (which would be dedicated to this particular project).

Alternatively, you could use the wagon plugin to do the deployment: http://www.java-tutorial.ch/maven/deploying-in-file-system-using-maven

im using a .bat file that runs

cd dir
mvn clean install
copy dir\*.jar %LIFERAY_TOMCAT_HOME%"\..\deploy

what do you think? would that suit your needs?

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