Problem with "Error getting POM for 'org.apache.maven.plugins:maven-surefire-plugin' from the repository" was solved when I`ve cleaned a bit my settings.xml file.
But after that I`ve found that my tests doesn`t compiling at all. A've added two more tests to my AppTest.java I`m running either "mvn surefire:test C:\dev\workspaces\e3.2.1\ANN2\lv.bond.labs.mvn.testng>mvn surefire:test [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'surefire'. [INFO] ---------------------------------------------------------------------------- [INFO] Building lv.bond.labs.mvn.testng [INFO] task-segment: [surefire:test] [INFO] ---------------------------------------------------------------------------- [INFO] [surefire:test] [INFO] Surefire report directory: C:\dev\workspaces\e3.2.1\ANN2\lv.bond.labs.mvn.testng\target\surefire-reports ------------------------------------------------------- T E S T S ------------------------------------------------------- Running lv.bond.labs.mvn.testng.AppTest Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.05 sec Results : Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2 seconds [INFO] Finished at: Wed Feb 07 08:45:38 EET 2007 [INFO] Final Memory: 2M/5M [INFO] ------------------------------------------------------------------------ either just "mvn test": 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] [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] [INFO] Nothing to compile - all classes are up to date [INFO] [surefire:test] [INFO] Surefire report directory: C:\dev\workspaces\e3.2.1\ANN2\lv.bond.labs.mvn.testng\target\surefire-reports ------------------------------------------------------- T E S T S ------------------------------------------------------- Running lv.bond.labs.mvn.testng.AppTest Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.03 sec Results : Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 4 seconds [INFO] Finished at: Wed Feb 07 08:46:36 EET 2007 [INFO] Final Memory: 3M/6M [INFO] ------------------------------------------------------------------------ But test output says 0 test runs, but when I run AppTest.java from Eclispe using TestNG I recieve output which indicates that there were 3 Runs and 1 Failure. Here is my POM.xml <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> <resources> <resource> <directory>src/test/*</directory> <includes> <include>**Test.java</include> </includes> </resource> </resources> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.5</source> <target>1.5</target> <!-- <groups>functest,util</groups> --> </configuration> </plugin> </plugins> </build> <dependencies> <dependency> <groupId>org.testng</groupId> <artifactId>testng</artifactId> <!-- <version>5.1</version> --> <version>4.7</version> <scope>test</scope> <classifier>jdk15</classifier> </dependency> </dependencies> <!-- <repositories> <repository> <id>Codehaus Snapshots</id> <url>http://snapshots.repository.codehaus.org/</url> <snapshots> <enabled>true</enabled> </snapshots> <releases> <enabled>false</enabled> </releases> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>Codehaus Snapshots</id> <url>http://snapshots.repository.codehaus.org/</url> <snapshots> <enabled>true</enabled> </snapshots> <releases> <enabled>false</enabled> </releases> </pluginRepository> </pluginRepositories> --> </project> >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] > -- Сегодня удачный день, чтобы завести почту на Яндексе http://mail.yandex.ru --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]