I have an Axis2 aar file, buried within that aar file I have a jar file containing my compiled classes, one of which I'd like to replace.
This is a simplified version of what I have
MyService.aar contains :
lib\\JarJarBinks.jar
JarJarBinks.jar contains :
com\\example\\skywalker\\TheForce.class
I want to replace TheForce.class
, the only mechanism that springs to mind, without rebuilding everything is :
JarJarBinks.jar
JarJarBinks.jar
TheForce.class
with my updated copyJarJarBinks
, and place it back in the extracted aar layout I could create a bash script to automate this, but I'm wondering if there is a more cleaner / quicker way.
I've found the update option of jar u
but I don't believe it works for nested artefacts.
Thanks
For your Axis2 to work, you don't need an aar file.
services.xml file can be either of the below locations for the Axis2 to work.
This will help us have an extra step of generating the aar file.
ServiceDeployer.java
* <p>
* Standard Axis2 service Deployer which use services.xml file to build
* services. ServiceDeployer can be used with Axis2 archive (.aar) or exploded
* directory structure. Some of the example formats given below.
* </p>
* <p>Examples : <p>
* <ul>
* <li>repository/services/SimpleService.aar/meta-inf/services.xml</li>
* <li>repository/services/SimpleService/meta-inf/services.xml</li>
* <li>WEB-INF/services/SimpleService.aar/meta-inf/services.xml</li>
* <li>WEB-INF/services/SimpleService/meta-inf/services.xml</li>
* </ul>
InputStream servicexmlStream = serviceClassLoader
.getResourceAsStream("META-INF/services.xml");
if (servicexmlStream == null) {
servicexmlStream = serviceClassLoader.getResourceAsStream("meta-inf/services.xml");
} else {
metainf = "META-INF";
}
https://axis.apache.org/axis2/java/core/apidocs/org/apache/axis2/deployment/ServiceDeployer.html
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.