ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Marks <>
Subject Re: IvyDE Source Attachments?
Date Fri, 30 Oct 2009 16:20:53 GMT
I got this to work in a bit of a different way.  Not sure if it's really
correct, but it publishes to our Maven repo correctly (also have it
publishing javadoc this way).  Let's take my project for some additional
unit test functions called unit-test-utils
After my base build, but before my publish, the build directory looks like:
  - jar
      - unit-test-utils.jar
  - javadoc
      - unit-test-utils.jar
  - source
      - unit-test-utils.jar

In ivy.xml, do the following:
   add 'xmlns:m=""' to the ivy-module element

  then my publications look like:
  <artifact conf="default" name="unit-test-utils" type="jar" ext="jar"  />
  <artifact conf="default" name="unit-test-utils" type="source" ext="jar"
m:classifier="sources" />
  <artifact conf="default" name="unit-test-utils" type="javadoc" ext="jar"
m:classifier="javadoc" />

In ivysettings.xml, my publishing resolver looks like:
<url name="publish_snapshot" m2compatible="true">

Finally, my publishing target in ant looks like:
<ivy:publish pubrevision="${ivyPubRevision}" resolver="publish_snapshot"
update="true" overwrite="true">
      <artifacts pattern="${build.dir}/[type]/[artifact].[ext]" />

Once I do this, then IvyDE pulls the source into the other projects that
rely on this project.

Hope this helps.


On Fri, Oct 30, 2009 at 6:51 AM, Craig Setera <> wrote:

> I've been reading with some interest the conversation about source (as conf
> or type).  I'm not really too worked up about which way to represent them,
> but I'm very interested in getting source attachments working in IvyDE now
> that I know it should be possible.  Unfortunately, I'm having trouble
> getting it to actually work and I'm not sure what is going on.  I have
> defined my artifacts as:
> <publications>
> <artifact name="mb-common" ext="jar" type="jar" conf="dist"/>
> <artifact name="mb-common-src" ext="jar" type="source" conf="dist"/>
> </publications>
> In stepping through the Ivy code, I can see that it has found the
> appropriate source artifact going into the
> PreferenceStoreInfo#getSourceAttachment:
> /Users/setera/.ivy2/adhoc/repository/mfoundry.mbanking/mb-common/2.1.13/jars/mb-common-2.1.13-src.jar
> When stepping into:
>    public IPath getSourceAttachment(Path path) {
>        String srcPath = preferenceStore.getString(path.toPortableString() +
> Unfortunately, this always seems to return the project as the root, which
> isn't correct in this case:
> /MB_Common
> I'm not entirely sure what is going on or what those project-level
> preferences should be doing.  Can anyone shed some light on this?
> Thanks,
> Craig

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message