0

I have (probably) problem with proper publishing of my artifact.
I have commons project, that downloads all needed dependencies:

    <dependency org="cz.px.iis" name="iis-core" rev="2.10" conf="default->default"/>
    <dependency org="cz.pse" name="is-wsclient" rev="1.2-SNAPSHOT" conf="default->default"/>

    <dependency org="org.apache.commons" name="commons-lang3" rev="3.3.2" conf="default->default"/>
    <dependency org="commons-io" name="commons-io" rev="2.4" conf="default->default"/>
    <dependency org="net.sf.opencsv" name="opencsv" rev="2.3" conf="default->default"/>
    <dependency org="net.sourceforge.jexcelapi" name="jxl" rev="2.6.12" conf="nodeploy->default"/>
    <dependency org="log4j" name="log4j" rev="1.2.17" conf="nodeploy->default" />

Now I publish the artifact:

    <ivy:deliver deliverpattern="ivy.xml" pubrevision="${revision}" status="${status}"  />
    <ivy:makepom ivyfile="ivy.xml" pomfile="${dist.dir}/pom.xml" />
    <ivy:resolve/>
    <ivy:publish resolver="${resolver}" 
                        update="true"
                        revision="${revision}"
                        overwrite="true" 
                        publishivy="true">
        <artifacts pattern="${dist.dir}/[artifact].[ext]"/>
    </ivy:publish>

But my dependent project doesn't retrive any jar from the above project - only commons project is downloaded.
I've tried publishing with publishivy="true" and publishivy="false", but the jars have been never downloaded. Also I was not able to publish pom.xml. Isn't ivy.xml file enough for ivy projects?

agad
  • 2,192
  • 1
  • 20
  • 32
  • I was able to publish *pom* file, but the dependencies are still not downloaded. – agad Jul 14 '14 at 14:11
  • Publishing is an upload action... What do you mean dependencies are not being downloaded??? Are you suggesting that dependencies should be downloaded and included with the published artifact? That is not how ivy (or Maven) repositories work. Please clarify your question and we may be able to help. – Mark O'Connor Jul 14 '14 at 19:49
  • @MarkO'Connor When I build *commons* project, all required jars are resolved - not only those directly listed in *ivy.xml*, but also those which listed jars are dependent on (eg. vaadin-server.jar). But when I build a project, which is dependent on *commons* project, only *commons.jar* is resolved and the project doesn't compile, because it requires *vaadin-server.jar*. I believe, that problem is in published *commons* project (its dependencies are not visible, despite the fact its *pom* in nexus looks correctly). – agad Jul 15 '14 at 06:03
  • Sounds like you're missing a mapping between ivy configurations and Maven scopes. This would help establish the correct dependency listing in the POM file generated by the makepom task. See: http://stackoverflow.com/questions/14210381/publishing-multiple-artifacts-to-maven-repository-using-ivy/14223726#14223726 – Mark O'Connor Jul 16 '14 at 00:19
  • @MarkO'Connor Thank you the problem was with mapping between ivy configurations and maven scopes. – agad Jul 16 '14 at 07:29

0 Answers0