![]() ![]() The MANIFEST.MF needs to be in your resources folder and the Main.Class needs to refer to File -> Project Structure -> Project Settings -> Artifacts -> Click green plus sign -> Jar -> From modules with dependencies. ![]() create a package, create a java program inside that package (same as above).Method 2: Build jar with maven without pom.xml change Your jar file will show up inside the target folder open maven project box by click on the search icon and type maven, create a package, create a java program inside that packageĤ.Here are 2 examples with maven project, step by step: Method 1: Build jar with maven and pom.xml This procedure will create the jar file under the "target" folder Add the "assembly:single" maven goal after build to be executed last.It will create an "out" folder with your jar file and its dependencies. To build your artifact go to build artifacts and choose "rebuild". Then you choose the dependencies what you want to be packed IN your jar, or NEAR your jar file Replace "java" with "resources" \src\main\resources You have to change manifest directory: \src\main\java Select the main class, and be sure to change the manifest folder:.I found 2 possibilities to create working jar-s under IntelliJ 2017.2 This is still an issue in 2017, I hope it will help somebody out there!
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |