You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Maven uses the notion of a build life-cycle to which plugins can attach. Plugins are similar to Ant tasks. When a Maven build is invoked, we specify a point in the life-cycle up to which the build should proceed. The compile phase comes before test, and test comes before package, and package comes before install. Once we have Maven setup, we can invoke the Struts build, and specify which phase the build should use.

Dependencies

Running mvn in source root will download and setup dependency jars in ~/.m2/repository.

$ mvn

Build Profiles

$ mvn -Pprofile1,profile2,profile3

Development

Good Ol' Terminal

Zsh/Bash/Emacs/Vim/Grep/Sed/Awk/Javac...

$ sh deps/install-non-oss.sh

$ mvn -Dnonoss install

$ ant debug # Good ol' way of doing things

IntelliJ IDEA

FIXME: Add on how to use IntelliJ IDEA with CS, building, debugging, editing, git checkouts

Eclipse

FIXME: Add on how to use Eclipse with CS, building, debugging, editing, git checkouts

Troubleshooting

  • Offline Mode:
$ mvn -o -Pextras,plugins,xwork
  • Out of memory error, out of heap space:
    // Bash
    export MAVEN_OPTS=-Xmx512m
    // Windows
    set MAVEN_OPTS=-Xmx512m
    
  •  
  • No labels