Compare commits

...

4 commits

Author SHA1 Message Date
e2695625fd
Version 1.0.0 2024-08-30 13:38:04 -07:00
f2cf1b18bb
Minor cleanups 2024-08-30 13:37:43 -07:00
fd950f223d
Updated extensions dependencies 2024-08-30 13:07:22 -07:00
c35b3cefcd
Bumped bld to version 2.1.0 2024-08-29 22:42:11 -07:00
18 changed files with 48 additions and 70 deletions

View file

@ -2,12 +2,12 @@
<library name="bld"> <library name="bld">
<CLASSES> <CLASSES>
<root url="file://$PROJECT_DIR$/lib/bld" /> <root url="file://$PROJECT_DIR$/lib/bld" />
<root url="jar://$USER_HOME$/.bld/dist/bld-2.0.1.jar!/" /> <root url="jar://$USER_HOME$/.bld/dist/bld-2.1.0.jar!/" />
</CLASSES> </CLASSES>
<JAVADOC /> <JAVADOC />
<SOURCES> <SOURCES>
<root url="file://$PROJECT_DIR$/lib/bld" /> <root url="file://$PROJECT_DIR$/lib/bld" />
<root url="jar://$USER_HOME$/.bld/dist/bld-2.0.1-sources.jar!/" /> <root url="jar://$USER_HOME$/.bld/dist/bld-2.1.0-sources.jar!/" />
</SOURCES> </SOURCES>
<excluded> <excluded>
<root url="jar://$PROJECT_DIR$/lib/bld/bld-wrapper.jar!/" /> <root url="jar://$PROJECT_DIR$/lib/bld/bld-wrapper.jar!/" />

View file

@ -7,7 +7,7 @@
<SOURCES> <SOURCES>
<root url="file://$PROJECT_DIR$/lib/compile" /> <root url="file://$PROJECT_DIR$/lib/compile" />
</SOURCES> </SOURCES>
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="false" /> <jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="true" />
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="false" type="SOURCES" /> <jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="true" type="SOURCES" />
</library> </library>
</component> </component>

View file

@ -8,7 +8,7 @@
<SOURCES> <SOURCES>
<root url="file://$PROJECT_DIR$/lib/runtime" /> <root url="file://$PROJECT_DIR$/lib/runtime" />
</SOURCES> </SOURCES>
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="false" /> <jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="true" />
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="false" type="SOURCES" /> <jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="true" type="SOURCES" />
</library> </library>
</component> </component>

View file

@ -8,7 +8,7 @@
<SOURCES> <SOURCES>
<root url="file://$PROJECT_DIR$/lib/test" /> <root url="file://$PROJECT_DIR$/lib/test" />
</SOURCES> </SOURCES>
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="false" /> <jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="true" />
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="false" type="SOURCES" /> <jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="true" type="SOURCES" />
</library> </library>
</component> </component>

View file

@ -9,7 +9,7 @@
], ],
"java.configuration.updateBuildConfiguration": "automatic", "java.configuration.updateBuildConfiguration": "automatic",
"java.project.referencedLibraries": [ "java.project.referencedLibraries": [
"${HOME}/.bld/dist/bld-2.0.1.jar", "${HOME}/.bld/dist/bld-2.1.0.jar",
"lib/**/*.jar" "lib/**/*.jar"
] ]
} }

View file

