Jenkins converts the scope of dependency as "compile" and fails to include the dependencies in the war

31 views
Skip to first unread message

Murthy Gandikota

unread,
Apr 7, 2015, 6:40:52 PM4/7/15
to jenkins...@googlegroups.com
Using Jenkins 1.596. 

While creating a war, all the necessary jars are flagged with the scope "compile", like this:

[pool-1-thread-1 for channel] INFO org.apache.maven.plugin.dependency.TreeMojo - +- org.javassist:javassist:jar:3.18.1-GA:compile
[pool-1-thread-1 for channel] INFO org.apache.maven.plugin.dependency.TreeMojo - +- org.antlr:antlr:jar:3.5:compile
[pool-1-thread-1 for channel] INFO org.apache.maven.plugin.dependency.TreeMojo - |  +- org.antlr:antlr-runtime:jar:3.5:compile
[pool-1-thread-1 for channel] INFO org.apache.maven.plugin.dependency.TreeMojo - |  |  \- org.antlr:stringtemplate:jar:3.2.1:compile
[pool-1-thread-1 for channel] INFO org.apache.maven.plugin.dependency.TreeMojo - |  |     \- antlr:antlr:jar:2.7.7:compile

The pom.xml dependency tags don't mention the scope anywhere.

As a result, I think, the jars are not included in the packaged war. This is seen only with incremental build.

If scope needs to be specified in each dependency, what value should it be set?

I'd appreciate your help

Murthy Gandikota

unread,
Apr 8, 2015, 2:33:32 PM4/8/15
to jenkins...@googlegroups.com
It seems compile scope is the default.


 Can someone kindly tell me why the jars are not included in the packaged war? My apologies if this is a maven question.

Murthy Gandikota

unread,
Apr 8, 2015, 3:27:05 PM4/8/15
to jenkins...@googlegroups.com
When maven is run from the command  line, all of the jars are included in the war. When Jenkins does incremental build, the jars are missing. This tells me, the issue is with Jenkins, not maven. 
Here are the goals to maven:

clean dependency:tree install -P component clover2:setup test clover2:aggregate clover2:clover
Reply all
Reply to author
Forward
0 new messages