I just tried what you suggested, and got the same failure as before. Even with a revision in the ivy.xml file, I still get a NullPointerException.
U ivy.xml At revision 950 Parsing Ivy Descriptor Files Parsing error while reading the ivy file /home/thudson/.hudson/workspace/EcidCommon-Ivy-platform/ivy.xml ERROR: Failed to parse ivy.xml files java.io.IOException<http://stacktrace.hudson-labs.org/search?query=java.io.IOException>: Unable to parse ivy descriptors at hudson.ivy.IvyModuleSetBuild$RunnerImpl.parseIvyDescriptorFiles(IvyModuleSetBuild.java:530)<http://stacktrace.hudson-labs.org/search/?query=hudson.ivy.IvyModuleSetBuild$RunnerImpl.parseIvyDescriptorFiles&entity=method> at hudson.ivy.IvyModuleSetBuild$RunnerImpl.doRun(IvyModuleSetBuild.java:366)<http://stacktrace.hudson-labs.org/search/?query=hudson.ivy.IvyModuleSetBuild$RunnerImpl.doRun&entity=method> at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:420)<http://stacktrace.hudson-labs.org/search/?query=hudson.model.AbstractBuild$AbstractRunner.run&entity=method> at hudson.model.Run.run(Run.java:1362)<http://stacktrace.hudson-labs.org/search/?query=hudson.model.Run.run&entity=method> at hudson.ivy.IvyModuleSetBuild.run(IvyModuleSetBuild.java:282)<http://stacktrace.hudson-labs.org/search/?query=hudson.ivy.IvyModuleSetBuild.run&entity=method> at hudson.model.ResourceController.execute(ResourceController.java:88)<http://stacktrace.hudson-labs.org/search/?query=hudson.model.ResourceController.execute&entity=method> at hudson.model.Executor.run(Executor.java:145)<http://stacktrace.hudson-labs.org/search/?query=hudson.model.Executor.run&entity=method> Caused by: java.lang.NullPointerException<http://stacktrace.hudson-labs.org/search?query=java.lang.NullPointerException> at org.apache.ivy.core.sort.CollectionOfModulesToSort.addToModulesByModuleId(CollectionOfModulesToSort.java:71)<http://stacktrace.hudson-labs.org/search/?query=org.apache.ivy.core.sort.CollectionOfModulesToSort.addToModulesByModuleId&entity=method> at org.apache.ivy.core.sort.CollectionOfModulesToSort.<init>(CollectionOfModulesToSort.java:66)<http://stacktrace.hudson-labs.org/search/?query=org.apache.ivy.core.sort.CollectionOfModulesToSort.%3Cinit%3E&entity=method> at org.apache.ivy.core.sort.ModuleDescriptorSorter.<init>(ModuleDescriptorSorter.java:51)<http://stacktrace.hudson-labs.org/search/?query=org.apache.ivy.core.sort.ModuleDescriptorSorter.%3Cinit%3E&entity=method> at org.apache.ivy.core.sort.SortEngine.sortModuleDescriptors(SortEngine.java:99)<http://stacktrace.hudson-labs.org/search/?query=org.apache.ivy.core.sort.SortEngine.sortModuleDescriptors&entity=method> at org.apache.ivy.Ivy.sortModuleDescriptors(Ivy.java:639)<http://stacktrace.hudson-labs.org/search/?query=org.apache.ivy.Ivy.sortModuleDescriptors&entity=method> at hudson.ivy.IvyModuleSetBuild$IvyXmlParser.call(IvyModuleSetBuild.java:803)<http://stacktrace.hudson-labs.org/search/?query=hudson.ivy.IvyModuleSetBuild$IvyXmlParser.call&entity=method> at hudson.ivy.IvyModuleSetBuild$IvyXmlParser.call(IvyModuleSetBuild.java:742)<http://stacktrace.hudson-labs.org/search/?query=hudson.ivy.IvyModuleSetBuild$IvyXmlParser.call&entity=method> at hudson.remoting.UserRequest.perform(UserRequest.java:114)<http://stacktrace.hudson-labs.org/search/?query=hudson.remoting.UserRequest.perform&entity=method> at hudson.remoting.UserRequest.perform(UserRequest.java:48)<http://stacktrace.hudson-labs.org/search/?query=hudson.remoting.UserRequest.perform&entity=method> at hudson.remoting.Request$2.run(Request.java:270)<http://stacktrace.hudson-labs.org/search/?query=hudson.remoting.Request$2.run&entity=method> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)<http://stacktrace.hudson-labs.org/search/?query=java.util.concurrent.Executors$RunnableAdapter.call&entity=method> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)<http://stacktrace.hudson-labs.org/search/?query=java.util.concurrent.FutureTask$Sync.innerRun&entity=method> at java.util.concurrent.FutureTask.run(FutureTask.java:123)<http://stacktrace.hudson-labs.org/search/?query=java.util.concurrent.FutureTask.run&entity=method> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651)<http://stacktrace.hudson-labs.org/search/?query=java.util.concurrent.ThreadPoolExecutor$Worker.runTask&entity=method> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676)<http://stacktrace.hudson-labs.org/search/?query=java.util.concurrent.ThreadPoolExecutor$Worker.run&entity=method> at java.lang.Thread.run(Thread.java:595)<http://stacktrace.hudson-labs.org/search/?query=java.lang.Thread.run&entity=method> Finished: FAILURE Jenkins version: 1.396 Ivy plugin version: 1.15 According to http://wiki.jenkins-ci.org/display/JENKINS/Ivy+Plugin this uses ivy 2.1.0 internally. <?xml version="1.0" encoding="UTF-8"?> <ivy-module version="2.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd" xmlns:e="http://ant.apache.org/ivy/extra"> <info organisation="com.cequint" module="Foo" branch="platform" status="integration" revision="17.26"> <ivyauthor name="Cequint" url="http://www.cequint.com/"/> </info> <configurations> <conf name="compile" transitive="false" visibility="private" description="Compiles the source into class files."/> <conf name="runtime" extends="compile" transitive="true" description="For running systems that depend on this library."/> <conf name="build" extends="runtime" description="For use in an IDE, includes source and JavaDoc."/> <conf name="test" extends="runtime" visibility="private" description="Build the unit tests."/> </configurations> <publications> <artifact type="jar" ext="jar"> <conf name="compile"/> </artifact> <artifact type="javadoc" ext="jar" e:classifier="javadoc"> <conf name="build"/> </artifact> <artifact type="source" ext="jar" e:classifier="sources"> <conf name="build"/> </artifact> </publications> <dependencies> <dependency org="log4j" name="log4j" rev="1.2.16"/> <dependency org="org.apache.httpcomponents" name="httpcore" rev="4.1" /> <dependency org="org.apache.httpcomponents" name="httpclient" rev="4.1" /> <dependency org="javax.servlet" name="servlet-api" rev="2.5"/> <dependency org="junit" name="junit" rev="4.8.2" conf="test->default"/> </dependencies> </ivy-module> -Kent From: Mitch Gitman [mailto:mgit...@gmail.com] Sent: Tuesday, February 22, 2011 11:24 AM To: ivy-user@ant.apache.org Cc: Kent Rosenkoetter Subject: Re: Error parsing ivy.xml files using Jenkins Here's the line in question from CollectionOfModulesToSort: ModuleId mdId = md.getModuleRevisionId().getModuleId(); The variable md is of type ModuleDescriptor, which is the domain type represented by your ivy.xml. The method getModuleRevisionId returns an object of ModuleRevisionId. I suspect this call is what's returning null. That could very well be due to the absence of the revision, although it's not unusual for the ivy.xml in source control to not contain a revision. So really, my question about how the revision shows in the published module is a diversion and not pertinent to your problem. On the one hand, I'd go back to my devil's advocacy here. It sounds like you're otherwise satisfied with your Ivy integration. In that case, what value are you hoping to gain from using the Ivy plugin? Still, it's curious that the Ivy plugin APPEARS to coughing at what is an acceptable input--a source ivy.xml that does not contain a revision--if my suspicion is correct. If you don't mind committing bogus content into source control, just as an experiment, try committing a source ivy.xml that does have a Nexus-generated revision and see what happens. If this no longer fails, at least you've isolated the problem. Perhaps there's someone out there who has used the Ivy Jenkins plugin in a similar arrangement. I haven't. In working with a much larger project base, I came to an opposite conclusion than you did: * Running multimodule builds: worthwhile. * Ivy plugin for Hudson: not worthwhile. I'd be interested in re-evaluating the plugin's value proposition eventually. On Tue, Feb 22, 2011 at 10:41 AM, Kent Rosenkoetter <krosenkoet...@cequint.com<mailto:krosenkoet...@cequint.com>> wrote: The answer to your question about "source repository" is that I pulled the ivy.xml file from subversion. We have Jenkins (Hudson) poll SVN, check out the source, build it, run tests, and then run our Ant target to publish to our local "artifact repository" (we use Nexus). This publish is done via an Ant target that generates a build number such as "427.231" and publishes as that revision. The revision is generated, not checked into SVN. When we build our projects, we build them individually. We do not have any build script that builds all the projects at once, there is no need. That is why we do not use ivy:buildlist. Individual projects build just fine. The only time I see problems is when I go into Jenkins and create a new project, select "Build an Ivy project", and ask it to build. For what it's worth, I see this exception even if I only ask Jenkins to build a single project. (See below.) I guess my question can be summed up as, "How is it possible to get a NullPointerException at org.apache.ivy.core.sort.CollectionOfModulesToSort.addModulesByModuleId(CollectionOfModulesToSort.java:71)?" At revision 935 Parsing Ivy Descriptor Files Parsing error while reading the ivy file /home/thudson/.hudson/workspace/EcidCommon-Ivy-platform/ivy.xml ERROR: Failed to parse ivy.xml files java.io.IOException: Unable to parse ivy descriptors at hudson.ivy.IvyModuleSetBuild$RunnerImpl.parseIvyDescriptorFiles(IvyModuleSetBuild.java:530) at hudson.ivy.IvyModuleSetBuild$RunnerImpl.doRun(IvyModuleSetBuild.java:366) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:420) at hudson.model.Run.run(Run.java:1362) at hudson.ivy.IvyModuleSetBuild.run(IvyModuleSetBuild.java:282) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:145) Caused by: java.lang.NullPointerException at org.apache.ivy.core.sort.CollectionOfModulesToSort.addToModulesByModuleId(CollectionOfModulesToSort.java:71) at org.apache.ivy.core.sort.CollectionOfModulesToSort.<init>(CollectionOfModulesToSort.java:66) at org.apache.ivy.core.sort.ModuleDescriptorSorter.<init>(ModuleDescriptorSorter.java:51) at org.apache.ivy.core.sort.SortEngine.sortModuleDescriptors(SortEngine.java:99) at org.apache.ivy.Ivy.sortModuleDescriptors(Ivy.java:639) at hudson.ivy.IvyModuleSetBuild$IvyXmlParser.call(IvyModuleSetBuild.java:803) at hudson.ivy.IvyModuleSetBuild$IvyXmlParser.call(IvyModuleSetBuild.java:742) at hudson.remoting.UserRequest.perform(UserRequest.java:114) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:270) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269) at java.util.concurrent.FutureTask.run(FutureTask.java:123) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676) at java.lang.Thread.run(Thread.java:595) Finished: FAILURE -----Original Message----- From: Mitch Gitman [mailto:mgit...@gmail.com<mailto:mgit...@gmail.com>] Sent: Monday, February 21, 2011 10:13 PM To: ivy-user@ant.apache.org<mailto:ivy-user@ant.apache.org> Subject: Re: Error parsing ivy.xml files using Jenkins First a little devil's advocacy that I'm going to contradict soon enough. If all you have is six projects, you might find it easier to manually configure the build order using Jenkins's own triggering configuration. You're introducing some moving parts--and demanding some extra expertise on your end--for not much appreciable gain at this point. It's a call you can always revisit as your project count expands. When it comes to using Ivy to establish build order, I've found the more necessary practice is to use the ivy:buildlist task to do a multimodule build. So if you have six projects, you could kick off a single build and all six projects would be built (certain targets would be run) starting with the least dependent project. Once you know this works, you can leverage it for using Ivy to establish your CI build order. Having offered these caveats, it's still probably worth your while to track down this problem, if not necessarily as a blocking issue. In this sense the Jenkins Ivy plugin's biggest value to you is in helping you dredge up some problems in your Ivy integration you haven't otherwise noticed yet. As if it's not bad enough that I'm tiptoeing around answering your question, I've got some questions of my own. You write: "This is straight out of our source repository, which is why the revision is not specified." What do you mean by "source repository"? In commonplace Ivy usage, that's a bit of an oxymoron. You have your project source and then you publish the generated artifacts to an Ivy repository. When you publish to an Ivy repo, are you publishing with a revision or leaving it blank and reverting to Ivy's default revision behavior? The latter is atypical. In fact, I couldn't recall offhand what happens when you publish without a revision. (The docs suggest a timestamp is used.) If the revision is indeed absent, I can't vouch for whether its absence is what's causing the problem. There's always the plugin source, and I'm sure one of the plugin committers will chime in soon enough. On Mon, Feb 21, 2011 at 12:52 PM, Kent Rosenkoetter < krosenkoet...@cequint.com<mailto:krosenkoet...@cequint.com>> wrote: > Hello, > > We have Jenkins (formerly Hudson) set up for our continuous build system, > and I would like to use the Ivy plugin for it. Right now we have half a > dozen modules, each in their own directory with their own Ivy-managed > dependencies. We have freestyle projects set up that build fine with our Ant > build.xml files, but when I try to use the Jenkins Ivy plugin, I get an > exception. > > > Parsing Ivy Descriptor Files > > Parsing error while reading the ivy file > /home/thudson/.hudson/workspace/Sandbox-HTTPConversion/AuthServer/ivy.xml > > Parsing error while reading the ivy file > /home/thudson/.hudson/workspace/Sandbox-HTTPConversion/CASRegistrationServer/ivy.xml > > Parsing error while reading the ivy file > /home/thudson/.hudson/workspace/Sandbox-HTTPConversion/CarrierInterfaceServer/ivy.xml > > Parsing error while reading the ivy file > /home/thudson/.hudson/workspace/Sandbox-HTTPConversion/ContentProxy/ivy.xml > > Parsing error while reading the ivy file > /home/thudson/.hudson/workspace/Sandbox-HTTPConversion/DataLayer/ivy.xml > > Parsing error while reading the ivy file > /home/thudson/.hudson/workspace/Sandbox-HTTPConversion/EcidCommon/ivy.xml > > ERROR: Failed to parse ivy.xml files > > java.io.IOException< > http://stacktrace.hudson-labs.org/search?query=java.io.IOException>: > Unable to parse ivy descriptors > > at > hudson.ivy.IvyModuleSetBuild$RunnerImpl.parseIvyDescriptorFiles(IvyModuleSetBuild.java:530)< > http://stacktrace.hudson-labs.org/search/?query=hudson.ivy.IvyModuleSetBuild$RunnerImpl.parseIvyDescriptorFiles&entity=method > > > > at > hudson.ivy.IvyModuleSetBuild$RunnerImpl.doRun(IvyModuleSetBuild.java:366)< > http://stacktrace.hudson-labs.org/search/?query=hudson.ivy.IvyModuleSetBuild$RunnerImpl.doRun&entity=method > > > > at > hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:420)< > http://stacktrace.hudson-labs.org/search/?query=hudson.model.AbstractBuild$AbstractRunner.run&entity=method > > > > at hudson.model.Run.run(Run.java:1362)< > http://stacktrace.hudson-labs.org/search/?query=hudson.model.Run.run&entity=method > > > > at hudson.ivy.IvyModuleSetBuild.run(IvyModuleSetBuild.java:282)< > http://stacktrace.hudson-labs.org/search/?query=hudson.ivy.IvyModuleSetBuild.run&entity=method > > > > at > hudson.model.ResourceController.execute(ResourceController.java:88)< > http://stacktrace.hudson-labs.org/search/?query=hudson.model.ResourceController.execute&entity=method > > > > at hudson.model.Executor.run(Executor.java:145)< > http://stacktrace.hudson-labs.org/search/?query=hudson.model.Executor.run&entity=method > > > > Caused by: java.lang.NullPointerException< > http://stacktrace.hudson-labs.org/search?query=java.lang.NullPointerException > > > > at > org.apache.ivy.core.sort.CollectionOfModulesToSort.addToModulesByModuleId(CollectionOfModulesToSort.java:71)< > http://stacktrace.hudson-labs.org/search/?query=org.apache.ivy.core.sort.CollectionOfModulesToSort.addToModulesByModuleId&entity=method > > > > at > org.apache.ivy.core.sort.CollectionOfModulesToSort.<init>(CollectionOfModulesToSort.java:66)< > http://stacktrace.hudson-labs.org/search/?query=org.apache.ivy.core.sort.CollectionOfModulesToSort.%3Cinit%3E&entity=method > > > > at > org.apache.ivy.core.sort.ModuleDescriptorSorter.<init>(ModuleDescriptorSorter.java:51)< > http://stacktrace.hudson-labs.org/search/?query=org.apache.ivy.core.sort.ModuleDescriptorSorter.%3Cinit%3E&entity=method > > > > at > org.apache.ivy.core.sort.SortEngine.sortModuleDescriptors(SortEngine.java:99)< > http://stacktrace.hudson-labs.org/search/?query=org.apache.ivy.core.sort.SortEngine.sortModuleDescriptors&entity=method > > > > at org.apache.ivy.Ivy.sortModuleDescriptors(Ivy.java:639)< > http://stacktrace.hudson-labs.org/search/?query=org.apache.ivy.Ivy.sortModuleDescriptors&entity=method > > > > at > hudson.ivy.IvyModuleSetBuild$IvyXmlParser.call(IvyModuleSetBuild.java:803)< > http://stacktrace.hudson-labs.org/search/?query=hudson.ivy.IvyModuleSetBuild$IvyXmlParser.call&entity=method > > > > at > hudson.ivy.IvyModuleSetBuild$IvyXmlParser.call(IvyModuleSetBuild.java:742)< > http://stacktrace.hudson-labs.org/search/?query=hudson.ivy.IvyModuleSetBuild$IvyXmlParser.call&entity=method > > > > at hudson.remoting.UserRequest.perform(UserRequest.java:114)< > http://stacktrace.hudson-labs.org/search/?query=hudson.remoting.UserRequest.perform&entity=method > > > > at hudson.remoting.UserRequest.perform(UserRequest.java:48)< > http://stacktrace.hudson-labs.org/search/?query=hudson.remoting.UserRequest.perform&entity=method > > > > at hudson.remoting.Request$2.run(Request.java:270)< > http://stacktrace.hudson-labs.org/search/?query=hudson.remoting.Request$2.run&entity=method > > > > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)< > http://stacktrace.hudson-labs.org/search/?query=java.util.concurrent.Executors$RunnableAdapter.call&entity=method > > > > at > java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)< > http://stacktrace.hudson-labs.org/search/?query=java.util.concurrent.FutureTask$Sync.innerRun&entity=method > > > > at java.util.concurrent.FutureTask.run(FutureTask.java:123)< > http://stacktrace.hudson-labs.org/search/?query=java.util.concurrent.FutureTask.run&entity=method > > > > at > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651)< > http://stacktrace.hudson-labs.org/search/?query=java.util.concurrent.ThreadPoolExecutor$Worker.runTask&entity=method > > > > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676)< > http://stacktrace.hudson-labs.org/search/?query=java.util.concurrent.ThreadPoolExecutor$Worker.run&entity=method > > > > at java.lang.Thread.run(Thread.java:595)< > http://stacktrace.hudson-labs.org/search/?query=java.lang.Thread.run&entity=method > > > > Finished: FAILURE > > Is this a bug in Jenkins/Hudson, a bug in Ivy, or simply a matter of our > ivy.xml files not having required information in them? For reference, our > ivy.xml files look like this: > > <?xml version="1.0" encoding="UTF-8"?> > <ivy-module version="2.2" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:noNamespaceSchemaLocation=" > http://ant.apache.org/ivy/schemas/ivy.xsd" > xmlns:e="http://ant.apache.org/ivy/extra"> > <info organisation="com.cequint" module="Foo" branch="platform" > status="integration"> > <ivyauthor name="Cequint" url="http://www.cequint.com/"/> > </info> > <configurations> > <conf name="compile" transitive="false" visibility="private" > description="Compiles the source into class files."/> > <conf name="runtime" extends="compile" transitive="true" > description="For running systems that depend on this library."/> > <conf name="build" extends="runtime" description="For use in an > IDE, includes source and JavaDoc."/> > <conf name="test" extends="runtime" visibility="private" > description="Build the unit tests."/> > </configurations> > <publications> > <artifact type="jar" ext="jar"> > <conf name="compile"/> > </artifact> > <artifact type="javadoc" ext="jar" e:classifier="javadoc"> > <conf name="build"/> > </artifact> > <artifact type="source" ext="jar" e:classifier="sources"> > <conf name="build"/> > </artifact> > </publications> > <dependencies> > <dependency org="log4j" name="log4j" rev="1.2.16"/> > <dependency org="org.apache.httpcomponents" name="httpcore" > rev="4.1" /> > <dependency org="org.apache.httpcomponents" name="httpclient" > rev="4.1" /> > <dependency org="javax.servlet" name="servlet-api" rev="2.5"/> > <dependency org="junit" name="junit" rev="4.8.2" > conf="test->default"/> > </dependencies> > </ivy-module> > > This is straight out of our source repository, which is why the revision is > not specified. All the Ivy files look like this, only some of them specify > internal dependencies such as: > <dependency name="Foo" rev="latest.integration" > conf="build->build; *->runtime"/> > > I appreciate any insight that anybody can offer. It seems likely I simply > have not configured everything properly, but so far nothing I have found > online has given me a clue what could be the problem. > > -thank you, > Kent Rosenkoetter | SW Engineering – Server > > Cequint Incorporated > 1011 Western Avenue | Suite 800 > Seattle | WA | 98104 > > p: 206.576.7258 > f: 206.299.9127 > > www.cequint.com<http://www.cequint.com><http://www.cequint.com/> > > Confidential Information – this email and any and all attachments to it are > Cequint's confidential information and intended solely for the use of the > individual or entity to whom they are addressed. Any unauthorized disclosure > or forwarding of this email or any files transmitted with it constitutes a > breach of your confidentiality obligations to Cequint. If you have received > this email in error, please notify the sender, delete this email from your > system and do not disseminate, distribute or copy this email or the files > attached to it. Please treat all documents shared from Cequint as > confidential. > >