## Maven으로 Java 프로젝트 만들기 코드 샘플 

 

***pom.xml***

<project>
    <groupId>com.hawaso</groupId>
    <artifactId>java-campus</artifactId>
    <version>1.0-SNAPSHOT</version>
    <modelVersion>4.0.0</modelVersion>
    <packaging>jar</packaging>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.0</version>
                <configuration>
                    <release>11</release>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

 

***HelloWorld.java***

package main.java;

public class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello World");
    }
}

 

***Output***

mvn clean
mvn compile
mvn package

 

Comments


Comments are closed