I'm using maven-antrun-plugin to execute targets in an external Ant build file, 
and having an issue with inherited properties.

      <configuration>
          <skip>${skipIvyPublish}</skip>
          <target name="ivy.publish">
              <echo message="resolver: ${ivy.publish.resolver}"/>
              <property name="ivy.publish.resolver" 
value="${ivy.publish.resolver}"/>
              <echo message="resolver: ${ivy.publish.resolver}"/>
              <ant antfile="${ivy.dependencies.dir}/ivy-build.xml"
                  target="ivy.publish"
                  inheritAll="true"
                  inheritRefs="true"/>
          </target>
      </configuration>

As you might guess from the above, I have a property in my pom.xml named 
ivy.publish.resolver. The two echo lines here show the correct value (either 
the default from my pom.xml or what I supply to Maven with 
-Divy.publish.resolver). But within the ivy-build.xml the very first task 
executed (the init: target in the output below) is the same echo statement, and 
inevitably the property value is always the default from pom.xml, ignoring what 
I've set with -D command-line argument. 

    [INFO] --- maven-antrun-plugin:1.8:run (ivy-publish) @ maven-ivy-example ---
    [INFO] Executing tasks

    ivy.publish:
         [echo] resolver: fred
         [echo] resolver: fred

    init:
         [echo] resolver: published.local

Any suggestions?

----------------------------------------------------------------------
This e-mail, including any attached files, may contain confidential and 
privileged information for the sole use of the intended recipient.  Any review, 
use, distribution, or disclosure by others is strictly prohibited.  If you are 
not the intended recipient (or authorized to receive information for the 
intended recipient), please contact the sender by reply e-mail and delete all 
copies of this message.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to