Intellij Idea - Build.xml and deploying a jar

I’m using the Intellij Idea IDE and I am able to run projects fine from within the IDE. However, I’m struggling to utilize the build.xml ANT targets that come with the SDK (which I’ve copied and slightly edited to work with Idea). I’m not too knowledgeable about build targets. I’ve got assets-impl.xml, build.xml, and build-impl.xml in my project root directory, along with the properties files from the SDK (and the “private” folder containing more properties). When I run the jar build target, I’m getting an error that I must set src.dir. This value is set in project.properties and Idea sees this as a used value. I’m having lots of issues like this.
Basically, can anyone tell me what I might be missing to get this going? I wish there was a simple existing Idea project I could copy and work from.
Like I said, the sample projects work fine from inside the IDE, I just can’t figure out how to deploy them to a jar.

I should mention that before the jar build target fails, it does create a dist directory containing README.TXT and TestGame.jar (which is only 883 bytes and does not load). Also, it creates dist/lib which contains 24 jars.

Thanks for any help you guys can give.

Why don’t you just let the SDK set up the project and then make IntelliJ see it as a generic ant project (which it is)?

I created a new JME project in the SDK and opened Intellij. I went through the Import Project dialogs and selected the new SDK project. I added build.xml to the Ant Build targets list in Idea. I ran the jar target and it behaved exactly the same as above. I’m not sure what you mean by “make IntelliJ see it as a generic ant project.” I do appreciate your help.

EDIT:
I got it going. I had imported the wrong build.xml in my previous post. It seems to be working just fine now. Thanks again.

1 Like

Sorry, I have no experience in IntelliJ apart from a few ventures thats why I have to say it so generically. I guess what you did is what I meant, yes :slight_smile: This way you should also be able to use extended SDK features like Android, Desktop and iOS deployment as well as asset editing. The main build.xml should reference all other needed files, so normally you only have to import that one in other IDEs