ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Rekk <konstantin.r...@gbv.de>
Subject Followup question: publish and deliver - how to force status in dependency
Date Fri, 19 Dec 2008 14:05:14 GMT
Hello,

regarding my last questions about delivering artefacts to reposistories
with ivy I 
created a quick$dirty sketch:

http://www.rekk.de/bloggy/wp-content/uploads/2008/12/ivy_publish.png


I am an ivynewbie and I didn't get the complete picture until now. Any
help would be much appreciated. Please also correct me if I am
approching this issue from a wrong direction!

So once more the question:

How to publish consistently to different level repositories during the
build process? Consistently - means lower level rep artefacts will only
list dependencies in static ivy files from artefacts of same or higher
status/rep.

Suppose there are three build quality steps:
developer -> goes to local rep, integration -> goes to shared rep,
production-ready goes to public rep

So there are different ant targets or builds: building local should call
publish-local on success, building integration should publish
publish-integration on success, building production should publish a
release or milestone to public on success.

How exactly (or is there a recommended way) to control this process from
ivy (replacing dynamic ivy files by static during publishing)?

1) using different chains or different ivysetting.xml to force artefact
resolution
2) using different dynamic ivy files according to build level, set rev
there
3) using deliver task in some way to force right status of dependency
(the documentation provides only one example here, so not easy to get
the direction here, 
http://ant.apache.org/ivy/history/latest-milestone/use/deliver.html
)?

Before jumping in testing all three I would like to ask the experts
here.

Thanks in advance!


-------- Forwarded Message --------
From: Konstantin Rekk <konstantin.rekk@gbv.de>
To: ivy-user@ant.apache.org
Subject: question: publish and deliver - how to force status in
dependency
Date: Thu, 18 Dec 2008 15:43:06 +0100

Hello,

I am a little confused about the generation of ivy files during (ant)
publish task (playing around with example
apache-ivy-2.0.0-rc2/src/example/multi-project/ ):

Citation from: 
http://ant.apache.org/ivy/history/latest-milestone/use/deliver.html

"If a deliver target is set, then it is called (via an antcall) for each
dependency which has not a suffisant status compared to the deliver
status set for this task. This means that if you deliver an integration
revision, no recursive delivery will be done."

Is my expectation right, that in case of using status release for
publishing as in common.xml:
    <!-- ================================= 
          target: publish              
         ================================= -->
    <target name="publish" depends="clean-build, jar" description="-->
publish this project in the ivy repository">
    	<ivy:publish artifactspattern="${build.dir}/[artifact].[ext]" 
    			           resolver="shared"
    			           pubrevision="${version}" 
    			           status="release"
    	/>
        <echo message="project ${ant.project.name} released with version
${version}" />
    </target>

would force inclusion of dependencies with status release as well?

But look at the generated
multi-project/repository/shared/org.apache.ivy.example/console/1.0-dev-b5/ivys/ivy.xml :

<ivy-module version="1.0">
    <info organisation="org.apache.ivy.example" module="console"
revision="1.0-dev-b5" status="release" publication="20081217191943"/>
    <dependencies>
      <dependency name="version" rev="1.0-dev-b3"
revConstraint="latest.integration" conf="default"/>
      <dependency name="list" rev="1.0-dev-b3"
revConstraint="latest.integration" conf="default->standalone"/>
      <dependency name="find" rev="1.0-local-20081217183846"
revConstraint="latest.integration" conf="default->standalone"/>
      <dependency name="sizewhere" rev="1.0-dev-b3"
revConstraint="latest.integration" conf="default->standalone"/>
    </dependencies>
</ivy-module>

Please, could somebody here give me a hint, what's the best way to force
generated dependencies:
- status release -> include only release (publish on public)
- status milestone -> include only milestone and above (publish shared)
- status integration -> latest.integration and above (publish local)

Does this approach makes sense at all?

Thanks a lot!

Konstantin


-- 
Konstantin Rekk
VZG (GBV), Göttingen, Berlin
0176 2100 6000
030 29003511
skype: krekk1970 
rekk@gbv.de
http://www.gbv.de


Mime
View raw message