Created
June 4, 2024 19:20
-
-
Save HSGamer/8c56f5821eb9a86914003f2a783f9580 to your computer and use it in GitHub Desktop.
Dependency Folder and Lib Classpath with Maven
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-dependency-plugin</artifactId> | |
<version>3.6.1</version> | |
<executions> | |
<execution> | |
<id>copy-dependencies</id> | |
<phase>package</phase> | |
<goals> | |
<goal>copy-dependencies</goal> | |
</goals> | |
<configuration> | |
<outputDirectory>${project.build.directory}/lib</outputDirectory> | |
<overWriteReleases>false</overWriteReleases> | |
<overWriteSnapshots>false</overWriteSnapshots> | |
<overWriteIfNewer>true</overWriteIfNewer> | |
</configuration> | |
</execution> | |
</executions> | |
</plugin> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-jar-plugin</artifactId> | |
<version>3.3.0</version> | |
<configuration> | |
<archive> | |
<manifest> | |
<addClasspath>true</addClasspath> | |
<classpathPrefix>lib/</classpathPrefix> | |
<mainClass>me.hsgamer.edusys.MainJFrame</mainClass> <!-- Change this to your main class --> | |
</manifest> | |
</archive> | |
</configuration> | |
</plugin> | |
</plugins> | |
</build> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment