aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp
diff options
context:
space:
mode:
authorNicolas De Loof <nicolas@apache.org>2007-12-13 11:36:18 +0000
committerNicolas De Loof <nicolas@apache.org>2007-12-13 11:36:18 +0000
commit95271f756ed86f6740ee8c9e3d395c404af129cc (patch)
tree350d5dd0e5aa96aba4799ee2fccf989b5d21dfce /archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp
parent678173ca42972b644f69399ebead4eba3c03d0ac (diff)
downloadarchiva-95271f756ed86f6740ee8c9e3d395c404af129cc.tar.gz
archiva-95271f756ed86f6740ee8c9e3d395c404af129cc.zip
MRM-594 support for custom legacy-path-2-artifact-reference resolution
Web UI to register new exceptions to the artifact resolution algorithm. git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@603891 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp')
-rw-r--r--archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/addLegacyArtifactPath.jsp110
-rw-r--r--archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/legacyArtifactPath.jsp117
-rw-r--r--archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/decorators/default.jsp3
3 files changed, 230 insertions, 0 deletions
diff --git a/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/addLegacyArtifactPath.jsp b/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/addLegacyArtifactPath.jsp
new file mode 100644
index 000000000..9750395c8
--- /dev/null
+++ b/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/addLegacyArtifactPath.jsp
@@ -0,0 +1,110 @@
+<%--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ --%>
+
+<%@ taglib prefix="ww" uri="/webwork" %>
+
+<html>
+<head>
+ <title>Admin: Add Legacy artifact path</title>
+ <ww:head/>
+</head>
+
+<body>
+
+<h1>Admin: Add Legacy artifact path</h1>
+
+<div id="contentArea">
+
+ <script type="text/javascript">
+ function parse( path )
+ {
+ var group = path.indexOf( "/" );
+ if ( group > 0 )
+ {
+ document.getElementById( "addLegacyArtifactPath_groupId" ).value
+ = path.substring( 0, group );
+ group += 1;
+ var type = path.indexOf( "/", group );
+ if ( type > 0 )
+ {
+ document.getElementById( "addLegacyArtifactPath_type" ).value
+ = path.substring( group, type - 1 );
+ }
+ type += 1;
+ var version = path.indexOf( "-", type );
+ var ext = path.lastIndexOf( "." );
+ if ( version > 0 )
+ {
+ document.getElementById( "addLegacyArtifactPath_artifactId" ).value
+ = path.substring( type, version );
+ document.getElementById( "addLegacyArtifactPath_version" ).value
+ = path.substring( version + 1, ext );
+ }
+
+ }
+ }
+ function computeArtifactReference()
+ {
+ document.getElementById("addLegacyArtifactPath_legacyArtifactPath_artifact").value
+ = document.getElementById("addLegacyArtifactPath_groupId").value
+ + ":"
+ + document.getElementById("addLegacyArtifactPath_artifactId").value
+ + ":"
+ + document.getElementById("addLegacyArtifactPath_version").value
+ + ":"
+ + document.getElementById("addLegacyArtifactPath_classifier").value
+ + ":"
+ + document.getElementById("addLegacyArtifactPath_type").value;
+ }
+ </script>
+
+ <ww:actionmessage/>
+ <ww:actionerror/>
+ <ww:form method="post" action="addLegacyArtifactPath!commit" namespace="/admin" validate="true" onsubmit="computeArtifactReference()">
+ <ww:textfield name="legacyArtifactPath.path" label="Path" size="50" required="true" onchange="parse( this.value )"/>
+ <ww:textfield name="groupId" label="GroupId" size="20" required="true" disabled="true"/>
+ <ww:textfield name="artifactId" label="ArtifactId" size="20" required="true"/>
+ <ww:textfield name="version" label="Version" size="20" required="true"/>
+ <ww:textfield name="classifier" label="Classifier" size="20" required="false"/>
+ <ww:textfield name="type" label="Type" size="20" required="true" disabled="true"/>
+ <ww:hidden name="legacyArtifactPath.artifact"/>
+ <ww:submit value="Add Legacy Artifact Path"/>
+ </ww:form>
+
+ <script type="text/javascript">
+ var ref = document.getElementById("addLegacyArtifactPath_legacyArtifactPath_artifact").value;
+ var i = ref.indexOf( ":" );
+ document.getElementById("addLegacyArtifactPath_groupId").value = ref.substring( 0, i );
+ var j = i + 1;
+ var i = ref.indexOf( ":", j );
+ document.getElementById("addLegacyArtifactPath_artifactId").value = ref.substring( j, i );
+ var j = i + 1;
+ var i = ref.indexOf( ":", j );
+ document.getElementById("addLegacyArtifactPath_version").value = ref.substring( j, i );
+ var j = i + 1;
+ var i = ref.indexOf( ":", j );
+ document.getElementById("addLegacyArtifactPath_classifier").value = ref.substring( j, i );
+
+ document.getElementById("addLegacyArtifactPath_legacyArtifactPath_path").focus();
+ </script>
+
+</div>
+
+</body>
+</html>
diff --git a/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/legacyArtifactPath.jsp b/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/legacyArtifactPath.jsp
new file mode 100644
index 000000000..97df9c7ed
--- /dev/null
+++ b/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/legacyArtifactPath.jsp
@@ -0,0 +1,117 @@
+<%--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ --%>
+
+<%@ taglib prefix="ww" uri="/webwork" %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+<%@ taglib prefix="redback" uri="http://plexus.codehaus.org/redback/taglib-1.0" %>
+<%@ taglib prefix="archiva" uri="http://maven.apache.org/archiva" %>
+
+<html>
+<head>
+ <title>Administration - Legacy support</title>
+ <ww:head/>
+</head>
+
+<body>
+
+<h1>Administration - Legacy artifacts path resolution</h1>
+
+<div id="contentArea">
+
+<ww:actionerror/>
+<ww:actionmessage/>
+
+<div class="admin">
+<div class="controls">
+ <redback:ifAuthorized permission="archiva-manage-configuration">
+ <ww:url id="addLegacyArtifactPathUrl" action="addLegacyArtifactPath"/>
+ <ww:a href="%{addLegacyArtifactPathUrl}">
+ <img src="<c:url value="/images/icons/create.png" />" alt="" width="16" height="16"/>
+ Add
+ </ww:a>
+ </redback:ifAuthorized>
+</div>
+<h2>Legacy artifacts path resolution</h2>
+
+<c:choose>
+<c:when test="${empty(legacyArtifactPaths)}">
+ <%-- No Managed Repositories. --%>
+ <strong>There are no legacy artifact path configured yet.</strong>
+</c:when>
+<c:otherwise>
+<%-- Display the repositories. --%>
+
+<c:forEach items="${legacyArtifactPaths}" var="legacyArtifactPath" varStatus="i">
+<c:choose>
+ <c:when test='${(i.index)%2 eq 0}'>
+ <c:set var="rowColor" value="dark" scope="page"/>
+ </c:when>
+ <c:otherwise>
+ <c:set var="rowColor" value="lite" scope="page"/>
+ </c:otherwise>
+</c:choose>
+
+<div class="legacyArtifactPath ${rowColor}">
+
+<div class="controls">
+ <%-- TODO: make some icons --%>
+ <redback:ifAnyAuthorized permissions="archiva-manage-configuration">
+ <ww:url id="deleteLegacyArtifactPath" action="deleteLegacyArtifactPath">
+ <ww:param name="path" value="%{'${legacyArtifactPath.path}'}"/>
+ </ww:url>
+ <ww:a href="%{deleteLegacyArtifactPath}">
+ <img src="<c:url value="/images/icons/delete.gif" />" alt="" width="16" height="16"/>
+ Delete
+ </ww:a>
+ </redback:ifAnyAuthorized>
+</div>
+
+<div style="float: left">
+ <img src="<c:url value="/images/archiva-splat-32.gif"/>" alt="" width="32" height="32"/>
+</div>
+
+<table class="infoTable">
+<tr>
+ <th>Path</th>
+ <td>
+ <code>${legacyArtifactPath.path}</code>
+ </td>
+</tr>
+<tr>
+ <th>Artifact</th>
+ <td>
+ <code>${legacyArtifactPath.artifact}</code>
+ </td>
+</tr>
+</table>
+
+</div>
+</c:forEach>
+
+</c:otherwise>
+</c:choose>
+
+
+
+</div>
+
+</div>
+
+</body>
+</html>
diff --git a/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/decorators/default.jsp b/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/decorators/default.jsp
index 0ddc11584..73e232074 100644
--- a/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/decorators/default.jsp
+++ b/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/decorators/default.jsp
@@ -137,6 +137,9 @@
<my:currentWWUrl action="proxyConnectors" namespace="/admin">Proxy Connectors</my:currentWWUrl>
</li>
<li class="none">
+ <my:currentWWUrl action="legacyArtifactPath" namespace="/admin">Legacy support</my:currentWWUrl>
+ </li>
+ <li class="none">
<my:currentWWUrl action="networkProxies" namespace="/admin">Network Proxies</my:currentWWUrl>
</li>
<li class="none">