I’m using Eclipse and the Maven plug in to build a module. I would like the resulting modl file to include a jar file that my project is dependent on. Does anybody know how to configure either the the eclipse project or the maven plug such that I can control which files are included in the modl file?
Have you tried packaging yet? The ignition-maven-plugin does this automatically.
I am using the ignition-maven plugin to build the module. When I run “Maven build…” i use “package” as the goals. Is that what you mean by packaging?
The resulting modl file only includes jar and compresses jars for client, common, and designer.
Take a look at the example projects and make sure you have the same module layout and appropriate configurations in the
root build submodule pom.xml for the ignition-maven-plugin.
Thanks for the info. I compared what I have in the build project’s pom.xml. It is pretty much the same as the scripting function example. The only difference I thought might impact it is the Maven plug in version. Mine is 1.0.8 and the example is using 1.1.0.
Do you know which example might be bundling a 3rd party jar file?
I don’t think there’s any examples that actually include one, but all you need to do is have a regular dependency entry.
Make sure it’s not provided scope. Try updating the version of ignition-maven-plugin to 1.1.0 as well.
If that doesn’t work and you want to upload your module somewhere I can take a quick look.
I had to specify system scope in order to provide the path to the jar file. It seems like a pretty basic thing I’m trying to do and this is the first module I’ve ever built. Hopefully, you’ll see something obvious.
Can you email a link of where to upload the project? I can also put it on our cloud server for you, just email so I can provide you the link.
Oooh, the system scope explains it. The plugin will not gather anything but compile-scoped dependencies for you. System scope is deprecated in Maven and not supported by the plugin.
If you can’t get this jar from a repository, try this instead of system scope: https://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html
The jar file I’m referencing may be in a repository but I’d like to just use the local copy I have since that’s what we’ve tested. After installing the file in my local repository, I was able to change the dependency scope to ‘compile’. After rebuilding it still didn’t have the jar file in the modl file.
I also had the same dependency with ‘system’ scope in the client, common, and gateway projects. After changing all of these to ‘compile’ scope, it now included a jar file for my dependency. I’m going to play around and see if I can remove it from the build project. I’m also going to see if I can control the file name of the jar that is included. The 3rd party jar file is named ‘sapjco3.jar’ and the included one is named ‘jco-3.0.jar’.
Thanks for all of your help.
This should be a consequence of the artifact id you used when installing into the local repository.
I’m afraid you won’t be able to stop it from using the “$artifactId-$version.jar” format, which if I remember correctly for this particular jar is a problem because it needs to be called “sapjco3.jar” for some dumb reason.
see Ignition changes JAR file names artificially