ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "qxo (Updated) (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (IVY-1244) ivy ArtifactRevisionId maven compatible improvement:add none jar(type!=jar and ext=jar) artifact(eg:type=sources,type=javadoc) with a default classifier (classifier = type)
Date Thu, 01 Dec 2011 06:01:42 GMT

     [ https://issues.apache.org/jira/browse/IVY-1244?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

qxo updated IVY-1244:
---------------------

    Attachment: IVY-1244-patch.txt

patch for ivy 2.2 tag
                
> ivy ArtifactRevisionId maven compatible improvement:add none jar(type!=jar and ext=jar)
artifact(eg:type=sources,type=javadoc) with a default classifier (classifier = type)
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: IVY-1244
>                 URL: https://issues.apache.org/jira/browse/IVY-1244
>             Project: Ivy
>          Issue Type: Improvement
>            Reporter: qxo
>         Attachments: ArtifactRevisionId.java, IVY-1244-patch.txt
>
>
> {code}
>     public ArtifactRevisionId(ArtifactId artfId, ModuleRevisionId mdlRevId, Map extraAttributes)
{
>         super(null,   prepareExtraAttribute(artfId,extraAttributes)); //add "javadoc/sources"
a maven2 classifier compatible
>         artifactId = artfId;
>         mrid = mdlRevId;
>         setStandardAttribute(IvyPatternHelper.ORGANISATION_KEY, getModuleRevisionId()
>                 .getOrganisation());
>         setStandardAttribute(IvyPatternHelper.MODULE_KEY, getModuleRevisionId().getName());
>         setStandardAttribute(IvyPatternHelper.REVISION_KEY, getModuleRevisionId().getRevision());
>         setStandardAttribute(IvyPatternHelper.ARTIFACT_KEY, getName());
>         setStandardAttribute(IvyPatternHelper.TYPE_KEY, getType());
>         setStandardAttribute(IvyPatternHelper.EXT_KEY, getExt());
>     }
> 	public static Map prepareExtraAttribute(ArtifactId artfId,Map extraAttributes) {
> 	    final String type = artfId.getType();
>         final String ext = artfId.getExt();
>         if((!("jar".equals(type))&&"jar".equals(ext) )&& (extraAttributes
== null || !extraAttributes.containsKey("classifier"))){
>         	if( extraAttributes == null){
>         		extraAttributes = new HashMap();
>             }else{
>             	extraAttributes = new HashMap(extraAttributes);
>             }
>         	extraAttributes.put("classifier", type);
>         }
>         return extraAttributes;
>     }
> {code}
> after this change now:
> publish artifactory to maven compatible  repo,we so can maven/ivy both with the same
 repo :)
> and we can aslo using same local(cached)repo for maven and ivy
> ivyrepo + pom.xml   ==  maven repo
> mavnrepo + ivy.xml  == ivyrepo
> and ivysettings.xml cache artifactPattern can using same layout with maven2
> artifactPattern="[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]"
> and the ivy settings:
> {code}
> 		<url name="repos"  m2compatible ="true"    checkmodified="true" >
> 			<ivy pattern="${baseUri}/[organisation]/[module]/[revision]/[module]-ivy-[revision].xml"
/>
> 			<artifact pattern="${baseUri}/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]"
/>
> 		</url>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message