sapjco3.jar has issues with Maven's naming convention (Springboot)
<p>I am trying to compile an integration server using the springboot java framework. I am using Maven to compile a jar file, but I keep running into an issue with the way Maven stores jars in repositories.</p>

<p>The Jar I am working with is sapjco3.jar, which will crash on run (not package) because it neeeeds its name to be sapjco3.jar. Because the Maven repo naming convention is:</p>

<pre><code>/%groupId%/%artifactId%/%version%/%artifactId%-%version%.jar
</code></pre>

<p>The library ends up being called sapjco3-3.0.jar.</p>

<p>Is there some way to pop my sapjco3.jar into my application without using a repository (I haven't been able to add it to the java.library.path or by editing the entries and xml in the ~/.m2 directory). Otherwise, is there a way to script renaming it once it is inserted??</p>

<p>My platform is ubuntu 14.04 LTS, by the way.</p>

<p>My POM file (missing the xml header, because StackOverflow doesn't parse it right):</p>

<pre><code>&lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;

&lt;name&gt;SampleIntegrationServer&lt;/name&gt;
&lt;description&gt;Sample Integration Server&lt;/description&gt;
&lt;groupId&gt;com.Sample&lt;/groupId&gt;
&lt;artifactId&gt;SampleIntegrationServer&lt;/artifactId&gt;
&lt;packaging&gt;jar&lt;/packaging&gt;
&lt;version&gt;0.0.2&lt;/version&gt;

&lt;parent&gt;
    &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
    &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
    &lt;version&gt;1.3.2.RELEASE&lt;/version&gt;
&lt;/parent&gt;

&lt;properties&gt;
    &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
    &lt;java.version&gt;1.8&lt;/java.version&gt;
    &lt;spring-cloud-aws-version&gt;1.0.4.RELEASE&lt;/spring-cloud-aws-version&gt;
&lt;/properties&gt;
&lt;dependencies&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
            &lt;artifactId&gt;spring-boot-starter&lt;/artifactId&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
            &lt;artifactId&gt;spring-boot-starter-batch&lt;/artifactId&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
            &lt;artifactId&gt;spring-boot-starter-data-jpa&lt;/artifactId&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
            &lt;artifactId&gt;spring-boot-starter-data-rest&lt;/artifactId&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
            &lt;artifactId&gt;spring-boot-starter-integration&lt;/artifactId&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
            &lt;artifactId&gt;spring-boot-starter-jdbc&lt;/artifactId&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
            &lt;artifactId&gt;spring-boot-starter-mail&lt;/artifactId&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
            &lt;artifactId&gt;spring-boot-starter-security&lt;/artifactId&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
            &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
            &lt;artifactId&gt;spring-boot-starter-ws&lt;/artifactId&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
        &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
            &lt;artifactId&gt;spring-boot-starter-velocity&lt;/artifactId&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
            &lt;artifactId&gt;spring-boot-configuration-processor&lt;/artifactId&gt;
            &lt;optional&gt;true&lt;/optional&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
            &lt;artifactId&gt;spring-cloud-starter-aws&lt;/artifactId&gt;
            &lt;version&gt;${spring-cloud-aws-version}&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
            &lt;artifactId&gt;spring-cloud-aws-messaging&lt;/artifactId&gt;
            &lt;version&gt;${spring-cloud-aws-version}&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
          &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
          &lt;artifactId&gt;jackson-core&lt;/artifactId&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
          &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
          &lt;artifactId&gt;jackson-annotations&lt;/artifactId&gt;
          &lt;/dependency&gt;
        &lt;dependency&gt;
          &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
          &lt;artifactId&gt;jackson-databind&lt;/artifactId&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;net.sf.jt400&lt;/groupId&gt;
            &lt;artifactId&gt;jt400&lt;/artifactId&gt;
            &lt;version&gt;6.7&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;com.sap&lt;/groupId&gt;
            &lt;artifactId&gt;sapjco3&lt;/artifactId&gt;
            &lt;version&gt;3.0&lt;/version&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;com.microsoft.sqlserver&lt;/groupId&gt;
            &lt;artifactId&gt;sqljdbc4&lt;/artifactId&gt;
            &lt;version&gt;4.2&lt;/version&gt;
        &lt;/dependency&gt;
&lt;/dependencies&gt;
&lt;build&gt;
    &lt;plugins&gt;
        &lt;plugin&gt;
            &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
            &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
            &lt;version&gt;1.3.3.RELEASE&lt;/version&gt;
        &lt;/plugin&gt;

        &lt;plugin&gt;
            &lt;artifactId&gt;maven-resources-plugin&lt;/artifactId&gt;
            &lt;version&gt;2.6&lt;/version&gt;
            &lt;executions&gt;
                &lt;execution&gt;
                    &lt;id&gt;copy-resources&lt;/id&gt;
                    &lt;phase&gt;validate&lt;/phase&gt;
                    &lt;goals&gt;
                        &lt;goal&gt;copy-resources&lt;/goal&gt;
                    &lt;/goals&gt;
                    &lt;configuration&gt;
                        &lt;outputDirectory&gt;${basedir}/target/classes&lt;/outputDirectory&gt;
                        &lt;includeEmptyDirs&gt;true&lt;/includeEmptyDirs&gt;
                        &lt;resources&gt;
                            &lt;resource&gt;
                                &lt;directory&gt;${basedir}/src/main/resources&lt;/directory&gt;
                                &lt;filtering&gt;false&lt;/filtering&gt;
                            &lt;/resource&gt;
                        &lt;/resources&gt;
                    &lt;/configuration&gt;
                &lt;/execution&gt;
            &lt;/executions&gt;
        &lt;/plugin&gt;
        &lt;plugin&gt;
            &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
            &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;
        &lt;/plugin&gt;
    &lt;/plugins&gt;
&lt;/build&gt;
</code></pre>

<p></p>

<p>The crash:</p>

<pre><code>Factory method 'createSapConnection' threw exception; nested exception is java.lang.ExceptionInInitializerError: JCo initialization failed with java.lang.ExceptionInInitializerError: Illegal JCo archive "sapjco3-3.0.jar". It is not allowed to rename or repackage the original archive "sapjco3.jar".
</code></pre>

<p>I just want this to build!!</p>

<p>Thanks</p>