Skip to end of metadata
Go to start of metadata

All stuff necessary for development of S2 plugin (IDEA 12 Ultimate Edition).

Feel free to ask if you encounter any problems.

Setting up project

Creating project

  • check out sources from to CHECKOUT_FOLDER
  • create new project, "create project from scratch"
  • choose CHECKOUT_FOLDER for "Project file location"
  • adjust Module settings:
    • Type: Plugin Module
    • Name: "plugin"
    • Content root: CHECKOUT_FOLDER/plugin
    • Module file location: CHECKOUT_FOLDER/plugin
  • Java source files: uncheck all except for CHECKOUT_FOLDER/src and CHECKOUT_FOLDER/src-test
  • select current IDEA installation directory for Project JDK

Adjusting IDEA JDK

Adjust IDEA JDK by adding the following additional libraries (all paths relative to IDEA_HOME)

/*.jar = all JAR files found under corresponding /lib-folder

  • /lib/idea.jar
  • /lib/xxp3-1.1.4-min.jar
  • /plugins/aop-common/*.jar
  • /plugins/CSS/*.jar
  • /plugins/DatabaseSupport/*.jar
  • /plugins/FreeMarker/*.jar
  • /plugins/Groovy/lib/Groovy.jar|groovy-dsl.jar
  • /plugins/htmltools/htmltools.jar
  • /plugins/JavaEE/*.jar
  • /plugins/java-i18n/*.jar
  • /plugins/JavaScriptLanguage/*.jar
  • /plugins/jsp/jsp-impl.jar
  • /plugins/properties/*.jar
  • /plugins/Spring/spring.jar|spring-web.jar
  • /plugins/StrutsAssistant/*.jar
  • /plugins/Velocity/*.jar

Adjusting project

  • delete newly created plugin/META-INF folder
  • Adjust module settings for "plugin"
  • path to META-INF/plugin.xml --> /plugin/src/META-INF/plugin.xml
  • mark /src-test as Test Sources
  • Create new Java module from content root "dom-api", mark "plugin" module to depend on "dom-api"
  • Create new Java module from content root "ognl", mark "plugin" module to depend on "ognl"


Running tests

Modify com.intellij.struts2.BasicLightHighlightingTestCase#TEST_DATA_PATH to point to your local testData directory.
Adjust the path to the JDK used within your IDEA-JDK and add the following VM parameter to your test run configuration(s):


Test run configurations use

where /community/ is located in PATH_TO_IDEA_SOURCES

Weird errors starting tests

Most probably you forgot to setup IDEA JDK and/or (transitive) dependencies to other plugins have changed. Please add a comment to this page if you find a missing dependency.

  • No labels