ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Curdt <tcu...@apache.org>
Subject Re: accessing project dependencies in custom ant task
Date Mon, 15 Oct 2007 22:27:11 GMT
Hm ...I had a look into the testcases but I still find the API not  
that straight forward. Could you guys please help me to fill in the  
missing bits?

		final String config = "default";
	        final ResolveReport report = ivy.resolve(
	        	new File("ivy.xml").toURL(),
	        	null,
	        	new String[] { config },
	        	ivy.getDefaultCache(),
	        	null,
	        	true);

	        final ArtifactDownloadReport[] reports =  
report.getConfigurationReport(config).getDownloadReports(
===>			ivy.?????()
			);
	        final Artifact artifact = reports[0].getArtifact();
	        final File artifactFile = ivy.getArchiveFileInCache 
(ivy.getDefaultCache(), artifact);
	
	        final List nodes = report.getDependencies();
		for (Iterator it = nodes.iterator(); it.hasNext();) {
			final IvyNode node = (IvyNode) it.next();				
===>			final Artifact dep = ???
===>			final File depFile = ??
		}
cheers
--
Torsten

Mime
View raw message