Reputation: 1507
I am trying to create a jar using the Intellij Generated Ant Build.
When I create the ant build I am using the following options:
I then run the following command on my command line
ant -f buildfile.xml
It looks like it works on the command line. There are a few notes, but no errors. When it finishes it says BUILD SUCCESSFUL. However a .jar is never created.
I found this link: Ant build doesn't make jar file which seems to be my problem. However, I can't seem to figure out how to create a "release" build file from Intellij. I copied my current ant build file and renamed it "build.xml" and ran the command ant release. When I ran that command I got the following error:
BUILD FAILED Target "release" does not exist in the project "MyProject"
Any further help or ideas for next steps would be great.
Upvotes: 2
Views: 5301
Reputation: 1507
I was able to figure it out.
I had to go to open the Project Settings (F4) and then went to Artifacts. That allowed me to set the settings to create the jar when I ran "ant -f buildfile.xml"
Upvotes: 4