Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-1898

ant build and pom.xml result in invalid URL's for tasks-plugin

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: tasks-plugin
    • Labels:
      None
    • Environment:
      Platform: All, OS: All
    • Similar Issues:

      Description

      I have a project that is build using ant. If I have for example the following
      pom.xml file in the directory (this project is part of a larger Maven project)
      the tasks plugin will generate invalid URL's.

      After the build using ant if I go to Open Task I will end up with the following
      URL to go to tasks: "foo:%20Testing%20something" which will not work.

      I think the correct solution is for the tasks-plugin to be aware what build
      system is used, if not Maven is used it should ignore the pom.xml file instead
      of always looking for it and using the name of the module.

      ----- POM.XML
      <project>
      <modelVersion>4.0.0</modelVersion>
      <packaging>jar</packaging>
      <artifactId>FOO</artifactId>
      <name>FOO: Testing something</name>
      <build />
      </project>

        Attachments

          Activity

          Hide
          drulli Ulli Hafner added a comment -

          I'm not sure whether this information is public but I will have a look.

          Show
          drulli Ulli Hafner added a comment - I'm not sure whether this information is public but I will have a look.
          Hide
          drulli Ulli Hafner added a comment -

          We should test for maven and ant. Only if the build is of the correct type we
          should read the corresponding files.

          /**

          • Returns whether the current build uses maven.
            *
          • @param build
          • the current build
          • @return <code>true</code> if the current build uses maven,
          • <code>false</code> otherwise
            */
            private boolean isMavenBuild(final AbstractBuild<?, ?> build) {
            if (build.getProject() instanceof Project) {
            Project<?, ?> project = (Project<?, ?>)build.getProject();
            for (Builder builder : project.getBuilders())
            Unknown macro: { if (builder instanceof Maven) { return true; } }

            }
            return false;
            }

          Show
          drulli Ulli Hafner added a comment - We should test for maven and ant. Only if the build is of the correct type we should read the corresponding files. /** Returns whether the current build uses maven. * @param build the current build @return <code>true</code> if the current build uses maven, <code>false</code> otherwise */ private boolean isMavenBuild(final AbstractBuild<?, ?> build) { if (build.getProject() instanceof Project) { Project<?, ?> project = (Project<?, ?>)build.getProject(); for (Builder builder : project.getBuilders()) Unknown macro: { if (builder instanceof Maven) { return true; } } } return false; }
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in hudson
          User: : drulli
          Path:
          trunk/hudson/plugins/checkstyle/src/main/java/hudson/plugins/checkstyle/CheckStylePublisher.java
          trunk/hudson/plugins/checkstyle/src/main/java/hudson/plugins/checkstyle/CheckStyleReporter.java
          trunk/hudson/plugins/checkstyle/src/main/java/hudson/plugins/checkstyle/util/FilesParser.java
          trunk/hudson/plugins/checkstyle/src/main/java/hudson/plugins/checkstyle/util/HealthAwarePublisher.java
          trunk/hudson/plugins/checkstyle/src/main/java/hudson/plugins/checkstyle/util/ModuleDetector.java
          trunk/hudson/plugins/checkstyle/src/test/java/hudson/plugins/checkstyle/util/ModuleDetectorTest.java
          trunk/hudson/plugins/findbugs/src/main/java/hudson/plugins/findbugs/FindBugsPublisher.java
          trunk/hudson/plugins/findbugs/src/main/java/hudson/plugins/findbugs/FindBugsReporter.java
          trunk/hudson/plugins/findbugs/src/main/java/hudson/plugins/findbugs/util/FilesParser.java
          trunk/hudson/plugins/findbugs/src/main/java/hudson/plugins/findbugs/util/HealthAwarePublisher.java
          trunk/hudson/plugins/findbugs/src/main/java/hudson/plugins/findbugs/util/ModuleDetector.java
          trunk/hudson/plugins/findbugs/src/test/java/hudson/plugins/findbugs/util/ModuleDetectorTest.java
          trunk/hudson/plugins/pmd/src/main/java/hudson/plugins/pmd/PmdPublisher.java
          trunk/hudson/plugins/pmd/src/main/java/hudson/plugins/pmd/PmdReporter.java
          trunk/hudson/plugins/pmd/src/main/java/hudson/plugins/pmd/util/FilesParser.java
          trunk/hudson/plugins/pmd/src/main/java/hudson/plugins/pmd/util/HealthAwarePublisher.java
          trunk/hudson/plugins/pmd/src/main/java/hudson/plugins/pmd/util/ModuleDetector.java
          trunk/hudson/plugins/pmd/src/test/java/hudson/plugins/pmd/util/ModuleDetectorTest.java
          trunk/hudson/plugins/tasks/src/main/java/hudson/plugins/tasks/util/FilesParser.java
          trunk/hudson/plugins/tasks/src/main/java/hudson/plugins/tasks/util/HealthAwarePublisher.java
          trunk/hudson/plugins/tasks/src/main/java/hudson/plugins/tasks/util/ModuleDetector.java
          trunk/hudson/plugins/tasks/src/test/java/hudson/plugins/tasks/util/ModuleDetectorTest.java
          trunk/hudson/plugins/warnings/src/main/java/hudson/plugins/warnings/util/FilesParser.java
          trunk/hudson/plugins/warnings/src/main/java/hudson/plugins/warnings/util/HealthAwarePublisher.java
          trunk/hudson/plugins/warnings/src/main/java/hudson/plugins/warnings/util/ModuleDetector.java
          trunk/hudson/plugins/warnings/src/test/java/hudson/plugins/warnings/util/ModuleDetectorTest.java
          http://fisheye4.cenqua.com/changelog/hudson/?cs=10973
          Log:
          [FIXED JENKINS-1898] Parse pom.xml only for maven builds and build.xml only for ant builds. For all other builds the module is guessed by the path.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : drulli Path: trunk/hudson/plugins/checkstyle/src/main/java/hudson/plugins/checkstyle/CheckStylePublisher.java trunk/hudson/plugins/checkstyle/src/main/java/hudson/plugins/checkstyle/CheckStyleReporter.java trunk/hudson/plugins/checkstyle/src/main/java/hudson/plugins/checkstyle/util/FilesParser.java trunk/hudson/plugins/checkstyle/src/main/java/hudson/plugins/checkstyle/util/HealthAwarePublisher.java trunk/hudson/plugins/checkstyle/src/main/java/hudson/plugins/checkstyle/util/ModuleDetector.java trunk/hudson/plugins/checkstyle/src/test/java/hudson/plugins/checkstyle/util/ModuleDetectorTest.java trunk/hudson/plugins/findbugs/src/main/java/hudson/plugins/findbugs/FindBugsPublisher.java trunk/hudson/plugins/findbugs/src/main/java/hudson/plugins/findbugs/FindBugsReporter.java trunk/hudson/plugins/findbugs/src/main/java/hudson/plugins/findbugs/util/FilesParser.java trunk/hudson/plugins/findbugs/src/main/java/hudson/plugins/findbugs/util/HealthAwarePublisher.java trunk/hudson/plugins/findbugs/src/main/java/hudson/plugins/findbugs/util/ModuleDetector.java trunk/hudson/plugins/findbugs/src/test/java/hudson/plugins/findbugs/util/ModuleDetectorTest.java trunk/hudson/plugins/pmd/src/main/java/hudson/plugins/pmd/PmdPublisher.java trunk/hudson/plugins/pmd/src/main/java/hudson/plugins/pmd/PmdReporter.java trunk/hudson/plugins/pmd/src/main/java/hudson/plugins/pmd/util/FilesParser.java trunk/hudson/plugins/pmd/src/main/java/hudson/plugins/pmd/util/HealthAwarePublisher.java trunk/hudson/plugins/pmd/src/main/java/hudson/plugins/pmd/util/ModuleDetector.java trunk/hudson/plugins/pmd/src/test/java/hudson/plugins/pmd/util/ModuleDetectorTest.java trunk/hudson/plugins/tasks/src/main/java/hudson/plugins/tasks/util/FilesParser.java trunk/hudson/plugins/tasks/src/main/java/hudson/plugins/tasks/util/HealthAwarePublisher.java trunk/hudson/plugins/tasks/src/main/java/hudson/plugins/tasks/util/ModuleDetector.java trunk/hudson/plugins/tasks/src/test/java/hudson/plugins/tasks/util/ModuleDetectorTest.java trunk/hudson/plugins/warnings/src/main/java/hudson/plugins/warnings/util/FilesParser.java trunk/hudson/plugins/warnings/src/main/java/hudson/plugins/warnings/util/HealthAwarePublisher.java trunk/hudson/plugins/warnings/src/main/java/hudson/plugins/warnings/util/ModuleDetector.java trunk/hudson/plugins/warnings/src/test/java/hudson/plugins/warnings/util/ModuleDetectorTest.java http://fisheye4.cenqua.com/changelog/hudson/?cs=10973 Log: [FIXED JENKINS-1898] Parse pom.xml only for maven builds and build.xml only for ant builds. For all other builds the module is guessed by the path.

            People

            • Assignee:
              drulli Ulli Hafner
              Reporter:
              kooper kooper
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: