HelloWorld
package com.qunar.basicJava.javase;
public class HelloWorld { public String sayHello() { return "hello wolrd! I'm RoBY"; } public static void main(String[] args) { System.out.println(new HelloWorld().sayHello()); } }--
<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/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.qunar.basicJava</groupId> <!-- com.mycompany.myapp --> <artifactId>javase</artifactId> <!-- myapp --> <version>1.0-SNAPSHOT</version> <packaging>jar</packaging> <name>Maven Hello Java Learn Project</name> <url>http://maven.apache.org</url> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <dependencyManagement> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.11</version> <scope>test</scope> </dependency> </dependencies> </dependencyManagement> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> </dependency> </dependencies> <build> <finalName>SeHello</finalName> <!--<resources>--> <!--<resource>--> <!--<directory>src/main/resources.${deploy.type}</directory>--> <!--</resource>--> <!--<resource>--> <!--<directory>src/main/resources</directory>--> <!--</resource>--> <!--</resources>--> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.7</source> <target>1.7</target> </configuration> </plugin> </plugins> </build> </project>