maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Connolly <stephen.alan.conno...@gmail.com>
Subject Re: Cobertura Maven Plugin works locally, but not in Jenkins
Date Tue, 12 Jul 2016 23:34:01 GMT
Welcome to the evil one.

I have a blog post entitled "Maven job type considered evil"

Basically the issue is that Jenkins (via the evil one) is injecting a
remoting channel into your maven execution nd using that channel to both
modify and monitor the build.

One of the plugins that does this is the cobertura plugin. If it sees you
running cobertura it says "I'll have some of that, oh and let's tweak the
configuration while we are at it"

There may be a configuration option to tell the Jenkins cobertura plugin to
leave this job alone... Otherwise I recommend switching to either freestyle
or pipeline (got to love pipeline)

One of these days I'll get time to write my (long planned) replacement for
the evil one that does not do evil things... Until that day, you have a
tricky choice... Configure nothing and run the risk of it blowing up in
your face or use freestyle

On Tuesday 12 July 2016, Hohl, Gerrit <g.hohl@aurenz.de> wrote:

> Hello everyone,
>
>
>
> I faced an odd problem today:
>
> We have a Maven Build which also includes the creation of a
> documentation.
>
> One of the plugins creating the reports is the Cobertura Maven Plugin.
>
> If I execute it on my local machine it works perfectly.
>
> Also the project has no code at all (it's more an Ant and aggregation
> project) it creates the documentation and also deploys it.
>
>
>
> But if I try to build the same project in our Jenkins build service the
> Maven jobs just days while trying to execute the Cobertura Maven Plugin.
>
> I added --debug, but also if the debug messages are enabled I don't see
> an error, stack trace or whatever in the log.
>
> On my local machine the output looks like this:
>
>
>
> [...]
>
> [DEBUG] resolving version for org.codehaus.mojo:cobertura-maven-plugin
>
> [DEBUG] resolved org.codehaus.mojo:cobertura-maven-plugin version from
> the reporting.plugins section: 2.7
>
> [INFO] configuring report plugin
> org.codehaus.mojo:cobertura-maven-plugin:2.7
>
> [...]
>
> [DEBUG] org.codehaus.mojo:cobertura-maven-plugin:jar:2.7:
>
> [DEBUG]    net.sourceforge.cobertura:cobertura:jar:2.1.1:compile
>
> [DEBUG]       org.ow2.asm:asm:jar:5.0.1:compile
>
> [DEBUG]       org.ow2.asm:asm-tree:jar:5.0.1:compile
>
> [DEBUG]       org.ow2.asm:asm-commons:jar:5.0.1:compile
>
> [...]
>
> [DEBUG]    org.apache.maven.shared:maven-invoker:jar:2.0.11:compile
>
> [DEBUG] Created new class realm
> plugin>org.codehaus.mojo:cobertura-maven-plugin:2.7
>
> [DEBUG] Importing foreign packages into class realm
> plugin>org.codehaus.mojo:cobertura-maven-plugin:2.7
>
> [DEBUG]   Imported:  < maven.api
>
> [DEBUG]   Imported: org.apache.maven.doxia.logging.Log <
> plugin>org.apache.maven.plugins:maven-site-plugin:3.5.1
>
> [DEBUG]   Imported: org.apache.maven.doxia.logging.LogEnabled <
> plugin>org.apache.maven.plugins:maven-site-plugin:3.5.1
>
> [...]
>
>
>
> The output with the Jenkins server looks like this:
>
>
>
> [...]
>
> [DEBUG] resolving version for org.codehaus.mojo:cobertura-maven-plugin
>
> [DEBUG] resolved org.codehaus.mojo:cobertura-maven-plugin version from
> the reporting.plugins section: 2.7
>
> [INFO] configuring report plugin
> org.codehaus.mojo:cobertura-maven-plugin:2.7
>
> [...]
>
> [DEBUG] org.codehaus.mojo:cobertura-maven-plugin:jar:2.7:
>
> [DEBUG]    net.sourceforge.cobertura:cobertura:jar:2.1.1:compile
>
> [DEBUG]       org.ow2.asm:asm:jar:5.0.1:compile
>
> [DEBUG]       org.ow2.asm:asm-tree:jar:5.0.1:compile
>
> [DEBUG]       org.ow2.asm:asm-commons:jar:5.0.1:compile
>
> [...]
>
> [DEBUG]    org.apache.maven.shared:maven-invoker:jar:2.0.11:compile
>
> [JENKINS] Archiving site from c:\jenkins_data\workspace\target\site to
> C:\.jenkins\jobs\xxx\site
>
>
>
> Jul 12, 2016 3:43:15 PM org.apache.maven.cli.event.ExecutionEventLogger
> logResult
>
> INFORMATION:
> ------------------------------------------------------------------------
>
> Jul 12, 2016 3:43:15 PM org.apache.maven.cli.event.ExecutionEventLogger
> logResult
>
> INFORMATION: BUILD FAILURE
>
> Jul 12, 2016 3:43:15 PM org.apache.maven.cli.event.ExecutionEventLogger
> logStats
>
> INFORMATION:
> ------------------------------------------------------------------------
>
> Jul 12, 2016 3:43:15 PM org.apache.maven.cli.event.ExecutionEventLogger
> logStats
>
> INFORMATION: Total time: 35.284s
>
> Jul 12, 2016 3:43:15 PM org.apache.maven.cli.event.ExecutionEventLogger
> logStats
>
> INFORMATION: Finished at: Tue Jul 12 15:43:15 CEST 2016
>
> Jul 12, 2016 3:43:15 PM org.apache.maven.cli.event.ExecutionEventLogger
> logStats
>
> INFORMATION: Final Memory: 24M/174M
>
> Jul 12, 2016 3:43:15 PM org.apache.maven.cli.event.ExecutionEventLogger
> sessionEnded
>
> INFORMATION:
> ------------------------------------------------------------------------
>
> [...]
>
>
>
> And that is it. No errors, no stack traces, no messages.
>
> Jenkins uses the same Java version and same Maven version like my local
> build.
>
> We use an internal Nexus server as proxy for the artifacts.
>
> Means my local Maven installation as well as the one Jenkins uses are
> using the same artifact repository.
>
>
>
> Any ideas on this?
>
>
>
> Regards,
>
> Gerrit
>
>
>
>

-- 
Sent from my phone

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message