ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Tharp <joshua-th...@alumni.calpoly.edu>
Subject Re: Location of configuration files as artifacts
Date Sat, 09 May 2009 01:57:25 GMT
I can't help with the different config files and types... but the revision
number is specified in your ivysettings.xml file or in your publish task.
You currently have a pattern defined (perhaps by the default settings) that
looks something like [artifact]-[revision].[ext] just change it to
[artifact].[ext] and you will lose the revision number in your file names.

On Fri, May 8, 2009 at 4:39 PM, snowflake <needsmoresnow@gmail.com> wrote:

> Hi,
>
> I am not sure how I can set the location of different artifacts which I
> want
> to publish.  I tried a hack, which was to have my publish target copy my
> configuration files that I want to publish to the build directory.  I am
> very new to Ivy and would appreciate any suggestions.
>
> I would like different configuration types to match my different ivy
> views/configurations.  Here is how my ivy.xml is set up:
>
>  <configurations>
>        <conf name="default" visibility="public" />
>        <conf name="deploy" visibility="public" />
>        <conf name="test" visibility="public" />
> </configurations>
>
>
> <publications>
>        <artifact name="ivyplay" type="defaultConfigFile"   conf="default"
> ext="conf" />
>        <artifact name="ivyplay"  type="deployConfigFile"   conf="deploy"
> ext="conf"/>
>        <artifact name="ivyplay"    type="testConfigFile"   conf="test"
> ext="conf"/>
>
>        <artifact name="ivyplay" type="jar" ext="jar" />
> </publications>
>
>
> As a result, in my repository i would like to see under my project, three
> directories, "defaultConfigFiles" , "deployConfigFiles", and
> "testConfigFiles".
>
> The problem is, I have files with the same exact name, and thus my simple
> copying them all to the build directory does not work.
>
> I looked at the documentation and noticed you can set a url for each
> artifact, but I don't believe that will solve my problem.  I just need to
> somehow notify the publish task of the location(s) of my configuration
> files.  I even tried a different publish task for each configuration type
> to
> no avail:
>
> <ivy:publish artifactspattern="${build.dir}/[artifact].[ext]"
> resolver="my-repository" pubrevision="${revision}" status="release" />
> <ivy:publish artifactspattern="${conf.dir}/[artifact].[ext]"
> resolver="my-repository" pubrevision="${revision}" status="release" />
> <ivy:publish artifactspattern="${test.conf.dir}/[artifact].[ext]"
> resolver="my-repository" pubrevision="${revision}" status="release" />
> ...
>
>
> In general, how does one go about handling configuration files such as
> these?  Also, how does one go about removing the revision numbers appended
> to the file names of the configuration artifacts?  I'm sure this can be
> done
> manually at some point but is there a better way?  For example, my project
> my publish mysql.properties-1.conf , but in the code i'm simply looking for
> mysql.properties
>
>
> any suggestions?
>
> thanks,
>
> Sam
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message