Maven 1.x Ant Plugin
  1. Maven 1.x Ant Plugin
  2. MPANT-9

ant plug-in does not support proxy environments

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.9
    • Labels:
      None
    • Environment:
      WinNT, JVM 1.3, Ant 1.5 & Ant 1.6
    • Number of attachments :
      0

      Description

      When the ant plug-in produces a build.xml, the "maven.proxy.*" properties are not used in the generated build.xml file. The attached fix works in my environment.

      -Jan

      Index: src/plugin-resources/templates/build.jelly
      ===================================================================
      RCS file: /home/cvspublic/maven-plugins/ant/src/plugin-resources/templates/build.jelly,v
      retrieving revision 1.5
      diff -u -p -r1.5 build.jelly
      — src/plugin-resources/templates/build.jelly 16 Oct 2003 07:56:57 -0000 1.5
      +++ src/plugin-resources/templates/build.jelly 2 Feb 2004 20:13:19 -0000
      @@ -299,7 +299,13 @@
      name="get-deps"
      depends="init"
      unless="noget">

      • +
        + <setproxy
        + proxyhost="$

        {maven.proxy.host}

        "
        + proxyport="$

        {maven.proxy.port}

        "
        + proxyuser="$

        {maven.proxy.username}

        "
        + proxypassword="$

        {maven.proxy.password}

        "/>
        +
        <j:forEach var="dep" items="$

        {pom.dependencies}

        ">
        <!-- note: this is a valid use of artifactDirectory -->
        <get

        Activity

        Hide
        Arnaud Heritier added a comment -

        fixed. Thanks.

        Show
        Arnaud Heritier added a comment - fixed. Thanks.
        Hide
        patrick chanezon added a comment -

        what this feature generates is
        <!-Proxy settings works only with a JDK 1.2 and higher.->

        <setproxy proxyport="8080" proxyhost="proxy.toto.com">
        </setproxy>

        with the values of my proxy settings.

        I would prefer to have references to the properties this settings were set from:
        <setproxy proxyport="$

        {maven.proxy.port}

        " proxyhost="$

        {maven.proxy.host}

        ">
        </setproxy>

        Because usually when you generate a build.xml it is for others, not for you.

        Show
        patrick chanezon added a comment - what this feature generates is <!- Proxy settings works only with a JDK 1.2 and higher. -> <setproxy proxyport="8080" proxyhost="proxy.toto.com"> </setproxy> with the values of my proxy settings. I would prefer to have references to the properties this settings were set from: <setproxy proxyport="$ {maven.proxy.port} " proxyhost="$ {maven.proxy.host} "> </setproxy> Because usually when you generate a build.xml it is for others, not for you.
        Hide
        Arnaud Heritier added a comment -

        I agree with you.
        But the question is : can we consider to use maven properties in an Ant script?
        Shouldn't we use separate properties (ant.proxy...) ??

        Show
        Arnaud Heritier added a comment - I agree with you. But the question is : can we consider to use maven properties in an Ant script? Shouldn't we use separate properties (ant.proxy...) ??
        Hide
        dion gillard added a comment -

        It makes sense to use the maven properties, IMHO

        Show
        dion gillard added a comment - It makes sense to use the maven properties, IMHO
        Hide
        Arnaud Heritier added a comment -

        Ok. I'll modify it.

        Show
        Arnaud Heritier added a comment - Ok. I'll modify it.
        Hide
        Arnaud Heritier added a comment -

        We must replace the value of the maven properties by the maven properties themself.

        Show
        Arnaud Heritier added a comment - We must replace the value of the maven properties by the maven properties themself.
        Hide
        Arnaud Heritier added a comment -

        Will be fixed in 1.8.1

        Show
        Arnaud Heritier added a comment - Will be fixed in 1.8.1
        Hide
        Arnaud Heritier added a comment -

        I have a problem to resolve this issue.
        The properties proxyuser and proxypassword are available only in ant 1.6.
        So, is it annoying if the generated scripts are usable only with ant 1.6 ?

        Show
        Arnaud Heritier added a comment - I have a problem to resolve this issue. The properties proxyuser and proxypassword are available only in ant 1.6. So, is it annoying if the generated scripts are usable only with ant 1.6 ?
        Hide
        Arnaud Heritier added a comment -

        A new property maven.ant.compatibility is available if the user wants to generate a script compatible with ant 1.5.

        Show
        Arnaud Heritier added a comment - A new property maven.ant.compatibility is available if the user wants to generate a script compatible with ant 1.5.

          People

          • Assignee:
            Arnaud Heritier
            Reporter:
            Jan Nielsen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 5 minutes
              5m
              Remaining:
              Remaining Estimate - 5 minutes
              5m
              Logged:
              Time Spent - Not Specified
              Not Specified