当前位置:K88软件开发文章中心编程工具Maven → 文章内容

Apache Maven 工程模版

减小字体 增大字体 作者:佚名  来源:网上搜集  发布时间:2019-1-24 10:44:48

p.java 如下所示:路径:C:\ > MVN > health > src > main > java > com > companyname > insurance > App.javapackage com.companyname.insurance;/*** Hello world!**/public class App { public static void main( String[] args ) { System.out.println( "Hello World!" ); }}创建 AppTest.javaMaven 生成一个 java 源文件示例,工程的 AppTest.java 如下所示:路径为: C:\ > MVN > health > src > test > java > com > companyname > insurance > AppTest.javapackage com.companyname.insurance;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 ); }} 就这样。现在你可以看到 Maven 的强大之处。你可以用 maven 简单的命令创建任何类型的工程,并且可以启动您的开发。

上一页  [1] [2] 


Apache Maven 工程模版