简体   繁体   中英

Maven/Jenkins automatic download/copy

I'm in a team to develop plugins in java. We got Maven, a repository and Jenkins, And I got myself a debian-server to test my applications. When I push my commits, this happens:

Push in repository, upload and build in Jenkins. Users download these .jar files and upload these to their server

What I want to be happen: There are two ways, First: After building with Jenkins: Download these files, Second: When pressing "maven build", maven builds my applications and copy these to my server

How can I do this?

(Sorry for my bad English: I'm German)

If I understand you correctly, following scenario should help.

create two jobs

  • first job builds your artifact and archives it: user will be able to download it, job is triggered by source modification
  • second job is only executed manually (and requires two plugins, listed below), copies artifacts from first job and then uploads them to the server

Following plugins you would need to install:

You want when you push your SCM repository, to get Jenkins build into your local projet (update your jars), then manipulate send your final build to your server. Is that you want ?

If yes, I think that plugin would be interesting :

http://evgeny-goldin.com/wiki/Jenkins-maven-plugin#Supported_Plugins

you can manage jenkins goals from your pom.xml but I am not sure if you can get jenkins build.

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