You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by "KARR, DAVID" <dk...@att.com> on 2014/01/28 01:20:03 UTC

How to publish additional metadata with an artifact that is needed at retrieve time

I'm trying to envision how I can use Ivy for ATG Dynamo module dependencies.

For background, retrieving a dependent ATG module requires getting the lib, config, and manifest pieces and copying them into a directory in your local ATG tree with a directory name dependent on the artifact you're retrieving.  The directory name to use is available in a properties file that is available when the module is built.

I'm ok with the separate "lib, config, and manifest" pieces, because all of those are packaged in a single "build" directory when building the module.

However, when retrieving this artifact, I'm unsure how to deal with knowing what directory in the ATG tree to unzip (not to mention knowing to unzip, not just to copy) the artifact to.  This information is available when building the module, so it can be available when publishing.

I suppose I could publish an additional file in the zip file which is the properties file used in the build of the module.  My task which retrieves the artifact could first retrieve the zip, unpack it into a temp directory, read the properties file that I unpacked, and then copy in everything but the properties file into the target directory.

I know that most of you won't be familiar with ATG Dynamo, but does any of this make sense?

Re: How to publish additional metadata with an artifact that is needed at retrieve time

Posted by Marc De Boeck <md...@gmail.com>.
Maybe, you can add a buildfile to the package that your publishing ? When
you retrieve that package, you can unzip it and execute the included
buildfile to do what needs to be done with that package. That buildfile can
also read the property file.

Or you might also publish your packages in a package format that is known
by a package manager (e.g. rpm, debian-packages when you are on linux).

Regards,
Marc



2014-01-28 KARR, DAVID <dk...@att.com>

> I'm trying to envision how I can use Ivy for ATG Dynamo module
> dependencies.
>
> For background, retrieving a dependent ATG module requires getting the
> lib, config, and manifest pieces and copying them into a directory in your
> local ATG tree with a directory name dependent on the artifact you're
> retrieving.  The directory name to use is available in a properties file
> that is available when the module is built.
>
> I'm ok with the separate "lib, config, and manifest" pieces, because all
> of those are packaged in a single "build" directory when building the
> module.
>
> However, when retrieving this artifact, I'm unsure how to deal with
> knowing what directory in the ATG tree to unzip (not to mention knowing to
> unzip, not just to copy) the artifact to.  This information is available
> when building the module, so it can be available when publishing.
>
> I suppose I could publish an additional file in the zip file which is the
> properties file used in the build of the module.  My task which retrieves
> the artifact could first retrieve the zip, unpack it into a temp directory,
> read the properties file that I unpacked, and then copy in everything but
> the properties file into the target directory.
>
> I know that most of you won't be familiar with ATG Dynamo, but does any of
> this make sense?
>

RE: How to publish additional metadata with an artifact that is needed at retrieve time

Posted by "KARR, DAVID" <dk...@att.com>.
> -----Original Message-----
> From: opatry [mailto:olivier.patry@gmail.com]
> Sent: Tuesday, January 28, 2014 12:57 AM
> To: ivy-user@ant.apache.org
> Subject: Re: How to publish additional metadata with an artifact that is
> needed at retrieve time
> 
> Hi,
> 
> If I understand your needs, you want to store some properties alongside your
> binary modules in the repository so that you can use them when retrieving
> your binaries.
> 
> You don't necessarily have to zip your binaries when publishing them, you
> can push the properties file near your other binaries as is.
> 
> When retrieving your module, you can then load such properties file without
> post processing anything.

Ok, can you please elaborate on this, both how I would publish like this, and what I have to do on retrieve?

> Another solution is to use the extra attributes of Ivy
> http://ant.apache.org/ivy/history/latest-milestone/concept.html#extra

I see the basic idea, but there are several pieces that are not clear to me.  First, can I load properties files IN the ivy.xml, so I can do something like "e:deployDir=${deploy.dir}", where "deploy.dir" is a property defined in the properties file?  Second, how would I use this on retrieve to properly copy the artifact to the destination?


Re: How to publish additional metadata with an artifact that is needed at retrieve time

Posted by opatry <ol...@gmail.com>.
Hi,

If I understand your needs, you want to store some properties alongside your
binary modules in the repository so that you can use them when retrieving
your binaries.

You don't necessarily have to zip your binaries when publishing them, you
can push the properties file near your other binaries as is.

When retrieving your module, you can then load such properties file without
post processing anything.

Another solution is to use the extra attributes of Ivy
http://ant.apache.org/ivy/history/latest-milestone/concept.html#extra




--
View this message in context: http://apache-ivy.996301.n3.nabble.com/How-to-publish-additional-metadata-with-an-artifact-that-is-needed-at-retrieve-time-tp9601p9602.html
Sent from the ivy-user mailing list archive at Nabble.com.