Path: csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod From: Guillaume Turri Newsgroups: linux.debian.maint.java Subject: How should I deal with the classpath with maven-helper? Date: Wed, 16 Sep 2015 20:20:03 +0200 Message-ID: X-Original-To: debian-java@lists.debian.org X-Mailbox-Line: From debian-java-request@lists.debian.org Wed Sep 16 18:14:25 2015 Old-Return-Path: X-Amavis-Spam-Status: No, score=-7.799 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, LDO_WHITELIST=-5, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham autolearn_force=no X-Policyd-Weight: using cached result; rate: -7 Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=ChLZjWopMpqVRhQJmjE7zMzHpis1iwCpt5b6XIrUldw=; b=lBIQoQlDpMAsFf8XqPJTpGpdbpLx4FhvmNp5o2q4BmhULYv7xZ8hTV1HdvRwgL5bPX XswurhlovTIoscokZWnbEGR2EO0YCgZkvYK6Cfq6dSF5YMDdmqT492dpI5IJJRkw4mnc ZphPeeVZXUp7GiOxE3RTQuK0xTsWWCRA7E2a361yT61zBZ/NZ+fpmI9oIvh0BKGc9jhy fEsufQrLGkYJMlrBwbWf2uI3qXHfIDVDPh3bZw16y4YBWcAVhB0VqFDbGA62OO2KPi2Q 45OwqcxjDQ6MxSyX6AF+Q+VKlPJQCG1FXCj9eov8rPczAQDAHgrVZcQfdgnBsOm6Uk7k HRlQ== X-Received: by 10.140.95.73 with SMTP id h67mr44701045qge.14.1442427229242; Wed, 16 Sep 2015 11:13:49 -0700 (PDT) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Mailing-List: archive/latest/18658 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/CADsWkMosyW0uYQPPQrpAWXHdLz9_GTyxeU5zX8rRgQWZVzZFjw@mail.gmail.com Approved: robomod@news.nic.it Lines: 48 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Wed, 16 Sep 2015 20:13:29 +0200 X-Original-Message-ID: Xref: csiph.com linux.debian.maint.java:8344 Hi, I'm trying to package some java code with maven-helper, and I have a few questions regarding the class-path of the built jar. To put it in a nutshell: how should it be handled? What are the good practices? More precisely: * If I don't do anything special regarding the class-path, then I get the lintian warning missing-classpath [1] * If I add the classpath via the pom.xml, ie org.apache.maven.plugins maven-jar-plugin true then the warning goes away, but the MANIFEST of the built jar contains a class-path like Class-Path: guava-debian.jar aXMLRPC-debian.jar so when I try to launch my application with a wrapper script which looks like java -cp /usr/share/java/my.jar it fails as soon as it tries to load a class from another jar since it can't find them. Of course, for an application I could just add manually the jar needed in my wrapper script. However, it wouldn't apply to the case when I try to package a library I've tried to look in existing packages and in the documentation, but couldn't find an answer. I would be grateful if you can give me some pointers. Regards, Guillaume [1]: https://lintian.debian.org/tags/missing-classpath.html