I am creating NARs on multiple platforms (Mac and Windows). The build is complex and can not be done through the Maven NAR plugin, but I am creating Ner files and using the mvn
command line tool for my deployment.
The typical way to deploy is in one shot, for example
mvn deployment: deployment-file \ dfile = foobar.jar \ -Dpackaging = jar \ -Dfiles = foobar-x86_64- Makosaks-GCC-Sajaknar, Foboars-86_64 X-Windows-Msvisi-Sajaknar \ -dislasifiers = x86_64- Macosaks-GCC-sharing, x86_64- Windows-Msvisi-share \ -diteps = M, M \ -diguaiaidi = com .example \ -DartifactId = foobar \ -Devision = 1.0.0 -SNAPSHOT \ -Durl = $ URL \ -DreppositoryId = nexus
However, because Builds Different Running Oks, publishing phase can not be in one shot. Ideally, I want to be able to "engage" the attachment of primary artifacts in form of Build Vince. Ie.,
Run it once:
mvn deploy: deploy-file \ -difail = foobar.jar \ -Dpackaging = jar \ -DgroupId = com.example \ -DartifactId = foobar \ -Dversion = 1.0.0 -SNAPSHOT \ -Durl = $ URL \ -DroppositoryId = nexus
Mac Build Slaves:
Mvian deployment: deploy-file \ -Dfiles = foobar-x86_64-MacOSX-gcc-shared.nar \ -Dclassifiers = x86_64-MacOSX-gcc- share \ -Dtypes = nar \ -DgroupId = com.example \ -DartifactId = Foobar <-Dversion = 1.0.0-SNAPSHOT \ -Durl = $ URL \ -DreppositoryId = nexus
Then on Windows Build Slave:
Deploy mvn : Deploy File \ -Dfiles = foobar-x86_64-Windows-MSVC-shared.na r \ -Dclassifiers = x86_64- Windows- MSVC- share \ -Dtypes = nar \ -DgroupId = com.example \ -DartifactId = foobar \ - Dversion = 1.0.0-SNAPSHOT \ -Durl = $ URL \ -DreppositoryId = nexus < / Code>
The first order works fine, of course. But two build slave commands are unsuccessful
parameter 'file' for the target organization. Org.apache.maven.plugins: maven-deploy-plugin: 2.7: Deploy file is missing or invalid
Because it thinks that it requires primary artifacts.
How can I specify that I am not making a new one for publishing, adding one?
Because the builds are running on different boxes, the publishing phase may not be in one shot
If you are using a CI server like Jenkins, you can publish artwork from each slave and then access them on the master node via the downstream job .
Similarly, we resolve this issue in this project: we have all the art works together, then deploy them all at once. First of all, the job-a multi-configuration project-creates the code using the appropriate slaves, which collects relevant artifacts (which transfer them to the master node's file system). The task then copies the collected artifacts from each configuration to the same directory for deployment in one collection.
If it helps, then it is part of the ImageJ-Launcher-Deployment
Shell script responsible for copying NAR artifacts in one place:
MasterDir = Workspace / Label / Master / Target & amp; Amp; Axes = configuration / axis-label / * / build / $ build number / collection / target & amp; Amp; : Master and amp; all axes; Copy the amp NO / ** / * files. For paths in $ axes / nar / * / bin / * / * file = $ {path # $ axes dice} & amp; Amp; If test -f $ is MasterDir / $ file, then #include everything except Linux in master case "$ path" * / master / * Linux *) ;; * / Master / *) ;; Esac cmp $ path $ masterDir / $ file & amp; Amp; Continue printf 'artifacts disagree: \ n% s \ n% s \ n \ n' $ path $ masterDir / $ file errors = $ ((errors $ 1 +)) other target = $ masterDir / $ file & amp; Amp; MKDIR-P $ {target% / *} & amp; Amp; CP $ path $ target FI
If -Dfiles
supports a list of files in different directories, you may not even need to copy the artwork - List of files in the loop, and
mvn deployment: deployment-file
orientation that you provided above.
. ImageJ-Launcher Jenkins Configuration.
Comments
Post a Comment