I added the following Jackson dataformat dependency to be able to serialize/deserialize Java POJO to/from XML:
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-xml</artifactId>
<version>2.12.7</version>
</dependency>
I am building a component that will introduce changes to a deployed instance and usually I am expected to generate one or two JAR files. After I added the above dependency, I noticed that I have to add the following JAR files to the classpath of the main deployed instance so that it works:
- jackson-annotations-2.14.2.jar
- jackson-core-2.14.2.jar
- jackson-databind-2.14.2.jar
- jackson-dataformat-xml-2.12.7.jar
- woodstox-core-6.2.4.jar
- stax2-api-4.2.1.jar
- jackson-module-jaxb-annotations-2.12.7.jar
In addition to the above, I have to generate the JAR file for the newly developed classes. I am using the following section in pom.xml
for this purpose:
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>final</id>
<goals>
<goal>jar</goal>
</goals>
<phase>package</phase>
<configuration>
<classifier></classifier>
<finalName>NewJARFileName</finalName>
<includes>
<include>com\path\to\java\classes1\**</include>
<include>com\path\to\java\classes2\**</include>
...
</includes>
<excludes>
<exclude>**/*.properties</exclude>
</excludes>
<archive>
<addMavenDescriptor>false</addMavenDescriptor>
</archive>
</configuration>
</execution>
</executions>
</plugin>
I am manually copying the above files to the lib folder of the deployed instance and I modified the classpath accordingly. Everything is working file, however, I'm trying to find a way to combine the new 7 JAR files with the JAR file I am building into 1 or 2 files during the build process to simplify the deployment process.
I appreciate your help.