Maven Notes

Here are some Maven notes.

To use properties in your pom.xml file:

First, define the property:

 <properties>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>    
    <struts2.version>2.3.15</struts2.version>
    <log4j.version>1.2.14</log4j.version>
 </properties>

Here is how to use it in a file:

<version>${struts2.version}</version>

To run a specific class:

mvn exec:java -Dexec.mainClass="info.shelfunit.akka.separate.PiRunner"

To run a specific test file:

mvn test -Dtest=info.shelfunit.webapp.UserManagerBeanTest

To run a specific test in that file:

mvn test -Dtest=info.shelfunit.webapp.UserManagerBeanTest#testDigestString

I will update these notes as I learn more.

END

 

There are 83 words in this article.