How to replace a file inside a JAR that is inside a RAR in Maven EAR build

I am trying to create an EAR consisting of some resource adapter (let it be called resource.rar) and some other JARs. resource.rar contains several JARs: - resource-api.jar - resource-impl.jar - resource-ejb.jar - others ...

What I need to do is replace persistence.xml, which is located in the following path: my_application.ear / resource.rar / resources ejb.jar / META-INF / persistence.xml with some patented resource. My goal is to change properties such as:
property name="hibernate.hbm2ddl.auto"
property name="hibernate.dialect"

The maven-ear-plugin allows you to unpack artifacts, but as far as I know, this is only possible for one level structure.

+4
source share
1 answer

Take a look at the TrueZip Maven plugin .

+2
source

Source: https://habr.com/ru/post/1380199/


All Articles