Hi! My goal is compile and run TestNG test in Sample application using Maven2. I`m new to Maven, so I`m shure solution for my problem is trivial. I`ve looked for it through the I-Net but found nothing.
Here's my steps: I generate project using archetypes mechanism: mvn archetype:create -DgroupId=lv.bond.labs.mvn.testng -DartifactId=lv.bond.labs.mvn.testng after that from created directory I generate eclipse project: mvn eclipse:eclipse after that I'm editing my pom.xml, so at the end it looks like this: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>lv.bond.labs.mvn.testng</groupId> <artifactId>lv.bond.labs.mvn.testng</artifactId> <packaging>jar</packaging> <version>1.0-SNAPSHOT</version> <name>lv.bond.labs.mvn.testng</name> <url>http://maven.apache.org</url> <build> <defaultGoal>package</defaultGoal> <sourceDirectory>src/java</sourceDirectory> <testSourceDirectory>src/test/java</testSourceDirectory> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.5</source> <target>1.5</target> </configuration> </plugin> </plugins> </build> <dependencies> <dependency> <groupId>org.testng</groupId> <artifactId>testng</artifactId> <version>5.1</version> <scope>test</scope> <classifier>jdk15</classifier> </dependency> </dependencies> </project> but when I run: mvn compile -everithing is ok: C:\dev\workspaces\e3.2.1\ANN2\lv.bond.labs.mvn.testng>mvn test-compile [INFO] Scanning for projects... [INFO] ---------------------------------------------------------------------------- [INFO] Building lv.bond.labs.mvn.testng [INFO] task-segment: [test-compile] [INFO] ---------------------------------------------------------------------------- [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:compile] [INFO] No sources to compile [INFO] [resources:testResources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:testCompile] Compiling 1 source file to C:\dev\workspaces\e3.2.1\ANN2\lv.bond.labs.mvn.testng\target\test-classes [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3 seconds [INFO] Finished at: Mon Feb 05 21:30:47 EET 2007 [INFO] Final Memory: 3M/7M [INFO] ------------------------------------------------------------------------ and when I run: mvn test -something goes wrong C:\dev\workspaces\e3.2.1\ANN2\lv.bond.labs.mvn.testng>mvn test [INFO] Scanning for projects... [INFO] ---------------------------------------------------------------------------- [INFO] Building lv.bond.labs.mvn.testng [INFO] task-segment: [test] [INFO] ---------------------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Error building POM (may not be this project's POM). Project ID: org.apache.maven.plugins:maven-surefire-plugin Reason: Error getting POM for 'org.apache.maven.plugins:maven-surefire-plugin' from the repository: Failed to resolve artifact, possibly due to a repository list that is not appropriately equipped for this artifact's metadata. org.apache.maven.plugins:maven-surefire-plugin:pom:2.8-SNAPSHOT from the specified remote repositories: tapestry.javaforge (http://howardlewisship.com/repository), central (http://repo1.maven.org/maven2), Codehaus Snapshots (http://snapshots.repository.codehaus.org/) [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: < 1 second [INFO] Finished at: Mon Feb 05 21:30:59 EET 2007 [INFO] Final Memory: 2M/4M [INFO] ------------------------------------------------------------------------ C:\dev\workspaces\e3.2.1\ANN2\lv.bond.labs.mvn.testng> I just can't get it what I`m doing wrong? --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
