]> source.dussan.org Git - archiva.git/commitdiff
[MRM-138] add HTTP proxy configuration
authorBrett Porter <brett@apache.org>
Fri, 11 Aug 2006 08:37:04 +0000 (08:37 +0000)
committerBrett Porter <brett@apache.org>
Fri, 11 Aug 2006 08:37:04 +0000 (08:37 +0000)
git-svn-id: https://svn.apache.org/repos/asf/maven/repository-manager/trunk@430724 13f79535-47bb-0310-9956-ffa450edef68

maven-repository-configuration/src/main/mdo/configuration.mdo
maven-repository-webapp/src/main/webapp/WEB-INF/jsp/admin/configure.jsp
maven-repository-webapp/src/main/webapp/WEB-INF/jsp/admin/include/proxiedRepositoryForm.jspf
maven-repository-webapp/src/main/webapp/WEB-INF/jsp/admin/index.jsp
maven-repository-webapp/src/main/webapp/WEB-INF/jsp/admin/proxiedRepositories.jsp

index 8ab1540e5097e29ffc8033717ff72ec5431ce78c..adb3f365a0ca2909972b6a6d5ad3402416f3eff1 100644 (file)
           <type>String</type>
           <description>Blacklisted patterns in the discovery process</description>
         </field>
+        <field>
+          <name>proxy</name>
+          <version>1.0.0</version>
+          <association>
+            <type>Proxy</type>
+          </association>
+          <description>The network proxy to use for outgoing requests.</description>
+        </field>
       </fields>
       <codeSegments>
         <codeSegment>
             The interval in minutes before updating releases if the policy is set to 'interval'.
           </description>
         </field>
+        <field>
+          <name>useNetworkProxy</name>
+          <version>1.0.0</version>
+          <type>boolean</type>
+          <defaultValue>false</defaultValue>
+          <description>
+            Whether to use the network proxy, if one is configured for the protocol of this repository.
+          </description>
+        </field>
       </fields>
     </class>
     <class>
         </field>
       </fields>
     </class>
+    <class>
+      <name>Proxy</name>
+      <version>1.0.0</version>
+      <fields>
+        <field>
+          <name>protocol</name>
+          <version>1.0.0</version>
+          <description><![CDATA[The proxy protocol.]]></description>
+          <type>String</type>
+          <defaultValue>http</defaultValue>
+        </field>
+        <field>
+          <name>username</name>
+          <version>1.0.0</version>
+          <description><![CDATA[The proxy user.]]></description>
+          <type>String</type>
+        </field>
+        <field>
+          <name>password</name>
+          <version>1.0.0</version>
+          <description><![CDATA[The proxy password.]]></description>
+          <type>String</type>
+        </field>
+        <field>
+          <name>port</name>
+          <version>1.0.0</version>
+          <description><![CDATA[The proxy port.]]></description>
+          <type>int</type>
+          <defaultValue>8080</defaultValue>
+        </field>
+        <field>
+          <name>host</name>
+          <version>1.0.0</version>
+          <description><![CDATA[The proxy host.]]></description>
+          <type>String</type>
+          <required>true</required>
+        </field>
+        <field>
+          <name>nonProxyHosts</name>
+          <version>1.0.0</version>
+          <description><![CDATA[
+                The list of non-proxied hosts (delimited by |).
+          ]]></description>
+          <type>String</type>
+        </field>
+      </fields>
+    </class>
   </classes>
 </model>
 
index cc361e8da1daeec4f046eb0befe96b3933ff3c93..725e4be7d71315d98f12821ff3e01f3f569be503 100644 (file)
   <ww:form method="post" action="saveConfiguration" namespace="/admin" validate="true">
     <ww:textfield name="indexPath" label="Index Directory" size="100" />
     <ww:textfield name="indexerCronExpression" label="Indexing Schedule" />
+    <ww:hidden name="proxy.protocol" value="http" /> 
+    <ww:textfield name="proxy.host" label="HTTP Proxy Host" />
+    <ww:textfield name="proxy.port" label="HTTP Proxy Port" />
+    <ww:textfield name="proxy.username" label="HTTP Proxy Username" />
+    <ww:password name="proxy.password" label="HTTP Proxy Password" />
     <ww:submit value="Save Configuration" />
   </ww:form>
 </div>
index b9815128973395ac896e37d187da85a9b8a88e61..9847610b231b8e00112ba7e5f4089bb7e3c3d424 100644 (file)
@@ -14,6 +14,7 @@
   ~ limitations under the License.
   --%>
 
+<%@ taglib prefix="ww" uri="/webwork" %>
 <ww:textfield name="name" label="Name" size="50" />
 <ww:textfield name="url" label="URL" size="50" />
 <ww:select list="#@java.util.LinkedHashMap@{'default' : 'Maven 2.x Repository', 'legacy' : 'Maven 1.x Repository'}"
@@ -32,4 +33,5 @@
         'never' : 'Enabled, never updated',
         'interval' : 'Enabled, updated on given interval'}" />
 <ww:textfield label="Release update interval" name="releasesInterval" size="4" />
-<ww:select list="configuration.repositoriesMap" name="managedRepository" label="Proxied through"/>
\ No newline at end of file
+<ww:select list="configuration.repositoriesMap" name="managedRepository" label="Proxied through" />
+<ww:checkbox name="useNetworkProxy" fieldValue="true" label="Use HTTP Proxy" />
index 29a61188930668fbfe2596cad98af6382c58a6c3..d0a9198a09913e25e51e445907381cf71269685c 100644 (file)
     </tr>
   </table>
 
+  <ww:set name="proxy" value="proxy" />
+  <c:if test="${!empty(proxy.host)}">
+    <h3>HTTP Proxy</h3>
+
+    <table>
+      <tr>
+        <th>Host</th>
+        <td>${proxy.host}</td>
+      </tr>
+      <tr>
+        <th>Port</th>
+        <td>${proxy.port}</td>
+      </tr>
+      <tr>
+        <th>Username</th>
+        <td>${proxy.username}</td>
+      </tr>
+    </table>
+  </c:if>
+
   <p>
     <a href="<ww:url action="configure" />">Edit Configuration</a>
   </p>
index 447c03ee8ce23fead769907c996aea5e2c014390..c824355526f99b67d60f0e71bee31c6984515d1d 100644 (file)
             (<code>${repositoriesMap[repository.managedRepository].id}</code>)
           </td>
         </tr>
+        <tr>
+          <th>Use HTTP Proxy</th>
+          <td>
+            <c:if test="${!repository.useNetworkProxy}">
+              <span class="statusFailed">NO</span>
+            </c:if>
+            <c:if test="${repository.useNetworkProxy}">
+              <span class="statusOk">YES</span>
+            </c:if>
+          </td>
+        </tr>
       </table>
     </div>
   </c:forEach>