Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: android-lint-plugin
    • Labels:
      None
    • Environment:
      Android Lint Plugin version 1.0.1
      Static Analysis Utilities 1.43
      Jenkins version 1.477
    • Similar Issues:

      Description

      The plugin does nothing. It doesn't contribute to the logged output, it doesn't add the link to the menu.
      The only mention in the Jenkins log is from the install:
      WARNING: Adding dependent install of analysis-core for plugin android-lint
      INFO: Attempting to dynamic load /var/lib/jenkins/plugins/android-lint.jpi
      INFO: Plugin android-lint dynamically installed

        Attachments

          Activity

          Hide
          orrc Christopher Orr added a comment -

          If this is with a Maven job type, you're right – I probably shouldn't have allowed the plugin to be available for Maven jobs.

          You can enable the option in a build, but it won't work unless you execute some Maven goal like "android-lint" or "check" – but since I guess these goals don't really exist for Android builds, it's not useful.

          I'll remove this from the plugin for Maven jobs, unless somebody knows which goal(s) should trigger the plugin.

          Show
          orrc Christopher Orr added a comment - If this is with a Maven job type, you're right – I probably shouldn't have allowed the plugin to be available for Maven jobs. You can enable the option in a build, but it won't work unless you execute some Maven goal like "android-lint" or "check" – but since I guess these goals don't really exist for Android builds, it's not useful. I'll remove this from the plugin for Maven jobs, unless somebody knows which goal(s) should trigger the plugin.
          Hide
          willcode4beer Paul Davis added a comment - - edited

          Yes, it is a maven job. However, maven execution is completely separate from the execution of lint.

          I tried adding a pre/post build step where I run (via execute shell):
          ${ANDROID_HOME}/tools/lint --fullpath --showall -Wall --xml target/lint-results.xml .

          My assumption was the plugin would just look for the generated artifacts.

          Show
          willcode4beer Paul Davis added a comment - - edited Yes, it is a maven job. However, maven execution is completely separate from the execution of lint. I tried adding a pre/post build step where I run (via execute shell): ${ANDROID_HOME}/tools/lint --fullpath --showall -Wall --xml target/lint-results.xml . My assumption was the plugin would just look for the generated artifacts.
          Hide
          otw Stephan Linzner added a comment - - edited

          Any news on this? We are having the same problem running lint as a post build action on a jenkins maven 3 project. Files are created and Html, Xml output looks ok. But the plugin does not collect the lint report artifacts.

          Using the same lint post build action in a free-style software project works perfectly fine.

          The difference between the two is that in the maven 3 project the collection of reporting happens before the post build action. In the freestyle project it happens afterwards.

          So i guess as long as there is no goal that can be bound to a lifecycle phase this won't work right? Anyone has a workaround for this?

          Show
          otw Stephan Linzner added a comment - - edited Any news on this? We are having the same problem running lint as a post build action on a jenkins maven 3 project. Files are created and Html, Xml output looks ok. But the plugin does not collect the lint report artifacts. Using the same lint post build action in a free-style software project works perfectly fine. The difference between the two is that in the maven 3 project the collection of reporting happens before the post build action. In the freestyle project it happens afterwards. So i guess as long as there is no goal that can be bound to a lifecycle phase this won't work right? Anyone has a workaround for this?
          Hide
          orrc Christopher Orr added a comment -

          This option has been removed for Maven jobs, since Jenkins won't execute the plugin unless a certain goal is triggered.

          The upcoming plugin release will remove this.

          Show
          orrc Christopher Orr added a comment - This option has been removed for Maven jobs, since Jenkins won't execute the plugin unless a certain goal is triggered. The upcoming plugin release will remove this.
          Hide
          roxon David Müller added a comment -

          Please provide a fix for this, this plugin is too useful to keep away from maven users.

          A suitable maven phase would be the "verify" (See Maven Livecyles).
          If a goal is really needed, I would suggest "android:emma"

          Available goals from the android maven plugin are listed here:
          http://maven-android-plugin-m2site.googlecode.com/svn/plugin-info.html

          I would be glad to test new plugin versions.

          Show
          roxon David Müller added a comment - Please provide a fix for this, this plugin is too useful to keep away from maven users. A suitable maven phase would be the "verify" (See Maven Livecyles ). If a goal is really needed, I would suggest "android:emma" Available goals from the android maven plugin are listed here: http://maven-android-plugin-m2site.googlecode.com/svn/plugin-info.html I would be glad to test new plugin versions.
          Hide
          orrc Christopher Orr added a comment -

          According to Benoit B on the wiki page:

          the new Android Maven Plugin 3.5.1-SNAPSHOT supports lint with the goal android:lint

          So I can try adding that to the plugin...

          Show
          orrc Christopher Orr added a comment - According to Benoit B on the wiki page: the new Android Maven Plugin 3.5.1-SNAPSHOT supports lint with the goal android:lint So I can try adding that to the plugin...
          Hide
          orrc Christopher Orr added a comment -

          Android Maven Plugin 3.5.1 has been released with support for Lint via the "android:lint" goal.

          Here's a build of the Jenkins plugin which supports the "lint" goal, in case anybody wants to try it out...

          Show
          orrc Christopher Orr added a comment - Android Maven Plugin 3.5.1 has been released with support for Lint via the "android:lint" goal. Here's a build of the Jenkins plugin which supports the "lint" goal, in case anybody wants to try it out...
          Hide
          hakan Hakan Tandogan added a comment -

          Installed the attached .hpi ( 2.1-SNAPSHOT (private-02/24/2013 14:23-chris) ). I can select "Publish Android Lint reports" on the project under "Build Settings" now.

          What I don't see is, though, any report or menu item or graphical representation of my lints, neither on the project page where all the other violations are show nor on the pages of the build jobs themselves.

          Show
          hakan Hakan Tandogan added a comment - Installed the attached .hpi ( 2.1-SNAPSHOT (private-02/24/2013 14:23-chris) ). I can select "Publish Android Lint reports" on the project under "Build Settings" now. What I don't see is, though, any report or menu item or graphical representation of my lints, neither on the project page where all the other violations are show nor on the pages of the build jobs themselves.
          Hide
          orrc Christopher Orr added a comment -

          Thanks for trying it out.

          How are you generating the Lint XML in your Maven job? Are you running a certain goal?

          Show
          orrc Christopher Orr added a comment - Thanks for trying it out. How are you generating the Lint XML in your Maven job? Are you running a certain goal?
          Hide
          hakan Hakan Tandogan added a comment -

          I'm running the android:lint goal of the maven plugin version 3.5.1.

          On the other hand, I just realized while looking at my logs that with my multi-module project, only the top level parent project is analyzed, but not the submodules which hold the real code and AndroidManifest files... Need to investigate further.

          Show
          hakan Hakan Tandogan added a comment - I'm running the android:lint goal of the maven plugin version 3.5.1. On the other hand, I just realized while looking at my logs that with my multi-module project, only the top level parent project is analyzed, but not the submodules which hold the real code and AndroidManifest files... Need to investigate further.
          Hide
          orrc Christopher Orr added a comment -

          Yeah, I think it could be an issue with the Maven plugin: https://code.google.com/p/maven-android-plugin/issues/detail?id=224#c17

          Show
          orrc Christopher Orr added a comment - Yeah, I think it could be an issue with the Maven plugin: https://code.google.com/p/maven-android-plugin/issues/detail?id=224#c17
          Hide
          orrc Christopher Orr added a comment -

          Ok, I'm going to merge this and do a release soon.

          Show
          orrc Christopher Orr added a comment - Ok, I'm going to merge this and do a release soon.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Christopher Orr
          Path:
          src/main/java/org/jenkinsci/plugins/android_lint/LintReporter.java
          http://jenkins-ci.org/commit/android-lint-plugin/16db36fb0a59455802a13bdd650434574d27c187
          Log:
          [FIXED JENKINS-14857] Support the 'lint' goal used by the Android Maven Plugin.

          Android Maven Plugin 3.5.1 or newer is required for Lint support.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christopher Orr Path: src/main/java/org/jenkinsci/plugins/android_lint/LintReporter.java http://jenkins-ci.org/commit/android-lint-plugin/16db36fb0a59455802a13bdd650434574d27c187 Log: [FIXED JENKINS-14857] Support the 'lint' goal used by the Android Maven Plugin. Android Maven Plugin 3.5.1 or newer is required for Lint support.
          Hide
          orrc Christopher Orr added a comment -

          Version 2.1 has been released, which includes this update.

          Show
          orrc Christopher Orr added a comment - Version 2.1 has been released, which includes this update.

            People

            • Assignee:
              orrc Christopher Orr
              Reporter:
              willcode4beer Paul Davis
            • Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: