-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
Jenkins version: 1.572
OS: debian wheezy x64
maven-plugin: 2.5
Steps to reproduce:-
1) Run a job which uses the maven plugin and has a "Deploy artifacts to maven repository" Post-build step
2) while the job is running use the jenkins-cli update-job command to change the job configuration (the configuration doesn't need to actually change. Calling update-job with the same config will also trigger the problem)
When Jenkins attempts to deploy the artifacts it will give the error:
Archiving artifacts [ERROR] No artifacts are recorded. Is this a Maven project?
What seems to be happening is that the api call causes the cache in the AbstractLazyLoadRunMap for the module to get reloaded from disk. Meaning that the build number check in MavenModuleSetBuild (line 486) actually looks at the last completed build, rather than the currently executing build and therefore returns false.