While using SAPJco 3.0.11 with Maven, I can't rename original archive sapjco3.jar

When using SAPJco 3.0.11 with Maven, you may encounter issues when trying to rename the original sapjco3.jar archive. This problem occurs due to internal dependencies and naming conventions that the library expects.

Solutions

There are several approaches to handle this limitation ?

Using Maven Assembly Plugin

If you need a standalone application, you can use the maven-assembly-plugin that can handle JAR packaging with renaming in the resulting artifacts. This plugin allows you to create custom assemblies while maintaining the original JAR structure internally.

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-assembly-plugin</artifactId>
    <configuration>
        <descriptorRefs>
            <descriptorRef>jar-with-dependencies</descriptorRef>
        </descriptorRefs>
    </configuration>
</plugin>

Version-Specific Issue

This problem is specifically present in SAPJco 3.0.11 and affects newer versions. Older versions like 3.0.6 don't have the same naming restriction, making them more flexible for Maven integration.

Alternative Approaches

You can also consider using Maven dependency management with local repository installation, keeping the original JAR name while managing it through Maven coordinates ?

mvn install:install-file -Dfile=sapjco3.jar -DgroupId=com.sap -DartifactId=sapjco3 -Dversion=3.0.11 -Dpackaging=jar

Additional Resources

For more detailed information and advanced configuration options, you can refer to the official SAP blog ?

Using JCo without NWDS

Conclusion

While SAPJco 3.0.11 restricts JAR renaming, using Maven assembly plugin or maintaining original naming conventions provides effective workarounds for Maven-based projects.

Updated on: 2026-03-13T19:10:09+05:30

491 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements