So assume I have a Java Project in Intellij. My goal is to export it as a war file and run it in a docker container using jboss. I am using the Intellij ultimate version, so I do have this option of creating a war file. Those are my steps: I first created a new artifact (Web application: Archive) and did not change any of the default settings. Then I went on the build option and simply built the artifact, however I can't seem to get any war file. The only thing new is in the .idea/artifacts/ folder and it is an XML File that looks like this:
<component name="ArtifactManager">
<artifact type="war" name="unnamed">
<output-path>$PROJECT_DIR$/out/artifacts/unnamed</output-path>
<root id="archive" name="unnamed.war" />
</artifact>
</component>
Normally the war file should then be saved in the out/artifacts/ folder but it simply doesn't exist. Something I was thinking about when creating the artifact was that it said "META-INF/MANIFEST.MF file not found in 'unnamed.war'" and then I have the options "Create Manifest" and "Use existing Manifest". Could this help me somehow?
I am testing this with a simple Hello World program that only has the main class but also need it to work for a big project in the future.
Do you know what I'm doing wrong?
question from:
https://stackoverflow.com/questions/66060971/configure-artifact-in-intellij-to-create-a-war-file 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…