Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: p

...

Maven has a great feature that will allow you to build up your IDEA or Eclipse project files based on the project build structure. Using the Maven project files helps keep developers in-sync and efficient. The IDEA project files are pre-configured to define in the Run/Debug menu many common tasks, such as "execute all tests", "launch the showcase sample app", and so fort.

IDEA by JetBrains

The Maven IDEA plugin creates IDEA project and modules files, based on the Maven build configuraton (pom.xml).

First, be sure you have the latest IDEA plugin for Maven.

Code Block
titleGet the latest plugin!
mvn -DconnectionUrl=scm:svn:http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-idea-plugin \
    -Dgoals=install \
    scm:bootstrap

Aside from running phases, Maven Most often, we use Maven to build projects, but it can also run plugins , and you can even specify phases and plugins as a single commanddirectly. To just build the an IDEA project file for Struts 2, including all the profiles are optional, but it can be a good idea to use them anyway.modules, run

Code Block
titleGenerate the project files
> mvn idea:idea -PthirdpartyPapps,extras,thirdparty,xwork idea:idea

Maven will generate projectstruts-parent.ipr, projectstruts-parent.iws, and an iml file for each module in the build. listed Open up projectstruts-parent.ipr in IDEA, and you shuold should be good to go.

If you ever need to rebuild your projects, running the idea:idea command again will update your files without overriding any information that doesn't conflict. If you do want to overwrite the project files, specify the overwrite parameter as true.

Code Block
titleStarting over
> mvn idea:idea -Doverwrite=true -Pextras,xwork idea:ideaPapps,extras,thirdparty,xwork

If you only need to rebuild some of the modules, adjust the list of "profiles". 

Tip
titleClearing the cache

If you find the xwork module causing you problems, such as displaying as "XWork" when it should be named "xwork", the problem is likely to be within IDEA. Try clearing out your IDEA system cache and then run it again

...