Added licence, copyright and README

This commit is contained in:
Erik C. Thauvin 2023-08-14 19:48:07 -07:00
parent da53dbf3d6
commit 29f1273b59
11 changed files with 284 additions and 11 deletions

View file

@ -1,11 +1,27 @@
/*
* Copyright 2023 the original author or authors.
*
* 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
*
* https://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 rife.bld.extension;
import rife.bld.BaseProject;
import rife.bld.operations.AbstractProcessOperation;
import java.io.File;
import java.nio.file.Files;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.*;
@ -22,6 +38,7 @@ import java.util.stream.Collectors;
*/
@SuppressWarnings("PMD.TestClassWithoutTestCases")
public class TestNgOperation extends AbstractProcessOperation<TestNgOperation> {
public static final String TEST_CLASS_ARG = "-testclass";
private static final Logger LOGGER = Logger.getLogger(TestNgOperation.class.getName());
private final List<String> args = new ArrayList<>();
private final Map<String, String> options = new ConcurrentHashMap<>();
@ -85,7 +102,7 @@ public class TestNgOperation extends AbstractProcessOperation<TestNgOperation> {
args.add(v);
});
if (!options.containsKey("-testClass")) {
if (!options.containsKey(TEST_CLASS_ARG)) {
try {
var temp = tempFile();
try (var bufWriter = Files.newBufferedWriter(Paths.get(temp.getPath()))) {