diff --git a/src/main/java/com/synopsys/integration/jenkins/detect/JavaExecutableManager.java b/src/main/java/com/synopsys/integration/jenkins/detect/JavaExecutableManager.java index 2fea272..482a2ab 100644 --- a/src/main/java/com/synopsys/integration/jenkins/detect/JavaExecutableManager.java +++ b/src/main/java/com/synopsys/integration/jenkins/detect/JavaExecutableManager.java @@ -1,3 +1,25 @@ +/** + * blackduck-detect + * + * Copyright (c) 2019 Synopsys, Inc. + * + * 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. + */ package com.synopsys.integration.jenkins.detect; import java.io.File; diff --git a/src/main/java/com/synopsys/integration/jenkins/detect/substeps/SetUpDetectWorkspaceCallable.java b/src/main/java/com/synopsys/integration/jenkins/detect/substeps/SetUpDetectWorkspaceCallable.java index cd1244e..1257f11 100644 --- a/src/main/java/com/synopsys/integration/jenkins/detect/substeps/SetUpDetectWorkspaceCallable.java +++ b/src/main/java/com/synopsys/integration/jenkins/detect/substeps/SetUpDetectWorkspaceCallable.java @@ -23,7 +23,6 @@ package com.synopsys.integration.jenkins.detect.substeps; import java.io.IOException; -import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.HashMap; @@ -97,14 +96,9 @@ private DetectSetupResponse setUpForJarExecution(final String pathToDetectJar, f javaExecutableManager.logJavaVersion(); final Path detectJar = Paths.get(pathToDetectJar); - final Path workspaceDetectJar = Paths.get(workspaceTempPath).resolve(detectJar.getFileName()); - if (Files.notExists(workspaceDetectJar)) { - Files.move(detectJar, workspaceDetectJar); - } - - logger.info("Running Detect: " + workspaceDetectJar.getFileName()); - return new DetectSetupResponse(DetectSetupResponse.ExecutionStrategy.JAR, workspaceDetectJar.toString(), javaExecutablePath); + logger.info("Running Detect: " + detectJar.getFileName()); + return new DetectSetupResponse(DetectSetupResponse.ExecutionStrategy.JAR, javaExecutablePath, pathToDetectJar); } private DetectSetupResponse setUpForScriptExecution(final DetectSetupResponse.ExecutionStrategy executionStrategy) throws IOException, IntegrationException {