Details
Description
How to reproduce this bug:
1. Download http://www.jayasoft.org/latest/ivy/ivy-20060904024206-bin.zip
2. Copy all jar files to ~/.ant/lib
3. Add attribute validate="false" in ivy-20060904024206.jar\fr\jayasoft\ivy\conf\ivy.conf (e.g. by using winzip)
<ivyconf>
<conf defaultResolver="default" validate="false"/>
<include url="/ivyconf-public.xml"/>
<include url="/ivyconf-shared.xml"/>
<include url="/ivyconf-local.xml"/>
<include url="/ivyconf-main-chain.xml"/>
<include url="/ivyconf-default-chain.xml"/>
</ivyconf>
4. Edit the multiproject example ivy file
ivy-20060904024206\src\example\multi-project\projects\size\ivy
Add custom attribute 'foo'
<ivy-module version="1.0">
<info
organisation="jayasoft"
module="size"
status="integration"/>
<dependencies>
<dependency name="version" rev="latest.integration" conf="default" />
<dependency name="list" rev="latest.integration" conf="default->core" foo="bar" />
</dependencies>
</ivy-module>
5. Type ant publish-all and you get
C:\tools\ivy-20060904024206\src\example\multi-project>ant publish-all
Buildfile: build.xml
buildlist:
:: Ivy 20060904024206 - 20060904024206 :: http://ivy.jayasoft.org/ ::
no configuration file found, using default...
:: configuring :: url = jar:file:/C:/Documents and Settings/aro/.ant/lib/ivy-200
60904024206.jar!/fr/jayasoft/ivy/conf/ivyconf.xml
BUILD FAILED
C:\tools\ivy-20060904024206\src\example\multi-project\build.xml:6: impossible to
parse ivy file for C:\tools\ivy-20060904024206\src\example\multi-project\projec
ts\size\build.xml: ivyfile=C:\tools\ivy-20060904024206\src\example\multi-project
\projects\size\ivy.xml exception=java.text.ParseException: [xml parsing: file:/C
:/tools/ivy-20060904024206/src/example/multi-project/projects/size/ivy.xml:8:89:
cvc-complex-type.3.2.2: Attribute 'foo' is not allowed to appear in element 'de
pendency'. in file:/C:/tools/ivy-20060904024206/src/example/multi-project/projec
ts/size/ivy.xml
]
Total time: 1 second
To make sure that the valiate attribute is read, edit the ivy.xml file
<ivy-module version="1.0">
<info
organisation="jayasoft"
module="version"
status="integration"
baaz="foobar"/>
</ivy-module>
and type ant and it works.
Remove the validate="false" attribute in the ivyconf.xml file
and you get the following error (expected - proves that the validate attribute is used)
C:\tools\ivy-20060904024206\src\example\multi-project\projects\version>ant
Buildfile: build.xml
configure:
clean-lib:
[delete] Deleting directory C:\tools\ivy-20060904024206\src\example\multi-pro
ject\projects\version\lib
resolve:
[mkdir] Created dir: C:\tools\ivy-20060904024206\src\example\multi-project\p
rojects\version\lib
:: Ivy 20060904024206 - 20060904024206 :: http://ivy.jayasoft.org/ ::
no configuration file found, using default...
:: configuring :: url = jar:file:/C:/Documents and Settings/aro/.ant/lib/ivy-200
60904024206.jar!/fr/jayasoft/ivy/conf/ivyconf.xml
[null] [xml parsing: file:/C:/tools/ivy-20060904024206/src/example/multi-pr
oject/projects/version/ivy.xml:6:17: cvc-complex-type.3.2.2: Attribute 'baaz' is
not allowed to appear in element 'info'. in file:/C:/tools/ivy-20060904024206/s
rc/example/multi-project/projects/version/ivy.xml
[null] ]
BUILD FAILED
C:\tools\ivy-20060904024206\src\example\multi-project\common\common.xml:43: synt
ax errors in ivy file: java.text.ParseException: [xml parsing: file:/C:/tools/iv
y-20060904024206/src/example/multi-project/projects/version/ivy.xml:6:17: cvc-co
mplex-type.3.2.2: Attribute 'baaz' is not allowed to appear in element 'info'. i
n file:/C:/tools/ivy-20060904024206/src/example/multi-project/projects/version/i
vy.xml
]
Total time: 1 second
Also, see http://www.jayasoft.org/node/778
publish also removes all custom attributes.