[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tycho-user] tycho-eclipserun-plugin behind a proxy - solved

Hey!

Some time ago I asked about how to configure the tycho-eclipserun-plugin to work nicely behind a proxy.

David Williams pointed me to this:

Perhaps this reference will help?
http://wiki.eclipse.org/Hudson#Configuring_a_proxy_for_the_p2_director

Not sure how this "fits in" with tycho-eclipserun-plugin ... but it explains how p2 doesn't use -Dhttp.proxyHost, etc.

Tycho-eclipserun-plugin might provide its own methods/techniques for setting the Eclipse network preferences (I'm not familiar with it, hate to admit).

and in the meantime I figured out how to configure that easily in your pom.xml. This is what I am doing now, I case anybody has to solve this as well.


I ended up adding this to my pom.xml file (before I execute the tycho-eclipserun-plugin):
(assuming that the usual http.proxyHost/Port properties are set)



<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>configure-proxies-for-eclipserun</id>
<phase>package</phase>
<configuration>
<target>
<touch file="${project.build.directory}/work/configuration/.settings/org.eclipse.core.net.prefs" mkdirs="true"/>


<propertyfile file="${project.build.directory}/work/configuration/.settings/org.eclipse.core.net.prefs">
<entry key="eclipse.preferences.version" value="1"/>
<entry key="nonProxiedHosts" value="${http.nonProxyHosts}"/>
<entry key="org.eclipse.core.net.hasMigrated" value="true"/>
<entry key="proxyData/HTTP/hasAuth" value="false"/>
<entry key="proxyData/HTTP/host" value="${http.proxyHost}"/>
<entry key="proxyData/HTTP/port" value="${http.proxyPort}"/>
<entry key="systemProxiesEnabled" value="false"/>
</propertyfile>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>



HTH, Martin