Dear maven community,

 

I was never expecting that maven is using it's own ANT !

 

We are facing problems with ANT_171 on OpenVMS; 

ANT 1.7.1 was unable to do a <GET properly when located behind a firewall !

For that to reach out to the world it is said on many places / document that 
one can 

set the following JVM switches to pass / reach out through a Firewall

 

And now it comes: 

 

For ANT one is told to use

-Dhttp.proxyHost=myproxy

-Dhttp.proxyPort=8080

-Dhttp.proxyUser=Sepp

-Dhttp.proxyPassword=mypassword

 

And different so one cannot use a common variable for booth

 

For MAVEN one is told to use

-Dhttp.proxyhost=myproxy

-Dhttp.proxyport=8080

-Dhttp.proxyuser=Sepp

-Dhttp.proxypassword=mypassword

 

 

ANT does not take http.proxyUser and http.proxyPassword into account! 

 

For that to correct we added an Authenticator to our AntClassLoader.class ANT, 
reading http.proxyUser and http.proxyPassword from the system environment and 
setting up the Authenticator.

 

So we wrote our own AntClassLoader.class which creates an Authenticator and 
then calls the AntLauncher.class from the installed ANT version.

 

AND it works and standard ANT_171 was able to execute <GET's to remote files 
through the firewall without a need to justify al and every build.xml

 

 

Now with maven it just did not work and the reason why is: "Maven uses it's own 
ANT lib files !!!"

 

I was not expecting that maven reinvents the wheel.

 

So then - be it as it is --- how can we enforce maven to use a particular 
installed ANT version and not use the maven-internal ANT ?

And how can we debug ANT when called from maven. Maven has a mvnDebug.bat and 
we can make a antDebug.bat but this would imply that ANT is not forked somehow 
but called via a command.

 

Josef

 

 

And by text below, this gets fostered by Philippe which helps me a lot to make 
maven install Axis2 on OpenVMS 

 

 

 

-----Ursprüngliche Nachricht-----
Von: Philippe Vouters [mailto:philippe.vout...@laposte.net] 
Gesendet: Donnerstag, 29. September 2011 16:36
An: Stadelmann Josef
Betreff: Shit !!!

 

-----BEGIN PGP SIGNED MESSAGE-----

Hash: SHA1

 

Josef,

 

Maven downloads its own 1.8.1 Ant code to execute this attached pom.xml ant 
tasks. 

I shall have to find out a way Maven uses my own ant-1.7.1 jars. This is still 
in the goal of Maven/Ant Axis-2 build. 
First I shall try to modify the pom.xml so that it invokes ant to execute a 
build.xml as suggested as best in the plexus code extract you sent me.

 

Philippe

 

bash$ export M2_HOME=$HOME/apache-maven-2.2.1 bash$ mvn install ...

Downloading:

http://repo1.maven.org/maven2/org/apache/ant/ant-nodeps/1.8.1/ant-nodeps-1.8.1.pom

 

Downloading:

http://repo1.maven.org/maven2/org/apache/ant/ant-parent/1.8.1/ant-parent-1.8.1.pom

 

Downloading:

http://repo1.maven.org/maven2/org/apache/ant/ant/1.8.1/ant-1.8.1.pom

 

Downloading:

http://repo1.maven.org/maven2/org/apache/ant/ant-launcher/1.8.1/ant-launcher-1.8.1.pom

 

Downloading:

http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-utils/2.0.5/plexus-utils-2.0.5.jar

Downloading:

http://repo1.maven.org/maven2/org/apache/ant/ant-nodeps/1.8.1/ant-nodeps-1.8.1.jar

 

Downloading:

http://repo1.maven.org/maven2/org/apache/ant/ant/1.8.1/ant-1.8.1.jar

 

 

Downloading:

http://repo1.maven.org/maven2/org/apache/ant/ant-launcher/1.8.1/ant-launcher-1.8.1.jar

...

 

[INFO] [antrun:run {execution: compile}] [INFO] Executing tasks

 

main:

     [echo] compile classpath: /PHV/PHV/target/classes

     [echo] runtime classpath: /PHV/PHV/target/classes

     [echo] test classpath:

/PHV/PHV/target/test-classes:/PHV/PHV/target/clas

ses

     [echo] plugin classpath:

/PHV/PHV/.m2/repository/org/codehaus/plexus/plexus-utils/2.0.5/plexus-utils-2.0.5.jar:/PHV/PHV/.m2/repository/org/apache/ant/ant-

nodeps/1.8.1/ant-nodeps-1.8.1.jar:/PHV/PHV/.m2/repository/org/apache/ant/ant/1.8

.1/ant-1.8.1.jar:/PHV/PHV/.m2/repository/org/apache/ant/ant-launcher/1.8.1/ant-l

auncher-1.8.1.jar:/PHV/PHV/apache-maven-2.2.1/lib/maven-2.2.1-uber.jar

...

bash$ env

TERM=vt100-80

ANT_HOME=/PHV/PHV/ANT_171

HOSTTYPE=ia64

PATH=/PHV/PHV/apache-maven-2.2.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/

usr/bin:/sbin:/bin:.

HOME=/PHV/PHV

SHELL=bash

USER=PHV

JAVA_HOME=/java_kit/jre

M2_HOME=/PHV/PHV/apache-maven-2.2.1

OSTYPE=VMS

SHLVL=1

_=/bin/env

bash$ alias

alias l.='ls -d .* --color=auto'

alias ll='ls -l --color=auto'

alias ls='ls --color=auto'

alias vi='vim'

 

- --

Philippe Vouters (Fontainebleau/France)

URL: http://vouters.dyndns.org/

-----BEGIN PGP SIGNATURE-----

Version: GnuPG v1.4.11 (GNU/Linux)

Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 

iEYEARECAAYFAk6EgkwACgkQsUYBDUbOpdqlXQCfS15I85FqbNOWVzNlAcT+qPVX

swAAn2LkwBLcMNZoXKddrvb8wtZqF7i5

=J8k2

-----END PGP SIGNATURE-----

<project>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>my-test-app</artifactId>
  <groupId>my-test-group</groupId>
  <version>1.0-SNAPSHOT</version>

  <build>
    <plugins>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>1.6</version>
        <executions>
          <execution>
            <id>compile</id>
            <phase>compile</phase>
            <configuration>
              <target>
                <property name="compile_classpath" refid="maven.compile.classpath"/>
                <property name="runtime_classpath" refid="maven.runtime.classpath"/>
                <property name="test_classpath" refid="maven.test.classpath"/>
                <property name="plugin_classpath" refid="maven.plugin.classpath"/>

                <echo message="compile classpath: ${compile_classpath}"/>
                <echo message="runtime classpath: ${runtime_classpath}"/>
                <echo message="test classpath:    ${test_classpath}"/>
                <echo message="plugin classpath:  ${plugin_classpath}"/>
              </target>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to