ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "qxo (JIRA)" <j...@apache.org>
Subject [jira] Updated: (IVY-1244) ivy ArtifactRevisionId maven compatible improvement:add none jar(type!=jar,ext=jar) artifact with a default classifier (value= type)
Date Fri, 05 Nov 2010 03:20:41 GMT

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

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

    Description: 
{code}
    public ArtifactRevisionId(ArtifactId artfId, ModuleRevisionId mdlRevId, Map extraAttributes)
{
        super(null,   prepareExtraAttribute(artfId,extraAttributes)); //javadoc/sources 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();
            }
        	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
:)

ivyrepo + pom.xml    ==  maven repo
mavnrepo + ivy.xml  == ivyrepo

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}


  was:
MDArtifact:
{code}
    public MDArtifact(ModuleDescriptor md, String name, String type, String ext, URL url,
            Map extraAttributes) {
       //...
        if((!("jar".equals(type))&&"jar".equals(ext) )&& (extraAttributes
== null || !extraAttributes.containsKey("classifier"))){
            if( extraAttributes == null){
            	extraAttributes = new HashMap();
            }
        	extraAttributes.put("classifier", type);
        }
        this.extraAttributes = extraAttributes;
    }
{code}

now we use this 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}
publish artifactory to maven compatible  repo,we so can maven/ivy both with the same repo
:)

        Summary: ivy ArtifactRevisionId maven compatible improvement:add none jar(type!=jar,ext=jar)
artifact with a default classifier (value= type)  (was: ivy MDArtifact maven compatible improvement:add
none jar(type!=jar) artifact with a default classifier (value= type))

> ivy ArtifactRevisionId maven compatible improvement:add none jar(type!=jar,ext=jar) artifact
with a default classifier (value= type)
> ------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: IVY-1244
>                 URL: https://issues.apache.org/jira/browse/IVY-1244
>             Project: Ivy
>          Issue Type: Improvement
>            Reporter: qxo
>         Attachments: ArtifactRevisionId.java
>
>
> {code}
>     public ArtifactRevisionId(ArtifactId artfId, ModuleRevisionId mdlRevId, Map extraAttributes)
{
>         super(null,   prepareExtraAttribute(artfId,extraAttributes)); //javadoc/sources
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();
>             }
>         	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 :)
> ivyrepo + pom.xml    ==  maven repo
> mavnrepo + ivy.xml  == ivyrepo
> 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.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message