

build is platform dependent! Compiling 1 source file to target/classes - maven-resources-plugin:2.6:testResources (default-testResources) java-archive - Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! skip non existing resourceDirectory src/main/resources - maven-compiler-plugin:2.5.1:compile (default-compile) java-archive - File encoding has not been set, using platform encoding UTF-8, i.e.

Building java-archive 1.0-SNAPSHOT - maven-resources-plugin:2.6:resources (default-resources) java-archive - Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. jar file for us $ mvn package Scanning for projects. jar file straight away, we can create a simple Java file, src/main/java/localdomain/localhost/tutorial/Main.java: package public class Main Īnd then we can ask Maven to package up the. So we can use these defaults to get building our. jar file will be found in the src/main/resources directory jar file will be found in the directory src/main/java and any additional resources that should be copied into the.
#How to install maven coordinates code#
There are similar conventions that Maven uses, for example Maven expects that the Java source code to be compiled and packaged within the. jar file, we don't have to tell Maven what packaging to use. Maven uses convention over configuration, this means that you only need to tell Maven the things that are different from the defaults.įor example, the default packaging is jar, so conveniently for us here, as we want to build a. We save the project model in a file called pom.xml Convention over configuration This gives us the following project model 4.0.0 java-archive 1.0-SNAPSHOT jar file for local consumption only, so we will use the coordinates

Maven likes to give things coordinates to help locate them. This is a continuation of the Maven in 60 seconds tutorial Project model
