Building a simple project with Maven

Let us now build the project that was created in the preceding section.

How to do it...

To build the previously created simple project with Maven, perform the following steps:

  1. Open the command prompt and run the following command, changing the directory to the folder the project was created:
    mvn package
    
  2. Observe the following things in the output:

    Notice the following warning (we will see how to resolve this later in this book):

    [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ simple-project ---
    [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources,
    i.e. build is platform dependent!
    

    Check if the sources are compiled:

    [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) ...

Get Apache Maven Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.