ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mitch Gitman <mgit...@gmail.com>
Subject Re: Error parsing ivy.xml files using Jenkins
Date Tue, 22 Feb 2011 06:12:55 GMT
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 <
krosenkoetter@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/>
>
> 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.
>
>

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