Uploaded image for project: 'Dev - Nexus'
  1. Dev - Nexus
  2. NEXUS-10429

Task produces WARN if "incorrect" repository is selected

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1.0
    • Fix Version/s: 3.2.1
    • Component/s: Scheduled Tasks
    • Labels:
      None
    • Environment:
      Chrome, FF MacOSX
    • Story Points:
      1
    • Sprint:
      Sprint 86

      Description

      Running "Remove snapshots from Maven repository" task with a proxy or hosted release repository selected fires the below WARN and errors the task. Both proxy and hosted release repositories are available in the dropdown of repositories (and for maven configured by default).

      I do not believe these failing repository types should be in the dropdown if they just cause errors. This is borderline bug/improvement but I made a bug because of the error.

      016-07-01 14:40:55,715-0400 WARN [quartz-2-thread-4] *SYSTEM org.sonatype.nexus.quartz.internal.task.QuartzTaskJob - Task 6b9d9397-3ed8-495d-923b-7c0646340fb7 : 'test2' [repository.maven.remove-snapshots] execution failure
      java.lang.IllegalStateException: null
      at com.google.common.base.Preconditions.checkState(Preconditions.java:158) [com.google.guava:18.0.0]
      at org.sonatype.nexus.repository.RepositoryTaskSupport.findRepositories(RepositoryTaskSupport.java:83) [na:na]
      at org.sonatype.nexus.repository.RepositoryTaskSupport.execute(RepositoryTaskSupport.java:53) [na:na]
      at org.sonatype.nexus.scheduling.TaskSupport.call(TaskSupport.java:89) [org.sonatype.nexus.scheduling:3.1.0.SNAPSHOT]
      at org.sonatype.nexus.quartz.internal.task.QuartzTaskJob.doExecute(QuartzTaskJob.java:144) [org.sonatype.nexus.quartz:3.1.0.SNAPSHOT]
      at org.sonatype.nexus.quartz.internal.task.QuartzTaskJob.execute(QuartzTaskJob.java:105) [org.sonatype.nexus.quartz:3.1.0.SNAPSHOT]
      at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [org.quartz-scheduler.quartz:2.2.2]
      at org.sonatype.nexus.thread.internal.MDCAwareRunnable.run(MDCAwareRunnable.java:40) [org.sonatype.nexus.thread:3.1.0.SNAPSHOT]
      at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120) [org.apache.shiro.core:1.2.4]
      at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108) [org.apache.shiro.core:1.2.4]
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_40]
      at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_40]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_40]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_40]
      at java.lang.Thread.run(Thread.java:745) [na:1.8.0_40]

      Specifically seems to be happening because Repositories with a policy of RELEASE can be selected, even though they can't possibly contain SNAPSHOT jars. Note that this is stored in Repository attributes, which presently aren't exposed as a criteria to choose from in RepositoryComboBox definition.

        Issue Links

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              fmilens Frederick Milens
              Reporter:
              jtom Joe Tom
              Last Updated By:
              Dulani Wallace
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response:

                Agile