Mmuzaf commented on code in PR #2971:
URL: https://github.com/apache/cassandra/pull/2971#discussion_r1425208041


##########
.build/build-owasp.xml:
##########
@@ -16,30 +16,50 @@
   ~ See the License for the specific language governing permissions and
   ~ limitations under the License.
   -->
-<project basedir="." name="apache-cassandra-owasp-tasks">
-    <property name="dependency-check.version" value="8.3.1"/>
-    <property name="dependency-check.home" 
value="${build.dir}/dependency-check-ant-${dependency-check.version}"/>
+<project basedir="." name="apache-cassandra-owasp-tasks"
+         xmlns:unless="ant:unless"
+         xmlns:if="ant:if">
+    <property name="dependency-check.version" value="9.0.2"/>
+    <property name="dependency-check.home" 
value="${tmp.dir}/dependency-check-ant-${dependency-check.version}"/>
+    <property name="dependency-check.archive.dir" 
value="${local.repository}/org/owasp/dependency-check-ant/${dependency-check.version}"/>
+    <property name="dependency-check.archive.name" 
value="dependency-check-ant-${dependency-check.version}-release.zip"/>
+    <property name="dependency-check.report.dir" value="${build.dir}/owasp"/>
 
     <condition property="is.dependency.check.jar">
-        <available 
file="${dependency-check.home}/dependency-check-ant/dependency-check-ant.jar" 
type="file" />
+        <available 
file="${dependency-check.archive.dir}/${dependency-check.archive.name}" 
type="file" />
     </condition>
 
-    <target name="dependency-check-download"
-            depends="build"
+    <target name="-dependency-check-download"
             description="Fetch OWASP Dependency checker"
             unless="is.dependency.check.jar">
 
-        <echo>Downloading OWASP Dependency checks ...</echo>
+        <mkdir dir="${dependency-check.archive.dir}"/>
+        <get 
src="https://github.com/jeremylong/DependencyCheck/releases/download/v${dependency-check.version}/dependency-check-ant-${dependency-check.version}-release.zip";

Review Comment:
   As I can see we have the `dependency-check.archive.name` variable defined, 
why not use it here as well? :-)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to