Archetype is the plugin to do this, you will just need to create your own template. You only need to do it once, deploy it into the repository, and then you can use it over and over:

http://maven.apache.org/plugins/maven-archetype-plugin/advanced-usage.html

Cheers,
Brett

On 05/03/2009, at 3:34 PM, Behrang Saeedzadeh wrote:


That's exactly the kind of thing I don't want to do. That's why I asked about
overriding this default "on the command line".



Rusty Wright wrote:

After you create the project, open the file pom.xml and find the lines

   <dependency>
     <groupId>junit</groupId>
     <artifactId>junit</artifactId>
     <version>3.8.1</version>
     <scope>test</scope>
   </dependency>

and replace them with

       <dependency>
           <groupId>org.testng</groupId>
           <artifactId>testng</artifactId>
           <version>5.8</version>
           <scope>test</scope>
           <classifier>jdk15</classifier>
       </dependency>

Adding these <dependency> things to your pom.xml file is a regular
activity.

Also see

 http://www.exist.com/better-build-maven

 http://www.sonatype.com/book/reference/public-book.html


Behrang Saeedzadeh wrote:
Are there any alternatives to the archetype plugin for creating projects, that either use TestNG or let users choose TestNG on the commandline?

- Behi


Brett Porter-2 wrote:
Not in the archetype - however you can create your own archetypes.

Note that all is required by default is to switch the dependency to
testng.

- Brett

On 05/03/2009, at 2:54 PM, Behrang Saeedzadeh wrote:

Hi,

When creating a new Maven project using archetype:create maven by
default
uses JUnit as the unit testing framework. Is it possible to override
this on
the command line to use TestNG instead?

Thanks in advance,
Behrang
--
View this message in context:
http://n2.nabble.com/Using-TestNG-with-Maven- tp2427290p2427290.html
Sent from the maven users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

--
Brett Porter
[email protected]
http://blogs.exist.com/bporter/


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]





---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]




--
View this message in context: 
http://n2.nabble.com/Using-TestNG-with-Maven-tp2427290p2427394.html
Sent from the maven users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


--
Brett Porter
[email protected]
http://blogs.exist.com/bporter/


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to