title: java ignores proxy in command line argument
body: <p>I am trying to build some .jar package with maven. Since I am connected to the Internet thru proxy server, my command looks like this:</p>
  
  <pre><code>mvn -DargLine="-Dhttp.proxyHost=my.proxy.com -Dhttp.proxyPort=8080" install
  </code></pre>
  
  <p>so that all other processes created by this will use those settings. </p>
  
  <p>However,  during the TESTS phase fork process tries to download some packages and even though it <strong>has</strong> proxy settings in its arguments (<code>ps ax | grep java</code> shows that), I can see with <code>netstat -ntp</code> that this process is connecting directly to the repository ignoring the proxy settings. </p>
  
  <p><code>tcpdump</code> shows no connections to 8080.</p>
  
  <p>Any ideas?</p>
  
  <p><strong>UPD:</strong></p>
  
  <p>So, basically I am trying to build JBoss. As far as I understand it consists of different subsystems which should be build separately. For example, I want to build jboss-as-cmp. My commands without DargLine:</p>
  
  <pre><code>cd /root/jboss/jboss-eap-6.1.0.Alpha/jboss-eap-6.1-src/cmp
  mvn install
  </code></pre>
  
  <p>to my mvn settings.xml in /root/.m2 I added</p>
  
  <pre><code>&lt;proxies&gt;
     &lt;proxy&gt;
        &lt;active&gt;true&lt;/active&gt;
        &lt;protocol&gt;http&lt;/protocol&gt;
        &lt;host&gt;my.proxy.com&lt;/host&gt;
        &lt;port&gt;8080&lt;/port&gt;
     &lt;/proxy&gt;
  &lt;/proxies&gt;
  </code></pre>
  
  <p>Ive read, that surefire plugin can be configuried to use proxy as well, so in my pom.xml for jboss-as-cmp I added</p>
  
  <pre><code>    &lt;plugin&gt;
          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
          &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
          &lt;configuration&gt;
             &lt;includes&gt;
                  &lt;include&gt;org/jboss/as/cmp/**/*TestCase.java&lt;/include&gt;
              &lt;/includes&gt;
                  &lt;systemPropertyVariables&gt;
                     &lt;http.proxyHost&gt;my.proxy.com&lt;/http.proxyHost&gt;
                     &lt;http.proxyPort&gt;8080&lt;/http.proxyPort&gt;
                  &lt;/systemPropertyVariables&gt;
          &lt;/configuration&gt;
      &lt;/plugin&gt;
  </code></pre>
  
  <p>My mvn version</p>
  
  <pre><code>Apache Maven 3.0.5 (rNON-CANONICAL_2013-04-24_16-52_root; 2013-04-24 16:52:00+0300)
  Maven home: /usr/share/apache-maven-3.0.5
  Java version: 1.7.0_19, vendor: Oracle Corporation
  Java home: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.19.x86_64/jre
  Default locale: en_GB, platform encoding: UTF-8
  OS name: "linux", version: "3.8.6-203.fc18.x86_64", arch: "amd64", family: "unix"
  </code></pre>
  
  <p>Environment variables:</p>
  
  <pre><code>M2_HOME=/usr/share/apache-maven-3.0.5
  PATH=/usr/share/apache-maven-3.0.5/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
  </code></pre>
  
  <p>I have not changed any other settings in pom.xml for jboss-as-cmp.</p>