[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to package something depending on a not-maven-ified JAR?



Le 15/10/2016 à 00:59, Thorsten Glaser a écrit :

> In the meantime, is there any method I can take a jar from
> a declared Build-Depends on the Debian level and make it
> known to maven-debian-helper and friends so I can package
> the thing that needs it?

Yes it's possible, you just have to patch the pom.xml file and add a
<systemPath> element to the yui-compressor dependency pointing to the file:

https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#System_Dependencies

You also have to set the scope of the dependency to 'system'.

  <dependency>
    <groupId>foo</groupId>
    <artifactId>bar</artifactId>
    <version>1.0</version>
    <scope>system</scope>
    <systemPath>/usr/share/java/foo-bar.jar</systemPath>
  </dependency>

mh_make doesn't play well with this trick, so the dependency must be
ignored on the first run to generate the package stub. The dependency
can then be enabled and tweaked.

Emmanuel Bourg


Reply to: