Help manually running plugin tests

Answered

I'm trying to run my plugin's unit tests via Ant (long story). I have the following config:

<java classname="clojure.main" fork="true" dir="${basedir}" failonerror="true">
<classpath>
<path refid="cursive.test.classpath"/>
<path path="${cursive.dir}/${cursive.test.sources}"/>
<path path="${cursive.dir}/${cursive.output}"/>
</classpath>
<jvmarg value="-Xms128m"/>
<jvmarg value="-Xmx1024m"/>
<jvmarg value="-Djava.awt.headless=true"/>
<jvmarg value="-ea"/>
<jvmarg value="-Didea.home.path=${basedir}/sdks/${idea.version}"/>
<jvmarg value="-Didea.platform.prefix=Idea"/>
<jvmarg value="-Didea.config.path=${basedir}/sandbox/config"/>
<jvmarg value="-Didea.system.path=${basedir}/sandbox/system"/>
<jvmarg value="-Didea.plugins.path=${basedir}/sandbox/plugins"/>
<jvmarg value="-Didea.classpath.index.enabled=false"/>
<jvmarg value="-Didea.is.unit.test=true"/>
<jvmarg value="-Dplugin.path=${basedir}/sandbox/plugins/clojure-plugin"/>
<arg value="-e"/>
<arg value="(do (require '[clojure.test :refer [run-tests]]) ${clojure.test.files.final})"/>
</java>
</target>

The Clojure parts are just what's required to run the tests - that part works. However I get an error initialising the IdeaTestApplication:

ERROR: Problems found loading plugins:<p/>Plugin "Maven" was not loaded: required plugin "com.intellij.properties" not installed.<p/><br><a href="disable">Disable Maven</a><p/><a href="edit">Open plugin manager</a>

java.lang.Throwable: Problems found loading plugins:<p/>Plugin "Maven" was not loaded: required plugin "com.intellij.properties" not installed.<p/><br><a href="disable">Disable Maven</a><p/><a href="edit">Open plugin manager</a>
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:145)
at com.intellij.ide.plugins.PluginManagerCore.prepareLoadingPluginsErrorMessage(PluginManagerCore.java:660)
at com.intellij.ide.plugins.PluginManagerCore.initializePlugins(PluginManagerCore.java:1517)
at com.intellij.ide.plugins.PluginManagerCore.initPlugins(PluginManagerCore.java:1688)
at com.intellij.ide.plugins.PluginManagerCore.getLoadedPlugins(PluginManagerCore.java:140)
at com.intellij.idea.IdeaTestApplication.lambda$createInstance$0(IdeaTestApplication.java:97)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

I'm obviously missing something in my magic IntelliJ invocation - do I need anything else?

2 comments
Comment actions Permalink

Actually, I figured this out - I didn't have the properties plugin on the classpath.

0
Comment actions Permalink

Specifically, in Gradle to fix this I had to add properties to the plugins key in my build.gradle:

intellij { 
plugins = [ ... , 'properties']
}
0

Please sign in to leave a comment.