diff --git a/dependency-check-maven/src/it/617-hierarchical-cross-deps/invoker.properties b/dependency-check-maven/src/it/617-hierarchical-cross-deps/invoker.properties new file mode 100644 index 000000000..317af6f63 --- /dev/null +++ b/dependency-check-maven/src/it/617-hierarchical-cross-deps/invoker.properties @@ -0,0 +1,19 @@ +# +# This file is part of dependency-check-maven. +# +# Licensed 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. +# +# Copyright (c) 2014 Jeremy Long. All Rights Reserved. +# + +invoker.goals = install ${project.groupId}:${project.artifactId}:${project.version}:check -e diff --git a/dependency-check-maven/src/it/617-hierarchical-cross-deps/module-java/pom.xml b/dependency-check-maven/src/it/617-hierarchical-cross-deps/module-java/pom.xml new file mode 100644 index 000000000..b72581079 --- /dev/null +++ b/dependency-check-maven/src/it/617-hierarchical-cross-deps/module-java/pom.xml @@ -0,0 +1,35 @@ + + + + 4.0.0 + + org.owasp.test + hierarchical-cross-deps + 1.0.0-SNAPSHOT + + module-java + jar + + + log4j + log4j + 1.2.17 + + + diff --git a/dependency-check-maven/src/it/617-hierarchical-cross-deps/module-web/pom.xml b/dependency-check-maven/src/it/617-hierarchical-cross-deps/module-web/pom.xml new file mode 100644 index 000000000..8197f228c --- /dev/null +++ b/dependency-check-maven/src/it/617-hierarchical-cross-deps/module-web/pom.xml @@ -0,0 +1,35 @@ + + + + 4.0.0 + + org.owasp.test + hierarchical-cross-deps + 1.0.0-SNAPSHOT + + module-web + war + + + ${project.groupId} + module-java + ${project.version} + + + \ No newline at end of file diff --git a/dependency-check-maven/src/it/617-hierarchical-cross-deps/module-web/src/main/webapp/WEB-INF/web.xml b/dependency-check-maven/src/it/617-hierarchical-cross-deps/module-web/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 000000000..65c96051c --- /dev/null +++ b/dependency-check-maven/src/it/617-hierarchical-cross-deps/module-web/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,26 @@ + + + + test-app + + index.html + + + diff --git a/dependency-check-maven/src/it/617-hierarchical-cross-deps/pom.xml b/dependency-check-maven/src/it/617-hierarchical-cross-deps/pom.xml new file mode 100644 index 000000000..07d213b69 --- /dev/null +++ b/dependency-check-maven/src/it/617-hierarchical-cross-deps/pom.xml @@ -0,0 +1,29 @@ + + + + 4.0.0 + org.owasp.test + hierarchical-cross-deps + 1.0.0-SNAPSHOT + pom + + module-java + module-web + + \ No newline at end of file diff --git a/dependency-check-maven/src/it/617-hierarchical-cross-deps/postbuild.groovy b/dependency-check-maven/src/it/617-hierarchical-cross-deps/postbuild.groovy new file mode 100644 index 000000000..09ea6f264 --- /dev/null +++ b/dependency-check-maven/src/it/617-hierarchical-cross-deps/postbuild.groovy @@ -0,0 +1,28 @@ +/* + * This file is part of dependency-check-maven. + * + * Licensed 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. + * + * Copyright (c) 2014 Jeremy Long. All Rights Reserved. + */ + +import org.apache.commons.io.FileUtils; +import org.apache.commons.lang.StringUtils; + +// Save NVD-CVE for next IT (if not already done) +File datasDwl = new File("target/local-repo/org/owasp/dependency-check-data/3.0", "dc.h2.db"); +File datasSave = new File("target/nvd-cve-backup", "dc.h2.db"); +if (datasDwl.exists() && !datasSave.exists()){ + System.out.println("Save NVD-CVE into backup"); + FileUtils.copyFile(datasDwl, datasSave); +} diff --git a/dependency-check-maven/src/it/617-hierarchical-cross-deps/prebuild.groovy b/dependency-check-maven/src/it/617-hierarchical-cross-deps/prebuild.groovy new file mode 100644 index 000000000..c1e9eda11 --- /dev/null +++ b/dependency-check-maven/src/it/617-hierarchical-cross-deps/prebuild.groovy @@ -0,0 +1,28 @@ +/* + * This file is part of dependency-check-maven. + * + * Licensed 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. + * + * Copyright (c) 2014 Jeremy Long. All Rights Reserved. + */ + +import org.apache.commons.io.FileUtils; + +// Load NVD-CVE if not exist and had been saved in a previous IT +File datasDwl = new File("target/local-repo/org/owasp/dependency-check-data/3.0", "dc.h2.db"); +File datasSave = new File("target/nvd-cve-backup", "dc.h2.db"); + +if (!datasDwl.exists() && datasSave.exists()){ + System.out.println("Load NVD-CVE from backup"); + FileUtils.copyFile(datasSave, datasDwl); +}