Uploaded image for project: 'Ivy'
  1. Ivy
  2. IVY-1547

Exlusion of configurations (*,!myconf->@) not working

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 2.4.0
    • Fix Version/s: unspecified
    • Component/s: Core
    • Labels:
      None

      Description

      As described in Ivy manual section dependencies/dependency/conf (http://ant.apache.org/ivy/history/2.4.0/ivyfile/dependency.html):

      since 1.4 you can use * wildcard followed by negated configurations to mean all but xxx. For instance, '*, !A, !B -> X' means that X dependency configuration is required in all master configurations except A and B.

      I'm not sure if I understand it correctly, but in any way I tried this it doesn't work.

      Here is my ivy.xml, configurations are the same for Module A and B

      <ivy-module version="2.0"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
      	<info organisation="company" module="B" status="${ivyStatus}" branch="${branch}" />
          <configurations>
              <conf name="default" visibility="public" description="runtime dependencies and master artifact can be used with this conf" extends="runtime,master"/>
              <conf name="master" visibility="public" description="contains only the artifact published by this module itself, with no transitive dependencies"/>
              <conf name="compile" visibility="public" description="this is the default scope, used if none is specified. Compile dependencies are available in all classpaths." extends="third-party" />
              <conf name="runtime" visibility="public" description="this scope indicates that the dependency is not required for compilation, but is for execution. It is in the runtime and test classpaths, but not the compile classpath." extends="compile"/>
       		
       		<conf name="third-party" visibility="public" description="Resolves all 3rparty libraries like commons-io, etc." />
              <conf name="javadoc" visibility="public" description="javadoc deps" extends="javadoc-published" />
              <conf name="javadoc-published" visibility="public" description="javadoc deps"/>
              <conf name="source" visibility="public" description="contains a jar with sources. Could be helpful for debug." />
              <conf name="custom" visibility="public" description="not in use in here" />
          </configurations>
          <publications>
          </publications>
          <dependencies>
              <dependency org="prostep" name="A" rev="latest.integration" conf="*,!custom->@" branch="${branch}" />
      
              <dependency org="org.jsoup" name="jsoup" rev="1.8.1" conf="third-party->default;javadoc,javadoc-published->javadoc;source->sources" />
      
              <dependency org="com.sun.jersey" name="jersey-core" rev="1.19" conf="third-party->default;javadoc,javadoc-published->javadoc;source->sources" />
          </dependencies>
      </ivy-module>
      

      If I tried it this way I got:

      :: problems summary ::
      :::: WARNINGS
      		::::::::::::::::::::::::::::::::::::::::::::::
      
      		::          UNRESOLVED DEPENDENCIES         ::
      
      		::::::::::::::::::::::::::::::::::::::::::::::
      
      		:: company#A#product;revision-1.0: configuration not public in company#A#product;revision-1.0: 'custom'. It was required from company#B#product;working@DSK-13-019 custom
      
      		::::::::::::::::::::::::::::::::::::::::::::::
      

      If I make configuration 'custom' public I got no errors, but the configuration is resolved.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                Andreas F Andreas Felder
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: