xref: /aosp_15_r20/external/testng/build-with-maven (revision 83a54b2f2026052c38867f4cde56111edcd60b56)
1*83a54b2fSSadaf Ebrahimi# Two different POMs are needed to build TestNG with Maven because it's not
2*83a54b2fSSadaf Ebrahimi# allowed to have circular dependencies.
3*83a54b2fSSadaf Ebrahimi# - pom.xml defines the project version "n-SNAPSHOT", builds, jars and deploys (but doesn't
4*83a54b2fSSadaf Ebrahimi# run the tests).
5*83a54b2fSSadaf Ebrahimi# - pom-test.xml declares a test dependency on "n-SNAPSHOT", which it will find
6*83a54b2fSSadaf Ebrahimi# in the local repository (~/.m2/repository). All it does then is run the tests.
7*83a54b2fSSadaf Ebrahimi
8*83a54b2fSSadaf Ebrahimi
9*83a54b2fSSadaf Ebrahimimvn clean install -Dgpg.skip=true
10*83a54b2fSSadaf Ebrahimi#or if you want to sign the jar, uncomment this:
11*83a54b2fSSadaf Ebrahimi#mvn clean install
12*83a54b2fSSadaf Ebrahimi
13*83a54b2fSSadaf Ebrahimimvn -f pom-test.xml test
14*83a54b2fSSadaf Ebrahimi
15*83a54b2fSSadaf Ebrahimi
16*83a54b2fSSadaf Ebrahimiecho
17*83a54b2fSSadaf Ebrahimiecho "To run the tests: mvn -f pom-test.xml test"
18*83a54b2fSSadaf Ebrahimiecho "To deploy to the snapshot repository: mvn deploy"
19*83a54b2fSSadaf Ebrahimiecho "To deploy to the release directory: mvn release:clean release:prepare release:perform"
20*83a54b2fSSadaf Ebrahimiecho "Nexus UI:  https://oss.sonatype.org/index.html"
21*83a54b2fSSadaf Ebrahimiecho "Wiki: https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide"
22*83a54b2fSSadaf Ebrahimi
23*83a54b2fSSadaf Ebrahimi# deploy without tagging: mvn deploy -DperformRelease
24*83a54b2fSSadaf Ebrahimi
25*83a54b2fSSadaf Ebrahimi
26