14

Over the last couple of months I have restructured (renamed) my Maven modules of my project. I discovered some unexpected behavior with respect to how Jenkins treats outdated Maven modules (i.e., they no longer exist in pom.xml files) produced by the build job.

This is depicted in the following screenshot:

Picture of outdated modules

As can be seen several modules are skipped (= grey bubble). Sadly, however from the UI, I have no chance to delete them by any means. Deleting the workspace does not help either. Actually, the problem exists in other build jobs as well in case a renaming of one ore more modules was conducted in the pom structures.

The next screenshot shows a German version of the menu options.

Menu entries in the project job view

Despite I used the latest Jenkins version (2.23), there seems to be no possibility to clean up the ui / modules from this project.

Does anybody have an idea how I can achieve removing this obsolete artifacts without a fresh setup of the whole project or even the complete build server installation.

EDIT-1:

There is an offical issue for that at the Jenkins Project, which seems to be unresolved up to day.

EDIT-2:

I've tried the work arround mentioned in the issue using http://hudson-installation/job/the-project/deleteAllDisabledModules in order to obtain the delete view. However, this page does not exist.

5

5 Answers 5

3
+50

I think this answer from Amedee Van Gasse provides at least a workaround to your problem.

He suggests removing the modules marked as "(übersprungen)" by hand using a Groovy script. His solution also implies why the use of http://hudson-installation/job/the-project/doDeleteAllDisabledModules won't work: The property disabled isn't properly set for the respective modules.

2
  • 1
    This is a workaround, which works on our server to remove the outdated. However, I am looking for an UI driven approach, which can be conducted by other project owners themselves without requiring administrative rights on the Jenkins server.
    – rzo1
    Oct 12, 2016 at 6:37
  • 1
    There is a little glitch with this workaround: Archived builds will loose their modules of the build relevant to that build time. Sadly, this seems to be unrecoverable after applying the workaround. Might be tragic for others, for me it is OK atm...
    – rzo1
    Oct 12, 2016 at 6:47
1

Goto:

http://jenkins-ci/job/<projectname>/<package>$<modulename>/

and click delete.

look at:

http://jenkins-ci/job/<projectname>/modules
0

It looks like you are in the menu of a build. You first have to go back to the project "Zurück zum Projekt". Afterward you can delete the project (Assuming you have the necessary permissions).

3
  • So in the view shown above, you just hover over the module and in the appearing menu "Delete module"
    – DrHopfen
    Sep 30, 2016 at 13:12
  • I've tried this advice ("Module"), but this view only shows "active" modules (blue bubbles), which I can delete there. For inactive ones this is not possible to hover over the bubbles as displayed in the screenshot.
    – rzo1
    Sep 30, 2016 at 13:42
  • I just found: issues.jenkins-ci.org/browse/JENKINS-4561 which confirms this as a bug.
    – rzo1
    Sep 30, 2016 at 13:45
0

Some things you could try as a last resort:

  1. Delete the job, and then recreate it.
  2. Reinstall Jenkins.
1
  • 1
    Thanks, but recreating the job is not a solution as we have a lot of archived stuff and corresponding log outputs, which needs to be preserved. From other projects I know, that recreating will solve it until the next restructuring appears. Sadly, reinstalling isn't a real option too as this is not the only Job on the server...
    – rzo1
    Oct 6, 2016 at 18:48
-3

Create a new FreeStyle job and use the same command as you expect developers to use:

mvn clean install

This behaviour is an outstanding bug in the Jenkins Maven Plugin https://issues.jenkins-ci.org/browse/JENKINS-4561

For me it raises a deeper question of why would you ever want to use a plugin for this functionality. It is a DevOps principle to ensure that the developers use and understand the same techniques as are used to build for release.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.