Where is my Jar file, no Jar is created after compile?
I'm having a hard time migrating from Netbeans to IntelIJ, I have some projects in Spring Boot & maven that I can successfully run and I can successfully compile in IntelIJ but no JAR is created. Where is the JAR? I searched all the files of the project no JAR is created.
Another problem is that I can't run Maven from the IntelIJ terminal, mvn command is not found. I tried to change “Maven home path” from “Bundled (Maven 3)” to “Use Maven wrapper” but still mvn is not found.
This is the output of the compile:
`Clearing build system data…
Executing pre-compile tasks…
Cleaning output directories…
Running 'before' tasks
Checking sources
Copying resources... [novensys]
Parsing java… [novensys]
Writing classes… [novensys]
Adding nullability assertions… [novensys]
Adding pattern assertions… [novensys]
Updating dependency information… [novensys]
Parsing java… [tests of novensys]
Writing classes… [tests of novensys]
Adding nullability assertions… [tests of novensys]
Adding pattern assertions… [tests of novensys]
Updating dependency information… [tests of novensys]
Running 'after' tasks
javac 23.0.1 was used to compile java sources
Finished, saving caches…
Executing post-compile tasks…
Finished, saving caches…
Synchronizing output directories…
27/11/2024 12:01 PM - Build completed successfully with 1 warning in 5 sec, 952 ms`
This is the POM file:
`<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.3.6</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.caido</groupId>
<artifactId>novensys</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>novensys</name>
<description>Novensys Card Library</description>
<url/>
<licenses>
<license/>
</licenses>
<developers>
<developer/>
</developers>
<scm>
<connection/>
<developerConnection/>
<tag/>
<url/>
</scm>
<packaging>jar</packaging>
<properties>
<java.version>23</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
<version>5.13.0</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.5</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-websocket</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-websocket</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
`
This arethe idea.log file contents:
`2024-11-27 12:22:07,589 [1595336] INFO - #c.i.w.i.i.j.s.JpsGlobalModelSynchronizerImpl - Saving global entities com.intellij.platform.workspace.jps.entities.SdkEntity to files
2024-11-27 12:22:07,590 [1595337] INFO - #c.i.w.i.i.j.s.JpsGlobalModelSynchronizerImpl - Saving global entities com.intellij.platform.workspace.jps.entities.LibraryEntity to files
2024-11-27 12:22:07,698 [1595445] INFO - #c.i.c.i.CompileDriver - COMPILATION STARTED (BUILD PROCESS)
2024-11-27 12:22:07,918 [1595665] INFO - #c.i.c.s.BuildManager - BUILDER_PROCESS [stderr]: Be careful, logger will be shut down earlier than application: Unable to make field private static java.util.IdentityHashMap java.lang.ApplicationShutdownHooks.hooks accessible: module java.base does not "opens java.lang" to unnamed module @6acbcfc0
2024-11-27 12:22:07,967 [1595714] INFO - #c.i.c.s.BuildManager - BUILDER_PROCESS [stdout]: Build process started. Classpath: C:/Program Files/JetBrains/IntelliJ IDEA 2024.2.3/plugins/java/lib/jps-launcher.jar
2024-11-27 12:22:08,480 [1596227] INFO - #c.i.w.i.i.j.s.JpsGlobalModelSynchronizerImpl - Saving global entities com.intellij.platform.workspace.jps.entities.SdkEntity to files
2024-11-27 12:22:08,480 [1596227] INFO - #c.i.w.i.i.j.s.JpsGlobalModelSynchronizerImpl - Saving global entities com.intellij.platform.workspace.jps.entities.LibraryEntity to files
2024-11-27 12:22:08,631 [1596378] INFO - #c.i.c.b.CompilerReferenceServiceBase - backward reference index reader is closed
2024-11-27 12:22:08,631 [1596378] INFO - #o.j.k.i.s.r.KotlinCompilerReferenceIndexStorage - KCRI storage is closed (didn't exist)
2024-11-27 12:22:11,355 [1599102] INFO - #c.i.w.i.i.j.s.JpsGlobalModelSynchronizerImpl - Saving global entities com.intellij.platform.workspace.jps.entities.SdkEntity to files
2024-11-27 12:22:11,357 [1599104] INFO - #c.i.w.i.i.j.s.JpsGlobalModelSynchronizerImpl - Saving global entities com.intellij.platform.workspace.jps.entities.LibraryEntity to files
2024-11-27 12:22:13,676 [1601423] INFO - #c.i.c.b.CompilerReferenceServiceBase - backward reference index reader is opened
2024-11-27 12:22:13,677 [1601424] WARN - #o.j.k.i.s.r.KotlinCompilerReferenceIndexStorage - kotlin-data-container is not found
2024-11-27 12:22:13,697 [1601444] INFO - #c.i.c.i.CompilerUtil - COMPILATION FINISHED (BUILD PROCESS); Errors: 0; warnings: 1 took 6357 ms: 0 min 6sec
2024-11-27 12:22:13,927 [1601674] INFO - #c.i.c.s.BuildManager - BUILDER_PROCESS [stderr]: Be careful, logger will be shut down earlier than application: Unable to make field private static java.util.IdentityHashMap java.lang.ApplicationShutdownHooks.hooks accessible: module java.base does not "opens java.lang" to unnamed module @6acbcfc0
2024-11-27 12:22:13,973 [1601720] INFO - #c.i.c.s.BuildManager - BUILDER_PROCESS [stdout]: Build process started. Classpath: C:/Program Files/JetBrains/IntelliJ IDEA 2024.2.3/plugins/java/lib/jps-launcher.jar
2024-11-27 12:22:16,807 [1604554] INFO - #c.i.o.p.DumbServiceImpl - enter dumb mode [novensys]
2024-11-27 12:22:16,822 [1604569] INFO - #c.i.o.p.MergingQueueGuiExecutor - Running task: (dumb mode task) com.intellij.openapi.roots.impl.PushedFilePropertiesUpdaterImpl$MyDumbModeTask@105529ad (reason: Push on VFS changes)
2024-11-27 12:22:16,825 [1604572] INFO - #c.i.o.p.MergingQueueGuiExecutor - Task finished: (dumb mode task) com.intellij.openapi.roots.impl.PushedFilePropertiesUpdaterImpl$MyDumbModeTask@105529ad (reason: Push on VFS changes)
2024-11-27 12:22:16,827 [1604574] INFO - #c.i.o.p.DumbServiceImpl - exit dumb mode [novensys]
2024-11-27 12:22:31,639 [1619386] INFO - #c.i.w.i.i.j.s.JpsGlobalModelSynchronizerImpl - Saving global entities com.intellij.platform.workspace.jps.entities.SdkEntity to files
2024-11-27 12:22:31,640 [1619387] INFO - #c.i.w.i.i.j.s.JpsGlobalModelSynchronizerImpl - Saving global entities com.intellij.platform.workspace.jps.entities.LibraryEntity to files
`
Please sign in to leave a comment.
Hi, does that help by check Delegate IDE build/run actions to Maven in the menu File | Settings |Build, Execution, Deployment \> Build Tools \> Maven \> Runner options?
There also should be a jar task in the Maven tool window. You can run it then a jar file will be created under the project's target folder.
Yes that solved the problem, thank you.