You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by Kirby Files <kf...@masergy.com> on 2008/07/25 15:53:39 UTC

Publishing sources

Folks,
   Could I please get some advice on publishing -sources artifacts to 
a repo? While IvyDE recognizes source, javadoc, etc as valid artifact 
types, I'm getting no love from the ivy:publish task when using these.

I tried to use the following publish task:
   <target name="publish" depends="resolve" description="--> publish 
this project in the ivy repository">
       <property name="revision" value="${version}"/>
       <ivy:publish 
artifactspattern="${dist.dir}/[type]s/[artifact]-[revision].[ext]"
           resolver="masrep_sftp"
           pubrevision="${revision}"
           status="release"
           overwrite="true"
           update="true"
       />
       <echo message="project ${ant.project.name} released with 
version ${revision}" />
   </target>

And in my ivy.xml, I defined these artifacts:

<publications>
   <artifact type="jar" ext="jar" conf="build" />
   <artifact type="source" ext="jar" conf="build" />
</publications>

My directory looks like

dist/jars/myproj-1.0.jar
dist/sources/myproj-1.0.jar

The binary jar publishes fine, along with its ivy.xml. However, the 
source jar is completely ignored. I'm sure others are successfully 
publishing sources, so what am I doing wrong?

Thanks,
   --kirby

Re: Conflict Management w// Extra Attributes

Posted by Ross Camara <rm...@us.ibm.com>.
In case anyone else runs into this problem. The problem was eventually
traced to collisions in the repository cache. Once we updated the cache
pattern settings in our settings.xml file we could correctly use the
attribute in our dependencies.

Ross Camara
Software Developer
rmcamara@us.ibm.com


                                                                                                                                             
  From:       Ross Camara/Arlington/IBM@IBMUS                                                                                                
                                                                                                                                             
  To:         ivy-user@ant.apache.org                                                                                                        
                                                                                                                                             
  Date:       07/29/2008 03:55 PM                                                                                                            
                                                                                                                                             
  Subject:    Conflict Management w// Extra Attributes                                                                                       
                                                                                                                                             





I've run into a problem with specifying dependencies. I have two modules
that look exactly the same (name, revision, organization) with the
exception of an extra attribute. This extra attribute is used to tell the
modules apart. Specifically it is a 'platform' attribute. I am able to
setup and publish into my repository using this extra attribute. However
when I want to make use of these two components in another component I've
run into a problem. Specifically when i specify:

      <dependencies>
            <dependency extra:platform="independent" org="net.sourceforge"
name="projectX" rev="3.8.1" conf="*->win32"/>>
            <dependency extra:platform="redhat" org="net.sourceforge" name=
"projectX" rev="3.8.1" conf="*->examples"/>
      </dependencies>
When i use this definition ivy will download which ever platform was
published last and ignores any the other module. I've specified a conflict
manager of 'all' however this doesn't seem to be solve my problem of only
one of the platforms showing up.

Am I missing something? Is this a bug? Or is this use case just not
supported and unlikely to be?

I'm using version 675235 of the ivy trunk.

Ross Camara
Software Developer
(703) 390-9923
rmcamara@us.ibm.com





Conflict Management w// Extra Attributes

Posted by Ross Camara <rm...@us.ibm.com>.
I've run into a problem with specifying dependencies. I have two modules
that look exactly the same (name, revision, organization) with the
exception of an extra attribute. This extra attribute is used to tell the
modules apart. Specifically it is a 'platform' attribute. I am able to
setup and publish into my repository using this extra attribute. However
when I want to make use of these two components in another component I've
run into a problem. Specifically when i specify:

      <dependencies>
            <dependency extra:platform="independent" org="net.sourceforge"
name="projectX" rev="3.8.1" conf="*->win32"/>>
            <dependency extra:platform="redhat" org="net.sourceforge" name=
"projectX" rev="3.8.1" conf="*->examples"/>
      </dependencies>
When i use this definition ivy will download which ever platform was
published last and ignores any the other module. I've specified a conflict
manager of 'all' however this doesn't seem to be solve my problem of only
one of the platforms showing up.

Am I missing something? Is this a bug? Or is this use case just not
supported and unlikely to be?

I'm using version 675235 of the ivy trunk.

Ross Camara
Software Developer
(703) 390-9923
rmcamara@us.ibm.com