If you configure the
maven.idea_plugin.descriptor
(META-INF/plugin.xml) property, your
configuration file will be pre-processed by the maven's Velocity engine.
In that case you can refer to the current version of the project by adding ${pom.currentVersion} somewhere in your configuration file.
Sample :
<!DOCTYPE idea-plugin SYSTEM "http://plugins.intellij.net/plugin.dtd"> <idea-plugin url="${pom.url}"> <name>${pom.name}</name> <description>${pom.description}</description> <version>${pom.currentVersion}</version> ... <application-components> <component> ... </component> </application-components> <actions> <action id="Actions.ActionsPlugin.UltraEditAction" class="com.agf.test.runner.UltraEditAction" text="UltraEdit" description="Open in UltraEdit."/> ... </actions> </idea-plugin>
For using IDEA dependencies in your plug-in, you had to do 2 steps :
In the project.xml | In the project.properties |
---|---|
<project> <pomVersion>3</pomVersion> <id>jalopy-intellij</id> .... <dependencies> <dependency> <id>idea</id> <version>4.0</version> </dependency> <dependency> <id>idea-jdom</id> <version>4.0</version> </dependency> .... </dependencies> .... </project> |
... # -------------------------------------------- # M A V E N J A R O V E R R I D E (for IDEA) # -------------------------------------------- maven.jar.override = on maven.jar.idea = ${maven.idea.root}/lib/idea.jar maven.jar.idea-jdom = ${maven.idea.root}/lib/jdom.jar |
If your plug-in use external dependencies (not in IDEA) you must add a property in the dependency tag of your project.xml.
In the project.xml | In the project.properties |
---|---|
<project> <pomVersion>3</pomVersion> <id>jalopy-intellij</id> ... <dependencies> .... <!-- JALOPY lib --> <dependency> <id>jalopy</id> <version>1.0b10</version> <properties> <idea.plugin.lib>true</idea.plugin.lib> </properties> </dependency> ... </dependencies> ... </project> | N/A |