Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

Update README.adoc #55

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ Maven is now ready to build the project. You can execute several build lifecycle

To try out the build, issue the following at the command line:

[source,text]
----
mvn compile
----
Expand All @@ -106,6 +107,7 @@ This will run Maven, telling it to execute the _compile_ goal. When it's finishe

Since it's unlikely that you'll want to distribute or work with _.class_ files directly, you'll probably want to run the _package_ goal instead:

[source,text]
----
mvn package
----
Expand All @@ -114,6 +116,7 @@ The _package_ goal will compile your Java code, run any tests, and finish by pac

To execute the JAR file run:

[source,text]
----
java -jar target/gs-maven-0.1.0.jar
----
Expand All @@ -122,6 +125,7 @@ NOTE: If you've changed the value of `<packaging>` from "jar" to "war", the resu

Maven also maintains a repository of dependencies on your local machine (usually in a _.m2/repository_ directory in your home directory) for quick access to project dependencies. If you'd like to install your project's JAR file to that local repository, then you should invoke the `install` goal:

[source,text]
----
mvn install
----
Expand Down Expand Up @@ -187,6 +191,7 @@ include::complete/src/test/java/hello/GreeterTest.java[]

Maven uses a plugin called "surefire" to run unit tests. The default configuration of this plugin compiles and runs all classes in `src/test/java` with a name matching `*Test`. You can run the tests on the command line like this

[source,text]
----
mvn test
----
Expand Down