2 ~ Licensed to the Apache Software Foundation (ASF) under one
\r
3 ~ or more contributor license agreements. See the NOTICE file
\r
4 ~ distributed with this work for additional information
\r
5 ~ regarding copyright ownership. The ASF licenses this file
\r
6 ~ to you under the Apache License, Version 2.0 (the
\r
7 ~ "License"); you may not use this file except in compliance
\r
8 ~ with the License. You may obtain a copy of the License at
\r
10 ~ http://www.apache.org/licenses/LICENSE-2.0
\r
12 ~ Unless required by applicable law or agreed to in writing,
\r
13 ~ software distributed under the License is distributed on an
\r
14 ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
\r
15 ~ KIND, either express or implied. See the License for the
\r
16 ~ specific language governing permissions and limitations
\r
17 ~ under the License.
\r
20 <%@ taglib prefix="ww" uri="/webwork" %>
\r
24 <title>Admin: Add Legacy Artifact Path</title>
\r
30 <h1>Admin: Add Legacy Artifact Path</h1>
\r
32 <div id="contentArea">
\r
35 Enter the legacy path to map to a particular artifact reference, then adjust the fields as necessary.
\r
38 <script type="text/javascript">
\r
39 function parse( path )
\r
41 var group = path.indexOf( "/" );
\r
44 document.getElementById( "addLegacyArtifactPath_groupId" ).value
\r
45 = path.substring( 0, group );
\r
47 var type = path.indexOf( "/", group );
\r
50 document.getElementById( "addLegacyArtifactPath_type" ).value
\r
51 = path.substring( group, type - 1 );
\r
54 var version = path.indexOf( "-", type );
\r
55 var ext = path.lastIndexOf( "." );
\r
58 document.getElementById( "addLegacyArtifactPath_artifactId" ).value
\r
59 = path.substring( type, version );
\r
60 document.getElementById( "addLegacyArtifactPath_version" ).value
\r
61 = path.substring( version + 1, ext );
\r
70 <ww:form method="post" action="addLegacyArtifactPath!commit" namespace="/admin" validate="true">
\r
71 <ww:textfield name="legacyArtifactPath.path" label="Path" size="50" required="true" onchange="parse( this.value )"/>
\r
72 <ww:textfield name="groupId" label="GroupId" size="20" required="true"/>
\r
73 <ww:textfield name="artifactId" label="ArtifactId" size="20" required="true"/>
\r
74 <ww:textfield name="version" label="Version" size="20" required="true"/>
\r
75 <ww:textfield name="classifier" label="Classifier" size="20" required="false"/>
\r
76 <ww:textfield name="type" label="Type" size="20" required="true"/>
\r
77 <ww:submit value="Add Legacy Artifact Path"/>
\r
80 <script type="text/javascript">
\r
81 var ref = document.getElementById("addLegacyArtifactPath_legacyArtifactPath_artifact").value;
\r
82 var i = ref.indexOf( ":" );
\r
83 document.getElementById("addLegacyArtifactPath_groupId").value = ref.substring( 0, i );
\r
85 var i = ref.indexOf( ":", j );
\r
86 document.getElementById("addLegacyArtifactPath_artifactId").value = ref.substring( j, i );
\r
88 var i = ref.indexOf( ":", j );
\r
89 document.getElementById("addLegacyArtifactPath_version").value = ref.substring( j, i );
\r
91 var i = ref.indexOf( ":", j );
\r
92 document.getElementById("addLegacyArtifactPath_classifier").value = ref.substring( j, i );
\r
94 document.getElementById("addLegacyArtifactPath_legacyArtifactPath_path").focus();
\r