Cleaned up examples

This commit is contained in:
Erik C. Thauvin 2023-08-20 17:13:04 -07:00
parent 06a2baa8af
commit 945e6bc037
2 changed files with 11 additions and 4 deletions

View file

@ -13,7 +13,7 @@ To install, please refer to the [extensions documentation](https://github.com/ri
To run the tests with TestNG, add the following to your build file: To run the tests with TestNG, add the following to your build file:
```java ```java
@BuildCommand(summary = "Run tests with TestNG") @BuildCommand(summary = "Tests the project with TestNG")
public void testng() throws Exception { public void testng() throws Exception {
new TestNgOperation() new TestNgOperation()
.fromProject(this) .fromProject(this)
@ -29,7 +29,7 @@ public void testng() throws Exception {
You could also override the default `test` command: You could also override the default `test` command:
```java ```java
@BuildCommand(summary = "Run tests with TestNG") @BuildCommand(summary = "Tests the project with TestNG")
public void test throws Exception { public void test throws Exception {
new TestNgOperation() new TestNgOperation()
.fromProject(this) .fromProject(this)

View file

@ -9,6 +9,13 @@ import java.util.List;
import static rife.bld.dependencies.Repository.MAVEN_CENTRAL; import static rife.bld.dependencies.Repository.MAVEN_CENTRAL;
import static rife.bld.dependencies.Scope.test; import static rife.bld.dependencies.Scope.test;
/**
* Example build.
*
* <ul style="list-style-type:none">
* <li>./bld compile test</li>
* </ul>
*/
public class ExamplesBuild extends BaseProject { public class ExamplesBuild extends BaseProject {
public ExamplesBuild() { public ExamplesBuild() {
pkg = "com.example"; pkg = "com.example";
@ -23,8 +30,8 @@ public class ExamplesBuild extends BaseProject {
new ExamplesBuild().start(args); new ExamplesBuild().start(args);
} }
@BuildCommand(summary = "Run tests with TestNG") @BuildCommand(summary = "Tests the project with TestNG")
public void testng() throws Exception { public void test() throws Exception {
new TestNgOperation() new TestNgOperation()
.fromProject(this) .fromProject(this)
.packages("com.example") .packages("com.example")