@ -2,7 +2,7 @@
[![License](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![License](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Java](https://img.shields.io/badge/java-17%2B-blue)](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html) [![Java](https://img.shields.io/badge/java-17%2B-blue)](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html)
[![bld](https://img.shields.io/badge/2.0.1-FA9052?label=bld&labelColor=2392FF)](https://rife2.com/bld) [![bld](https://img.shields.io/badge/2.1.0-FA9052?label=bld&labelColor=2392FF)](https://rife2.com/bld)
[![Release](https://flat.badgen.net/maven/v/metadata-url/repo.rife2.com/releases/com/uwyn/rife2/bld-testng/maven-metadata.xml?color=blue)](https://repo.rife2.com/#/releases/com/uwyn/rife2/bld-testng) [![Release](https://flat.badgen.net/maven/v/metadata-url/repo.rife2.com/releases/com/uwyn/rife2/bld-testng/maven-metadata.xml?color=blue)](https://repo.rife2.com/#/releases/com/uwyn/rife2/bld-testng)
[![Snapshot](https://flat.badgen.net/maven/v/metadata-url/repo.rife2.com/snapshots/com/uwyn/rife2/bld-testng/maven-metadata.xml?label=snapshot)](https://repo.rife2.com/#/snapshots/com/uwyn/rife2/bld-testng) [![Snapshot](https://flat.badgen.net/maven/v/metadata-url/repo.rife2.com/snapshots/com/uwyn/rife2/bld-testng/maven-metadata.xml?label=snapshot)](https://repo.rife2.com/#/snapshots/com/uwyn/rife2/bld-testng)
[![GitHub CI](https://github.com/rife2/bld-testng/actions/workflows/bld.yml/badge.svg)](https://github.com/rife2/bld-testng/actions/workflows/bld.yml) [![GitHub CI](https://github.com/rife2/bld-testng/actions/workflows/bld.yml/badge.svg)](https://github.com/rife2/bld-testng/actions/workflows/bld.yml)

View file

@ -2,12 +2,12 @@
<library name="bld"> <library name="bld">
<CLASSES> <CLASSES>
<root url="file://$PROJECT_DIR$/lib/bld" /> <root url="file://$PROJECT_DIR$/lib/bld" />
<root url="jar://$USER_HOME$/.bld/dist/bld-2.0.1.jar!/" /> <root url="jar://$USER_HOME$/.bld/dist/bld-2.1.0.jar!/" />
</CLASSES> </CLASSES>
<JAVADOC /> <JAVADOC />
<SOURCES> <SOURCES>
<root url="file://$PROJECT_DIR$/lib/bld" /> <root url="file://$PROJECT_DIR$/lib/bld" />
<root url="jar://$USER_HOME$/.bld/dist/bld-2.0.1-sources.jar!/" /> <root url="jar://$USER_HOME$/.bld/dist/bld-2.1.0-sources.jar!/" />
</SOURCES> </SOURCES>
<excluded> <excluded>
<root url="jar://$PROJECT_DIR$/lib/bld/bld-wrapper.jar!/" /> <root url="jar://$PROJECT_DIR$/lib/bld/bld-wrapper.jar!/" />

View file

@ -7,7 +7,7 @@
<SOURCES> <SOURCES>
<root url="file://$PROJECT_DIR$/lib/compile" /> <root url="file://$PROJECT_DIR$/lib/compile" />
</SOURCES> </SOURCES>
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="false" /> <jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="true" />
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="false" type="SOURCES" /> <jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="true" type="SOURCES" />
</library> </library>
</component> </component>

View file

@ -8,7 +8,7 @@
<SOURCES> <SOURCES>
<root url="file://$PROJECT_DIR$/lib/runtime" /> <root url="file://$PROJECT_DIR$/lib/runtime" />
</SOURCES> </SOURCES>
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="false" /> <jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="true" />
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="false" type="SOURCES" /> <jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="true" type="SOURCES" />
</library> </library>
</component> </component>

View file

@ -8,7 +8,7 @@
<SOURCES> <SOURCES>
<root url="file://$PROJECT_DIR$/lib/test" /> <root url="file://$PROJECT_DIR$/lib/test" />
</SOURCES> </SOURCES>
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="false" /> <jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="true" />
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="false" type="SOURCES" /> <jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="true" type="SOURCES" />
</library> </library>
</component> </component>

View file

@ -10,7 +10,7 @@
], ],
"java.configuration.updateBuildConfiguration": "automatic", "java.configuration.updateBuildConfiguration": "automatic",
"java.project.referencedLibraries": [ "java.project.referencedLibraries": [
"${HOME}/.bld/dist/bld-2.0.1.jar", "${HOME}/.bld/dist/bld-2.1.0.jar",
"lib/**/*.jar" "lib/**/*.jar"
] ]
} }

Binary file not shown.

View file

@ -1,8 +1,8 @@
bld.downloadExtensionJavadoc=false bld.downloadExtensionJavadoc=false
bld.downloadExtensionSources=true bld.downloadExtensionSources=true
bld.downloadLocation= bld.downloadLocation=
bld.extension-jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.8-SNAPSHOT bld.extension-jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.8
bld.extension-testng=com.uwyn.rife2:bld-testng:1.0.0-SNAPSHOT bld.extension-testng=com.uwyn.rife2:bld-testng:1.0.0
bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
bld.sourceDirectories= bld.sourceDirectories=
bld.version=2.0.1 bld.version=2.1.0

Binary file not shown.

View file

@ -1,8 +1,8 @@
bld.downloadExtensionJavadoc=false bld.downloadExtensionJavadoc=false
bld.downloadExtensionSources=true bld.downloadExtensionSources=true
bld.downloadLocation= bld.downloadLocation=
bld.extension-exec=com.uwyn.rife2:bld-exec:1.0.2 bld.extension-exec=com.uwyn.rife2:bld-exec:1.0.3
bld.extension-pmd=com.uwyn.rife2:bld-pmd:1.1.4 bld.extension-pmd=com.uwyn.rife2:bld-pmd:1.1.5
bld.repositories=MAVEN_CENTRAL,MAVEN_LOCAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES bld.repositories=MAVEN_CENTRAL,MAVEN_LOCAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
bld.sourceDirectories= bld.sourceDirectories=
bld.version=2.0.1 bld.version=2.1.0

View file

@ -33,7 +33,7 @@ public class TestNgOperationBuild extends Project {
public TestNgOperationBuild() { public TestNgOperationBuild() {
pkg = "rife.bld.extension"; pkg = "rife.bld.extension";
name = "bld-testng"; name = "bld-testng";
version = version(1, 0, 0, "SNAPSHOT"); version = version(1, 0, 0);
javaRelease = 17; javaRelease = 17;
@ -42,7 +42,7 @@ public class TestNgOperationBuild extends Project {
repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL, RIFE2_RELEASES, RIFE2_SNAPSHOTS); repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL, RIFE2_RELEASES, RIFE2_SNAPSHOTS);
scope(compile) scope(compile)
.include(dependency("com.uwyn.rife2", "bld", version(2, 0, 1))); .include(dependency("com.uwyn.rife2", "bld", version(2, 1, 0)));
scope(test) scope(test)
.include(dependency("org.testng", "testng", version(7, 10, 2))) .include(dependency("org.testng", "testng", version(7, 10, 2)))

View file

@ -150,8 +150,7 @@ public class TestNgOperation extends TestOperation<TestNgOperation, List<String>
* @see #excludeGroups(Collection) #excludeGroups(Collection) * @see #excludeGroups(Collection) #excludeGroups(Collection)
*/ */
public TestNgOperation excludeGroups(String... group) { public TestNgOperation excludeGroups(String... group) {
options_.put("-excludegroups", String.join(",", Arrays.stream(group).filter(this::isNotBlank).toList())); return excludeGroups(List.of(group));
return this;
} }
/** /**
@ -309,8 +308,7 @@ public class TestNgOperation extends TestOperation<TestNgOperation, List<String>
* @see #groups(Collection) #groups(Collection) * @see #groups(Collection) #groups(Collection)
*/ */
public TestNgOperation groups(String... group) { public TestNgOperation groups(String... group) {
options_.put("-groups", String.join(",", Arrays.stream(group).filter(this::isNotBlank).toList())); return groups(List.of(group));
return this;
} }
/** /**
@ -383,8 +381,7 @@ public class TestNgOperation extends TestOperation<TestNgOperation, List<String>
* @see #listener(Collection) #listener(Collection) * @see #listener(Collection) #listener(Collection)
*/ */
public TestNgOperation listener(String... listener) { public TestNgOperation listener(String... listener) {
options_.put("-listener", String.join(",", Arrays.stream(listener).filter(this::isNotBlank).toList())); return listener(List.of(listener));
return this;
} }
/** /**
@ -447,9 +444,7 @@ public class TestNgOperation extends TestOperation<TestNgOperation, List<String>
* @see #methodSelectors(Collection) #methodSelectors(Collection) * @see #methodSelectors(Collection) #methodSelectors(Collection)
*/ */
public TestNgOperation methodSelectors(String... selector) { public TestNgOperation methodSelectors(String... selector) {
options_.put("-methodselectors", return methodSelectors(List.of(selector));
String.join(",", Arrays.stream(selector).filter(this::isNotBlank).toList()));
return this;
} }
/** /**
@ -476,8 +471,7 @@ public class TestNgOperation extends TestOperation<TestNgOperation, List<String>
* @see #methods(Collection) #methods(Collection) * @see #methods(Collection) #methods(Collection)
*/ */
public TestNgOperation methods(String... method) { public TestNgOperation methods(String... method) {
methods_.addAll(List.of(method)); return methods(List.of(method));
return this;
} }
/** /**
@ -517,31 +511,24 @@ public class TestNgOperation extends TestOperation<TestNgOperation, List<String>
} }
/** /**
* Fully qualified class name that implements {@code org.testng.ITestObjectFactory} which can be used to create * The list of {@code .class} files or class names implementing {@code ITestRunnerFactory}.
* <p>
* A fully qualified class name that implements {@code org.testng.ITestObjectFactory} which can be used to create
* test class and listener instances. * test class and listener instances.
* *
* @param objectFactory the object factory * @param factory one or more factory
* @return this operation instance
*/
public TestNgOperation objectFactory(String objectFactory) {
options_.put("-objectfactory", objectFactory);
return this;
}
/**
* The list of {@code .class} files or class names implementing {@code ITestRunnerFactory}.
*
* @param factory one or more factories
* @return this operation instance * @return this operation instance
* @see #objectFactory(Collection) #objectFactory(Collection) * @see #objectFactory(Collection) #objectFactory(Collection)
*/ */
public TestNgOperation objectFactory(String... factory) { public TestNgOperation objectFactory(String... factory) {
options_.put("-objectfactory", String.join(",", Arrays.stream(factory).filter(this::isNotBlank).toList())); return objectFactory(List.of(factory));
return this;
} }
/** /**
* The list of {@code .class} files or class names implementing {@code ITestRunnerFactory}. * The list of {@code .class} files or class names implementing {@code ITestRunnerFactory}.
* <p>
* A fully qualified class name that implements {@code org.testng.ITestObjectFactory} which can be used to create
* test class and listener instances.
* *
* @param factory the list of factories * @param factory the list of factories
* @return this operation instance * @return this operation instance
@ -570,9 +557,7 @@ public class TestNgOperation extends TestOperation<TestNgOperation, List<String>
* @see #overrideIncludedMethods(Collection) #overrideIncludedMethods(Collection) * @see #overrideIncludedMethods(Collection) #overrideIncludedMethods(Collection)
*/ */
public TestNgOperation overrideIncludedMethods(String... method) { public TestNgOperation overrideIncludedMethods(String... method) {
options_.put("-overrideincludedmethods", return overrideIncludedMethods(List.of(method));
String.join(",", Arrays.stream(method).filter(this::isNotBlank).toList()));
return this;
} }
/** /**
@ -600,8 +585,7 @@ public class TestNgOperation extends TestOperation<TestNgOperation, List<String>
* @see #packages(Collection) #packages(Collection) * @see #packages(Collection) #packages(Collection)
*/ */
public TestNgOperation packages(String... name) { public TestNgOperation packages(String... name) {
packages_.addAll(Arrays.stream(name).filter(this::isNotBlank).toList()); return packages(List.of(name));
return this;
} }
/** /**
@ -783,9 +767,7 @@ public class TestNgOperation extends TestOperation<TestNgOperation, List<String>
* @see #spiListenersToSkip(Collection) #spiListenersToSkip(Collection) * @see #spiListenersToSkip(Collection) #spiListenersToSkip(Collection)
*/ */
public TestNgOperation spiListenersToSkip(String... listenerToSkip) { public TestNgOperation spiListenersToSkip(String... listenerToSkip) {
options_.put("-spilistenerstoskip", return spiListenersToSkip(List.of(listenerToSkip));
String.join(",", Arrays.stream(listenerToSkip).filter(this::isNotBlank).toList()));
return this;
} }
/** /**
@ -840,8 +822,7 @@ public class TestNgOperation extends TestOperation<TestNgOperation, List<String>
* @see #suites(Collection) #suites(Collection) * @see #suites(Collection) #suites(Collection)
*/ */
public TestNgOperation suites(String... suite) { public TestNgOperation suites(String... suite) {
suites_.addAll(Arrays.stream(suite).filter(this::isNotBlank).toList()); return suites(List.of(suite));
return this;
} }
/** /**
@ -888,8 +869,7 @@ public class TestNgOperation extends TestOperation<TestNgOperation, List<String>
* @see #testClass(Collection) #testClass(Collection) * @see #testClass(Collection) #testClass(Collection)
*/ */
public TestNgOperation testClass(String... aClass) { public TestNgOperation testClass(String... aClass) {
options_.put("-testclass", String.join(",", Arrays.stream(aClass).filter(this::isNotBlank).toList())); return testClass(List.of(aClass));
return this;
} }
/** /**
@ -914,8 +894,7 @@ public class TestNgOperation extends TestOperation<TestNgOperation, List<String>
* @see #testClasspath(String...) #testClasspath(String...) * @see #testClasspath(String...) #testClasspath(String...)
*/ */
public TestNgOperation testClasspath(String... entry) { public TestNgOperation testClasspath(String... entry) {
testClasspath_.addAll(Arrays.stream(entry).filter(this::isNotBlank).toList()); return testClasspath(List.of(entry));
return this;
} }
/** /**
@ -976,9 +955,7 @@ public class TestNgOperation extends TestOperation<TestNgOperation, List<String>
* @see #testNames(Collection) #testNames(Collection) * @see #testNames(Collection) #testNames(Collection)
*/ */
public TestNgOperation testNames(String... name) { public TestNgOperation testNames(String... name) {
options_.put("-testnames", return testNames(List.of(name));
Arrays.stream(name).filter(this::isNotBlank).map(s -> '"' + s + '"').collect(Collectors.joining(",")));
return this;
} }
/** /**

View file

@ -24,6 +24,7 @@ package rife.bld.extension;
*/ */
@SuppressWarnings({"PMD.TestClassWithoutTestCases", "unused"}) @SuppressWarnings({"PMD.TestClassWithoutTestCases", "unused"})
class TestNgExample { class TestNgExample {
@SuppressWarnings("SameReturnValue")
public String getMessage() { public String getMessage() {
return "Hello World!"; return "Hello World!";
} }