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 Drhender <Dr...@live.com> on 2014/01/22 05:28:56 UTC

Preserving folder structure in Ivy

I have a need to put files into Ivy, such that the sub folder structure is
preserved in the Ivy repository and also in the target machine when I pull
those files back out.

For example, assume I have the following files in my project:
Directory1/en/index.html
Directory1/en/about.html
Directory1/jp/index.html
Directory1/jp/about.html

I'd like the existing structure to be reflected in the Ivy repository and
restored when pulled into the cache of the target machine.

Can this be accomplished?  Can someone point me to ivy documents that
provides instructions/examples?

Thanks!
David




--
View this message in context: http://apache-ivy.996301.n3.nabble.com/Preserving-folder-structure-in-Ivy-tp9599.html
Sent from the ivy-user mailing list archive at Nabble.com.

Re: Preserving folder structure in Ivy

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

is your "Directory1" something relevant according to your module? or just an
input/output directory that can be named anything?

For the en/jp, you can use extra attributes
(http://ant.apache.org/ivy/history/2.2.0/concept.html#extra) to reference
the language of your HTML files. You'll then have to update your resolver &
cache pattern (in your ivysettings.xml file) to reference such attribute in
your repository layout.

For instance: [module]/[revision]/[lang]/[artifact].[ext]

I'm not sure that you can force the way the artifacts are retrieved (maybe
you can define a default value that overrides the Ivy default one). So the
end user may use another pattern.

If you do not control the repository layout and so can't refer to any extra
attribute, you may want to use the maven classifier (which is most of the
time available in Ivy repositories but not all the time), still you won't be
able to change the default layout (which is, if I'm right,
[artifact](-[classifier]).[ext]).



--
View this message in context: http://apache-ivy.996301.n3.nabble.com/Preserving-folder-structure-in-Ivy-tp9599p9600.html
Sent from the ivy-user mailing list archive at Nabble.com.