I'm working on the same set of problems described in my earlier "How to publish 
additional metadata ..." note.  I'd appreciate any responses with concrete 
examples to demonstrate how I should do this.

At the conclusion of the build, I need to publish the entire contents of the 
"build" directory, along with a properties file ("env/default.properties") that 
isn't generated by the build, but which describes where the build product has 
to be installed before EAR assembly.  When this "build" directory is eventually 
retrieved at some later time, that same structure needs to be installed at the 
absolute path described by one of the properties in that 
"env/default.properties" file.

If it matters, the "build" directory contains four directories, two of which 
contains jar files used for different purposes, one of which contains a 
directory that contains a text file (special manifest file), and the last 
contains a directory tree of properties files.

The entire build will have several similarly structured modules.  I'm pretty 
sure the target that does the "ivy:publish" can be defined in a "base" build 
script that all the module build scripts import.

I imagine the "ivy.xml" for each module would have a "publications" element 
that specifies the two (?) pieces that are being published, being the "build" 
directory and the "env/default.properties" file.  I've never seen an example 
that publishes a directory, is that possible?  If not, then I would guess that 
I'd have to specify more processing and detail in the "ivy:publish" target, 
such that I would first zip up the "build" directory and the 
"env/default.properties" file both into a zip file and publish that as the 
single artifact.  Is this more likely?

I've considered the fact that the "env/default.properties" file really only 
holds one property (ok two, but I don't care about the other one).  It might 
make sense to instead define that property value in "extra" attributes in the 
"ivy.xml" and drop the "env/default.properties" file entirely.  However, that 
sort of combines two concerns, being the description of the artifact and its 
dependencies, along with where the artifact gets installed to for EAR assembly.

One minor detail: I didn't see in the "publish" documentation how you specify 
where the "ivysettings.xml" file is found.  Where is that specified for this?

Reply via email to