Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

findArtifact.jsp 3.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <%--
  2. ~ Licensed to the Apache Software Foundation (ASF) under one
  3. ~ or more contributor license agreements. See the NOTICE file
  4. ~ distributed with this work for additional information
  5. ~ regarding copyright ownership. The ASF licenses this file
  6. ~ to you under the Apache License, Version 2.0 (the
  7. ~ "License"); you may not use this file except in compliance
  8. ~ with the License. You may obtain a copy of the License at
  9. ~
  10. ~ http://www.apache.org/licenses/LICENSE-2.0
  11. ~
  12. ~ Unless required by applicable law or agreed to in writing,
  13. ~ software distributed under the License is distributed on an
  14. ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  15. ~ KIND, either express or implied. See the License for the
  16. ~ specific language governing permissions and limitations
  17. ~ under the License.
  18. --%>
  19. <%@ taglib prefix="s" uri="/struts-tags" %>
  20. <html>
  21. <head>
  22. <title>Find Artifact</title>
  23. <s:head/>
  24. </head>
  25. <body onload="document.checksumSearch.file.disabled = false">
  26. <h1>Find Artifact</h1>
  27. <div id="contentArea">
  28. <div id="searchBox">
  29. <s:if test="${applicationScope.uiOptions.appletFindEnabled}">
  30. <script type="text/javascript">
  31. function generateMd5( file, defVal )
  32. {
  33. if ( file )
  34. {
  35. var s = document.ChecksumApplet.generateMd5(file);
  36. // If there is a space, it's an error message, not a checksum
  37. if ( s.indexOf(" ") >= 0 )
  38. {
  39. alert(s);
  40. return "";
  41. }
  42. else
  43. return s;
  44. }
  45. return defVal;
  46. }
  47. </script>
  48. <noscript>
  49. <span class="errorMessage">JavaScript is disabled: using the file browser will not work.</span>
  50. </noscript>
  51. <s:form method="POST" action="checksumSearch" namespace="/"
  52. onsubmit="this.q.value = generateMd5(this.file.value,this.md5.value); this.file.disabled = true;">
  53. <s:hidden name="q"/>
  54. <tr>
  55. <td class="tdLabel"><label for="checksumSearch_file" class="label">Search for:</label></td>
  56. <td>
  57. <input type="file" name="file" size="50" value="" id="checksumSearch_file"/>
  58. </td>
  59. </tr>
  60. <s:textfield label="Checksum" size="50" name="md5"/>
  61. <s:submit value="Search"/>
  62. </s:form>
  63. <p>
  64. This allows you to search the repository using the checksum of an artifact that you are trying to identify.
  65. You can either specify the checksum to look for directly, or scan a local artifact file.
  66. </p>
  67. <p>
  68. To scan a local file, select the file you would like to locate in the remote repository.
  69. The entire file will
  70. <b>not</b>
  71. be uploaded to the server. See the progress bar below for progress of
  72. locally creating a checksum that is uploaded to the server after you hit "Search".
  73. <s:actionerror/>
  74. </p>
  75. <p>
  76. <applet code="org/apache/maven/archiva/applet/ChecksumApplet.class"
  77. archive="archiva-applet.jar"
  78. width="400" height="20" name="ChecksumApplet">
  79. </applet>
  80. </p>
  81. </s:if>
  82. <s:else>
  83. <s:form method="POST" action="checksumSearch" namespace="/">
  84. <s:textfield label="Checksum" size="50" name="q"/>
  85. <s:submit value="Search"/>
  86. </s:form>
  87. <p>
  88. <s:actionerror/>
  89. </p>
  90. </s:else>
  91. </div>
  92. </div>
  93. </body>
  94. </html>