diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 1d0ae23..c90fe37 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -26,4 +26,4 @@ jobs:
cache: maven
- name: 'Build and test'
- run: ./mvnw clean verify
+ run: ./mvnw clean test
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
new file mode 100644
index 0000000..5cc2de8
--- /dev/null
+++ b/.github/workflows/deploy.yml
@@ -0,0 +1,26 @@
+name: Publish package to the Maven Central Repository
+on:
+ push:
+ branches: [ master ]
+jobs:
+ publish:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+ - name: Setup Java and Maven
+ uses: actions/setup-java@v4
+ with:
+ java-version: '11'
+ distribution: 'adopt'
+ server-id: ossrh
+ server-username: MAVEN_USERNAME
+ server-password: MAVEN_PASSWORD
+ gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
+ gpg-passphrase: GPG_PASSPHRASE
+ - name: Deploy to Maven Central
+ run: ./mvnw clean deploy -Pdeploy
+ env:
+ MAVEN_USERNAME: ${{ secrets.NEXUS_USERNAME }}
+ MAVEN_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
+ GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 2eb8355..674c516 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
org.testng
testng-ant
- 1.0-SNAPSHOT
+ 1.0.0-SNAPSHOT
testng-ant
TestNG task for Ant
@@ -25,6 +25,13 @@
${ant.version}
provided
+
+
+ org.testng
+ testng
+ [7.10.2,)
+ provided
+
org.apache.ant
ant-testutil
@@ -37,11 +44,6 @@
3.23.1
test
-
- org.testng
- testng
- 7.9.0
-
@@ -85,24 +87,76 @@
-
-
- maven-assembly-plugin
-
-
- jar-with-dependencies
-
-
-
-
- make-assembly
- package
-
- single
-
-
-
-
-
+
+
+
+ deploy
+
+
+
+ org.sonatype.plugins
+ nexus-staging-maven-plugin
+ 1.7.0
+ true
+
+ ossrh
+ https://oss.sonatype.org/
+ true
+
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+ 3.3.1
+
+
+ attach-sources
+
+ jar-no-fork
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 3.7.0
+
+
+ attach-javadocs
+
+ jar
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+ 3.2.4
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+
+
+ --pinentry-mode
+ loopback
+
+
+
+
+
+
+
+
+
diff --git a/src/main/java/org/testng/TestNGAntTask.java b/src/main/java/org/testng/TestNGAntTask.java
index fb313ec..f6daa30 100644
--- a/src/main/java/org/testng/TestNGAntTask.java
+++ b/src/main/java/org/testng/TestNGAntTask.java
@@ -149,7 +149,6 @@ public class TestNGAntTask extends Task {
private String m_testName = "Ant test";
private Boolean m_skipFailedInvocationCounts;
private String m_methods;
- private Mode mode = Mode.testng;
private boolean forkJvm = true;
private boolean m_ignoreMissedTestNames;
@@ -382,14 +381,16 @@ public void setTestName(String s) {
m_testName = s;
}
+ @Deprecated
// TestNG settings
public void setJUnit(boolean value) {
- mode = value ? Mode.junit : Mode.testng;
+ //No Op
}
+ @Deprecated
// TestNG settings
public void setMode(Mode mode) {
- this.mode = mode;
+ //No Op
}
public void setForkJvm(boolean forkJvm) {
@@ -576,14 +577,6 @@ protected List createArguments() {
addReporterConfigs(argv);
addIntegerIfNotNull(argv, CommandLineArgs.SUITE_THREAD_POOL_SIZE, m_suiteThreadPoolSize);
addStringIfNotNull(argv, CommandLineArgs.XML_PATH_IN_JAR, m_xmlPathInJar);
- switch (mode) {
- case junit:
- addBooleanIfTrue(argv, CommandLineArgs.JUNIT, TRUE);
- break;
- case mixed:
- addBooleanIfTrue(argv, CommandLineArgs.MIXED, TRUE);
- break;
- }
addXmlFiles(argv);
return argv;
}