ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snowflake <needsmores...@gmail.com>
Subject Re: Location of configuration files as artifacts
Date Mon, 11 May 2009 21:15:49 GMT
Thanks. I decided to use different types to distinguish the different
artifacts for different confs/views and alter my artifact pattern in the
publish tag to pick them up.  I no longer need to copy the manually to the
build directory.  Please have a look at the configuration below as a few
problems still exist.

ivy.xml:

    <publications>

        <artifact name="ivyplay" type="config"         conf="default"
ext="conf" />
        <artifact name="ivyplay"  type="configDeploy"   conf="deploy"
ext="conf"/>
        <artifact name="ivyplay"    type="configTest"     conf="test"
ext="conf"/>

        <artifact name="ivyplay" type="jar" ext="jar" />
    </publications>

build.xml:

<ivy:publish resolver="myrepository" pubrevision="${revision}"
status="release">

            <artifacts pattern="${conf.dir}/[artifact].[ext]"  />
            <artifacts pattern="${conf.dir.test}/[artifact].[ext]"  />
            <artifacts pattern="${conf.dir.deploy}/[artifact].[ext]"  />

            <artifacts pattern="${build.dir}/[artifact].[ext]" />

</ivy:publish>

my resolver pattern which partitions the artifacts by their types and allows
me to keep track of different module revisions in different folders:

<artifact
pattern="${dest.repo.dir}/no-namespace/[organisation]/[module]/[module]-[revision]/[type]s/[artifact].[ext]"
/>


a couple problems still remain:

1.) if I have files with the same name under the different configurations
and types (i.e. ivyplay.conf both in conf.dir and conf.dir.test), then the
first resolved file (from conf.dir) is used for all successive
dependencies.  In this case all three folders (conf.dir, conf.dir.test, and
conf.dir.deploy) will contain the ivyplay.conf file of (conf.dir).

2.) perhaps this should go in another thread, but:   Is it possible to have
different patterns for different artifacts.  For example, as Joshua
suggested, I can remove the revision from my pattern, but this results in
the revision being removed from all types of artifacts (including my jar
files).  I wish to keep the revision for jars, BUT remove it from
configuration files (as manual work will be required during deployment to
strip them in order for programs to function properly).  I tried a few
things with chained resolvers without any results.  I tried setting up two
resolvers, each with it's own pattern, but I'm not able to have two
different publish tasks (one for jars, and one for artifacts) each of which
would use a different resolver.

Any suggestions are very appreciated.  Thank you all in advance for your
support.

-Sam

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