How I can create a Ant task to compile GUI forms (XML) in Intellij IDEA? I use Scala and Java in my project. Java only for GUI class, and I create it with Intellij IDEA UI Designer.
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
Here's the correct way:
Works for both Intellij Community and Ultimate. Tested in both. Just change it to your Intellij Community path, so "IntelliJ IDEA Community Edition 14.1.4", for example.
Since this comes up on google, here is what is needed:
The key is asm and asm-all which solves ClassReader and ClassWriter errors. I had to look in the jars to find that out. "javac2.home" will be OS dependent. This is on Intellij Ultimate.
Same problem here. Solved this way:
Please don't beat me, but after setting the 'Generate Ant Build'-dialog like:
the errors are gone:
IDEA provides a Ant task, javac2, that does this. It's a drop-in replacement for the standard javac Ant task.
First, you'll need to include something like the following near the top of your Ant build file.
Here "${idea.dir}" refers to the directory of your IDEA installation. Those jars are redistributable, so you can copy them into your project if you wish, and refer to them there. Once you've done that, just replace any calls to "javac" tasks with "javac2", and everything should just work.
To compile scala, of course, you'll need calls to either scalac or fsc, but those are unaffected by all of this.