How to create jar file without java classes but with a folder using maven

Frankio1

I created jar file from some reporting designer tool: enter image description here And now I want to create same jar file but with maven. So I have the fonts and that properties file and created new maven module and I am wondering what plugin should be used to achieve exactly the structure as in the picture attached. Let's say that I have those fonts in /src/main/resources folder together with jasperreports_extension.properties in my new maven module and in second option I have those fonts in some external folder like /home/user/fonts also together with jasperreports_extension.properties

Currently I am using those fonts to embedd to them to jasper reports and it can be done if this jar is on classpath of running application.

It is working with below approach, but for audit reasons I need to remove all system-scope dependencies.

<dependency>
            <groupId>my.group.id</groupId>
            <artifactId>my-fonts</artifactId>
            <version>1.0</version>
            <scope>system</scope>
            <systemPath>${basedir}/src/main/resources/reps/fonts.jar</systemPath>
        </dependency>

Regards

Thorbjørn Ravn Andersen

src/main/resources are resources to be put on the classpath which are copied to the jar file "as-is" (except you may ask for the files to be filtered, which means "expand variables, please").

So if you put your files in src/main/resources/fonts you should get what I think you ask for, as part as a normal compilation even if you don't have any Java files in the project.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Java

How to create a jar without meta-inf folder in maven?

From Java

Create a Java REST Application JAR without using Gradle/Maven?

From Java

How can I create an executable jar without dependencies using Maven?

From Dev

How to create a executable jar file using Maven and Netbeans

From Dev

Create a single jar that will contain compiled classes and javadoc without Maven

From Dev

How to create POJO classes using JAXB maven plugin in java 11

From Java

How to include a config file in the "META-INF/services" folder of a JAR using Maven

From Java

How to create Java project in Netbeans, without using Maven as default?

From Java

How to create a file in java (not a folder) ?

From Dev

How to create a file in a folder in java

From Java

How to create a Map with folder and corresponding file using java8

From Dev

How to create a Java archive (.jar) file using NetBeans IDE 8.2

From Dev

How to create a jar with Maven that includes dependencies in a separate folder for each dependency

From Dev

How to create executable jar in Kotlin using maven-assembly-plugin without a main class?

From Dev

How to add only its own classes to a jar file without subpackages using ant script?

From Dev

create jar file with xml file inside using maven

From Dev

Using Maven to create Javadocs as a zip file instead of a jar file

From Dev

How to make an executable .jar file using maven with local external libraries inside through pom without IDE?

From Dev

how to create a executable jar file which can execute the methods from other java classes in same package

From Dev

How do I create an executable jar file including dependencies where the main class is in Test, using Maven

From Dev

Include library for JAXB into JAR file without using Maven

From Java

How do I create a private Maven repository on S3 from jar not .java file?

From Dev

Need to create Java JAR file and add it to Maven Dependency

From Java

Maven create jar file with both .class and .java files

From Dev

Create JAR with one file in Maven

From Dev

Create jar file from maven

From Java

How to create a runnable jar with maven that includes dependencies in a separate "lib" folder (not an uber jar)

From Dev

How to create Libgdx jar file using Intellij?

From Java

How to create a .jar file using the terminal

Related Related

  1. 1

    How to create a jar without meta-inf folder in maven?

  2. 2

    Create a Java REST Application JAR without using Gradle/Maven?

  3. 3

    How can I create an executable jar without dependencies using Maven?

  4. 4

    How to create a executable jar file using Maven and Netbeans

  5. 5

    Create a single jar that will contain compiled classes and javadoc without Maven

  6. 6

    How to create POJO classes using JAXB maven plugin in java 11

  7. 7

    How to include a config file in the "META-INF/services" folder of a JAR using Maven

  8. 8

    How to create Java project in Netbeans, without using Maven as default?

  9. 9

    How to create a file in java (not a folder) ?

  10. 10

    How to create a file in a folder in java

  11. 11

    How to create a Map with folder and corresponding file using java8

  12. 12

    How to create a Java archive (.jar) file using NetBeans IDE 8.2

  13. 13

    How to create a jar with Maven that includes dependencies in a separate folder for each dependency

  14. 14

    How to create executable jar in Kotlin using maven-assembly-plugin without a main class?

  15. 15

    How to add only its own classes to a jar file without subpackages using ant script?

  16. 16

    create jar file with xml file inside using maven

  17. 17

    Using Maven to create Javadocs as a zip file instead of a jar file

  18. 18

    How to make an executable .jar file using maven with local external libraries inside through pom without IDE?

  19. 19

    how to create a executable jar file which can execute the methods from other java classes in same package

  20. 20

    How do I create an executable jar file including dependencies where the main class is in Test, using Maven

  21. 21

    Include library for JAXB into JAR file without using Maven

  22. 22

    How do I create a private Maven repository on S3 from jar not .java file?

  23. 23

    Need to create Java JAR file and add it to Maven Dependency

  24. 24

    Maven create jar file with both .class and .java files

  25. 25

    Create JAR with one file in Maven

  26. 26

    Create jar file from maven

  27. 27

    How to create a runnable jar with maven that includes dependencies in a separate "lib" folder (not an uber jar)

  28. 28

    How to create Libgdx jar file using Intellij?

  29. 29

    How to create a .jar file using the terminal

HotTag

Archive