ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Per Arnold Blaasmo <Per-Arnold.Blaa...@atmel.com>
Subject Using inline and keep adds caller and working?
Date Wed, 11 May 2011 08:02:49 GMT
Hi,

I try to use the property inline="true" and keep="true" when doing a
resolve from my ivy repository.

The line I am using in my ant build script is:

        <ivy:retrieve
            inline="true"
            keep="true"
            organisation="${ivy.organisation}"
            module="${ivy.module}"
            revision="build_number(${env.BUILD_NUMBER})"
            ivypattern="${ivy.module}-[revision](-[classifier]).[ext]"
           
pattern="${build.dir}/[artifact]-[revision](-[classifier]).[ext]"/>

NB! I have added a a <version-matcher> called 'build-nummer' t the
resolve definition in my ivy.settings file. That is why revision is set
like that.

All the correct artifacts is fetched, but two central properties are
being override.

Doing so adds "-caller" to the ivy.module property by overriding it.
The log says:
Overriding previous definition of property "ivy.module"
Setting project property: ivy.module -> <module.name>-caller

Also the ivy.revision gets override to the value "working"
The log syas:
Overriding previous definition of property "ivy.revision"
Setting project property: ivy.revision -> working

Why does it do that?
I would expect it to keep the module name and set the revision to the
resolved revision number, or at least keep the revision number from the
ivy.xml file?

In the code tree of ivy i find in the main.java file the following:

            File ivyfile;
            if (line.hasOption("dependency")) {
                String[] dep = line.getOptionValues("dependency");
                ivyfile = File.createTempFile("ivy", ".xml");
                ivyfile.deleteOnExit();
                DefaultModuleDescriptor md = DefaultModuleDescriptor
                       
.newDefaultInstance(ModuleRevisionId.newInstance(dep[0],
                            dep[1] + "-caller", "working"));
                DefaultDependencyDescriptor dd = new
DefaultDependencyDescriptor(md,
                        ModuleRevisionId.newInstance(dep[0], dep[1],
dep[2]), false, false, true);

This it apparently is where this is happening. But there does not seem
to be any explanation about why it is done? I assume it has something to
do with 'line.hasOption("dependency")' but I can not see where that
comes from and why?

Can someone please explain this to me?

Regards

Per A.


Mime
View raw message