1

when I try to build my .jar (as described here) I get a MANIFEST.MF and a xml file inside the artifacts folder that's in the .idea folder. However I have no artifact folder with a .jar file inside the out folder. That's where the .jar file should be. This build process had worked earlier and I have no idea what I messed up.

I really need to build a jar and I used the IntelliJ GUI creator so I can't simply build a jar with an other program because it uses some compiled classes from a IntelliJ library, can I?

The xml file inside the artifacts folder:

<component name="ArtifactManager">
  <artifact type="jar" name="Zimmerbelegung_BwInf36:jar">
    <output-path>$PROJECT_DIR$/out/artifacts/Zimmerbelegung_BwInf36_jar</output-path>
    <root id="archive" name="Zimmerbelegung_BwInf36.jar">
      <element id="directory" name="META-INF">
        <element id="file-copy" path="$PROJECT_DIR$/META-INF/MANIFEST.MF" />
      </element>
      <element id="module-output" name="Zimmerbelegung_BwInf36" />
    </root>
  </artifact>
</component>

My project structure looks like this:

atalantus
  • 721
  • 2
  • 9
  • 26
  • 1
    i think you can use maven. it comes with idea and you can simply build .jar. Just recreate maven project using idea, or add [maven pattern](https://www.tutorialspoint.com/maven/maven_intellij_idea.htm) to your existing project – akhambir Nov 27 '17 at 14:59
  • You could still build it using the jar command line tool if you need to. But Maven would be easier, as suggested by akhambir. – Kim Moritz Nov 27 '17 at 15:47
  • Have you run "Build | Build Artifact"? – y.bedrov Nov 27 '17 at 16:39
  • @y.bedrov Oh thanks this worked. At the first time IntelliJ did this automatically – atalantus Nov 29 '17 at 13:48

1 Answers1

1

IntelliJ didn't automatically build the artifact.

So I had to build it manually: (Build > Build Artifacts...)

atalantus
  • 721
  • 2
  • 9
  • 26