Created
December 10, 2012 19:04
-
-
Save whiter4bbit/4252604 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
whiter4bbit@mac-mini-pavel ~/mvn-test $ mvn archetype:generate -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-quickstart | |
[INFO] Scanning for projects... | |
[INFO] | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] Building Maven Stub Project (No POM) 1 | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] | |
[INFO] >>> maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom >>> | |
[INFO] | |
[INFO] <<< maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom <<< | |
[INFO] | |
[INFO] --- maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom --- | |
[INFO] Generating project in Interactive mode | |
[INFO] Archetype [org.apache.maven.archetypes:maven-archetype-quickstart:1.1] found in catalog remote | |
Define value for property 'groupId': : test | |
Define value for property 'artifactId': : test | |
Define value for property 'version': 1.0-SNAPSHOT: : | |
Define value for property 'package': test: : | |
Confirm properties configuration: | |
groupId: test | |
artifactId: test | |
version: 1.0-SNAPSHOT | |
package: test | |
Y: : | |
[INFO] ---------------------------------------------------------------------------- | |
[INFO] Using following parameters for creating project from Old (1.x) Archetype: maven-archetype-quickstart:1.1 | |
[INFO] ---------------------------------------------------------------------------- | |
[INFO] Parameter: groupId, Value: test | |
[INFO] Parameter: packageName, Value: test | |
[INFO] Parameter: package, Value: test | |
[INFO] Parameter: artifactId, Value: test | |
[INFO] Parameter: basedir, Value: /Users/whiter4bbit/mvn-test | |
[INFO] Parameter: version, Value: 1.0-SNAPSHOT | |
[INFO] project created from Old (1.x) Archetype in dir: /Users/whiter4bbit/mvn-test/test | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] BUILD SUCCESS | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] Total time: 21.386s | |
[INFO] Finished at: Mon Dec 10 22:01:29 FET 2012 | |
[INFO] Final Memory: 7M/81M | |
[INFO] ------------------------------------------------------------------------ | |
whiter4bbit@mac-mini-pavel ~/mvn-test/test $ cat src/main/java/test/App.java | |
package test; | |
/** | |
* Hello world! | |
* | |
*/ | |
public class App | |
{ | |
public int plus(int a, int b) { | |
return a + b; | |
} | |
public static void main( String[] args ) | |
{ | |
System.out.println( "Hello World!" ); | |
} | |
} | |
whiter4bbit@mac-mini-pavel ~/mvn-test/test $ cat src/test/java/test/AppTest.java | |
package test; | |
import junit.framework.Test; | |
import junit.framework.TestCase; | |
import junit.framework.TestSuite; | |
/** | |
* Unit test for simple App. | |
*/ | |
public class AppTest | |
extends TestCase | |
{ | |
/** | |
* Create the test case | |
* | |
* @param testName name of the test case | |
*/ | |
public AppTest( String testName ) | |
{ | |
super( testName ); | |
} | |
/** | |
* @return the suite of tests being tested | |
*/ | |
public static Test suite() | |
{ | |
return new TestSuite( AppTest.class ); | |
} | |
/** | |
* Rigourous Test :-) | |
*/ | |
public void testApp() | |
{ | |
assertTrue( true ); | |
} | |
public void testPlus() { | |
assertEquals(4, new App().plus(2,2)); | |
} | |
} | |
whiter4bbit@mac-mini-pavel ~/mvn-test/test $ mvn test | |
[INFO] Scanning for projects... | |
[INFO] | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] Building test 1.0-SNAPSHOT | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] | |
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ test --- | |
[INFO] Using 'UTF-8' encoding to copy filtered resources. | |
[INFO] skip non existing resourceDirectory /Users/whiter4bbit/mvn-test/test/src/main/resources | |
[INFO] | |
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ test --- | |
[INFO] Nothing to compile - all classes are up to date | |
[INFO] | |
[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ test --- | |
[INFO] Using 'UTF-8' encoding to copy filtered resources. | |
[INFO] skip non existing resourceDirectory /Users/whiter4bbit/mvn-test/test/src/test/resources | |
[INFO] | |
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ test --- | |
[INFO] Nothing to compile - all classes are up to date | |
[INFO] | |
[INFO] --- maven-surefire-plugin:2.7.2:test (default-test) @ test --- | |
[INFO] Surefire report directory: /Users/whiter4bbit/mvn-test/test/target/surefire-reports | |
------------------------------------------------------- | |
T E S T S | |
------------------------------------------------------- | |
Running test.AppTest | |
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.011 sec | |
Results : | |
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0 | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] BUILD SUCCESS | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] Total time: 3.455s | |
[INFO] Finished at: Mon Dec 10 22:04:36 FET 2012 | |
[INFO] Final Memory: 4M/81M | |
[INFO] ------------------------------------------------------------------------ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment