Java Reference
In-Depth Information
install
Installs the pom.xml and package into your local Maven repository for use by your other
projects
deploy
Tries to install the package (e.g., on an application server)
Most of the steps implicitly invoke the previous ones—e.g., package will compile any miss-
ing .class files, and run the tests if that hasn't already been done in this run.
Typically there are application-server-specific targets provided; as a single example, with the
JBoss Application Server “WildFly” (formerly known as JBoss AS), you would install some
additional plug-in(s) as per their documentation, and then deploy to the app server using:
mvn jboss-as:deploy
instead of the regular deploy.
Maven pros and cons
Maven can handle complex projects and is very configurable. I built the darwinsys-api and
javasrc projects with Maven and let it handle finding dependencies, making the download of
the project source code smaller (actually, moving the download overhead to the servers of the
projects themselves). The only real downsides to Maven is that it takes a bit longer to get
fully up to speed with it, and the fact that it can be a bit hard to diagnose when things go
wrong. A good web search engine is your friend when things fail.
One issue I fear is that a hacker could gain access to a project's site and modify, or install a
new version of, a POM. Maven automatically fetches updated POM versions. Although the
same issue could affect you if you manage your dependencies manually, it is more likely that
the problem would be detected before you manually fetched the infected version. I am not
aware of this having happened, but it still worries me.
See Also
Start at http://maven.apache.org .
Search WWH ::




Custom Search