- Problems with XMLBeans Plugin and testing your Mevenide2 IDEA plugin
In case you want to test your Mevenide2 IDEA plugin and you choose to run the plugin from the IDEA launcher and open a POM which uses the XMLBeans plugin to generate AND compile sources from XSD files it is possible to run into the following exception:
java.io.IOException: Cannot run program "C:\Program Files\idea\bin\javac": CreateProcess error=2, The system cannot find the file at java.lang.ProcessBuilder.start(ProcessBuilder.java:459) at java.lang.Runtime.exec(Runtime.java:593) at java.lang.Runtime.exec(Runtime.java:466) at org.apache.xmlbeans.impl.tool.CodeGenUtil.externalCompile(CodeGenUtil.java:229)
The XMLBeans compile process fails to compile the generated sources and the Maven embedder process stops with an error message. You will not see the exception in the started IDEA instance with the plugin you wanted to test but in the "Run" window of your original IDEA IDE instance. This error only occurs when testing the plugin but does not occur when using the plugin in production mode.
It seems that the started IDEA instance is passing a wrong path value for the Javac compiler to the XMLBeans plugin. The XMLBeans plugin is passing the value "C:\Program Files\idea\bin\javac" to the XML Beans Schema compiler which fails to create the external javac process.
Labels
(None)
