ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neil Lott <neilmatthewl...@yahoo.com>
Subject publishing a pom to the repository
Date Thu, 14 Feb 2008 19:58:35 GMT
I'm using a maven-style local repository and I'd like to keep it using  
pom files and not ivy.xml files.

In other words if I have an artifact in my repository, I'd like it to  
be identified by a pom-style xml file not an ivy-style xml file.

So here's an example from my repository:

[maven@azurite repository]$ cd joda-time/joda-time/
[maven@azurite joda-time]$ ls
1.5
[maven@azurite joda-time]$ cd 1.5/
[maven@azurite 1.5]$ ls
joda-time-1.5.jar  joda-time-1.5.pom
[maven@azurite 1.5]$ cat joda-time-1.5.pom
<?xml version="1.0" encoding="UTF-8"?>
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>joda-time</groupId>
  <artifactId>joda-time</artifactId>
  <version>1.5</version>
</project>

Here's what I've done.  Before I publish my artifact to the repository  
I do the following

			<ivy:makepom ivyfile="${basedir}/ivy.xml" pomfile="${basedir}/ 
module.pom">
			   <mapping conf="default" scope="server"/>
			</ivy:makepom>

	        <ivy:publish artifactspattern="@{jar-dir}/[artifact].[ext]"
	            resolver="local"
	            status="integration"
	            forcedeliver="true"
	 			overwrite="true"/>

But during my publish I always see:

[ivy:publish] 	published ivy to /home/maven/repository/twc/mas-coredn- 
ondemand/5.1/mas-coredn-ondemand-5.1.pom

This is confusing because in my resolver configurations my ivy pattern  
is set to look for poms

<ivysettings>
  <settings defaultResolver="chained" checkUpToDate="true" />

  <resolvers>
	<chain name="chained">
		<filesystem name="local" changingPattern="none" latest="latest-time">
			<ivy pattern="${ivy.settings.dir}/repository/[organisation]/ 
[module]/[revision]/[module]-[revision].pom"/>
        	<artifact pattern="${ivy.settings.dir}/repository/ 
[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"/>
	    </filesystem>		
		<ssh name="shared" user="maven" userPassword="maven"  
host="10.143.8.95" changingPattern="none" latest="latest-time">
			<ivy pattern="/home/maven/repository/[organisation]/[module]/ 
[revision]/[module]-[revision].pom"/>
        	<artifact pattern="/home/maven/repository/[organisation]/ 
[module]/[revision]/[artifact]-[revision].[ext]"/>
		</ssh>
	</chain>
  </resolvers>
</ivysettings>

Why would the publish task be smart enough to realize that if the  
extension is .pom then when a ivy-publish happens use the generated  
pom instead of pushing the ivy.xml file?

Thanks,

Neil



Mime
View raw message