archiecobbs / ivyroundup

Online Ivy Repository
13 stars 13 forks source link

repo failed: Attribute 'version' must appear on element 'ivy-module': xalan-j/ivy-2.7.1.xml.original #129

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. get the project from svn
2. copy my ivy.jar into the top of the project
3. ant -Denv.IVY_JAR=./ivy-2.1.0.jar -Ddownload-xalan=true repo

What is the expected output? What do you see instead?

I expect to see something like BUILD SUCCESSFUL. Instead I get:
roger@ambrose9400:~/workspace/svn$ ant -Denv.IVY_JAR=./ivy-2.1.0.jar
-Ddownload-xalan=true repo
Buildfile: build.xml

_download-xalan:
[ivy:resolve] :: Ivy 2.1.0 - 20090925235825 :: http://ant.apache.org/ivy/ ::
[ivy:resolve] :: loading settings :: file =
/home/roger/workspace/svn/src/ivy/build-settings.xml

BUILD FAILED
/home/roger/workspace/svn/build.xml:281: impossible to resolve dependencies:
    java.lang.RuntimeException: problem while parsing repository module
descriptor for org.apache.xml#xalan-j;2.7+: java.text.ParseException: [xml
parsing: ivy-2.7.1.xml.original:19:72: cvc-complex-type.3.2.2: Attribute
'rev' is not allowed to appear in element 'ivy-module'. in
file:/home/roger/workspace/svn/build/cache/org.apache.xml/xalan-j/ivy-2.7.1.xml.
original
, xml parsing: ivy-2.7.1.xml.original:19:72: cvc-complex-type.4: Attribute
'version' must appear on element 'ivy-module'. in
file:/home/roger/workspace/svn/build/cache/org.apache.xml/xalan-j/ivy-2.7.1.xml.
original
, invalid version null in
file:/home/roger/workspace/svn/build/cache/org.apache.xml/xalan-j/ivy-2.7.1.xml.
original
]

What version of the product are you using? On what operating system?
Latest ivyroundup (just pulled it down)
O/S Linux Ubuntu 8.04
Java: java-1.5.0-sun-1.5.0.22
Apache Ant version 1.7.0 
ivy: 2.1.0

Please provide any additional information below.
I tried any 2.0.0 and got the same thing.
I checked the ivy docs on element ivy-module and they agree with the
message, ie there needs to be a version attribute and the file in question
does not have one.

Original issue reported on code.google.com by roger.parkinson35 on 27 Feb 2010 at 1:43

GoogleCodeExporter commented 9 years ago
I should add that leaving the -Ddownload-xalan=true off the command and ensuring
xalan is on my classpath means it works, so the problem is only in the download 
of xalan.

Original comment by roger.parkinson35 on 27 Feb 2010 at 8:30

GoogleCodeExporter commented 9 years ago
I cannot repeat this problem.

I think somehow your ivy cache got poisoned with an untransformed ivy.xml. All
ivy.xml files under repo/modules have version attributes; only the ones under
src/modules don't, and these latter files are not used during the xalan 
download step.

Try this: rm -rf ~/.ivy2/cache and then see if you can repeat the problem.

Original comment by archie.c...@gmail.com on 1 Mar 2010 at 5:42

GoogleCodeExporter commented 9 years ago
I retried this after clearing the cache (deleted both cache and packager 
directories
in ~/.ivy2). I still get an error but it is a different one. The log is 
attached.
Thanks
R

Original comment by roger.parkinson35 on 2 Mar 2010 at 9:03

Attachments:

GoogleCodeExporter commented 9 years ago
Something else is wrong now. Your log shows a SHA1 checksum failure.

I downloaded
http://archive.apache.org/dist/xml/xalan-j/xalan-j_2_7_1-bin-2jars.tar.gz 
manually
and verified that the checksum in packager.xml is correct:
cb9c988b1a93c008e924551cbe144b2bc62c3f2e.

What checksum do you get for the file
/home/roger/.ivy2/packager/cache/xalan-j_2_7_1-bin-2jars.tar.gz ? If it's 
different,
then your download was corrupted somehow (you will have to investigate why).

Original comment by archie.c...@gmail.com on 2 Mar 2010 at 9:11

GoogleCodeExporter commented 9 years ago
I think we should call this a local problem at my end.
If you don't reproduce it and I don't need the feature we probably have better 
things
to do.
Thanks for looking at it. I'm happy to close it.
R 

Original comment by roger.parkinson35 on 3 Mar 2010 at 6:06

GoogleCodeExporter commented 9 years ago
Sounds good. Feel free to reopen the bug if you discover a legit problem.

Original comment by archie.c...@gmail.com on 3 Mar 2010 at 4:41

GoogleCodeExporter commented 9 years ago
The first problem (original bug description) can be consistently reproduced as 
follows:

checkout the current version:
svn checkout http://ivyroundup.googlecode.com/svn/trunk/ ivyroundup-read-only

try to generate the repo without xalan in the classpath:
cd ivyroundup-read-only/
ant -Divy.jar=..... repo

After failing because of the missing xalan JAR, try to use the downloaded JAR:
ant -Divy.jar=..... get-xalan repo

This command fails with the error message described in the bug report.

The problem can be fixed via deleting the repo dir and updating it again from 
subversion:
rm -r repo
svn update

Original comment by oliverbr...@googlemail.com on 17 Aug 2010 at 6:20

GoogleCodeExporter commented 9 years ago
Thanks, found the problem.

Fixed in r1283.

Original comment by archie.c...@gmail.com on 17 Aug 2010 at 8:50