Path: csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod From: Emmanuel Bourg Newsgroups: linux.debian.maint.java Subject: Re: Problems understanding maven rules to package qualimap Date: Mon, 16 Nov 2015 18:00:01 +0100 Message-ID: References: X-Original-To: Andreas Tille , Debian Java List , Debian Med Packaging Team X-Mailbox-Line: From debian-java-request@lists.debian.org Mon Nov 16 16:50:14 2015 Old-Return-Path: X-Amavis-Spam-Status: No, score=-7.697 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=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=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=cI5vDQTvw2xGJ+5T2r0QS5PR/1CYCnTKrA4PRcCdn9g=; b=NpQ6ZYlLUGbABOimD85jswEy2vkBlkuhKABSxZ6PoEYECfmN2eaf9T/Mc1nAQBTSKn Fh8auTCGYpYY0dKplE3QI6Wt6qwoPPY1pBvWfzxezkbovTDtlPvVa/n52Ma+mujRj+D9 wO+d78ABP8Ih0//HYWVwKzBteO1pNDFon5CQbns3+iukJIDwaUa2KRwRbf3f8NZ5mOAk HV3qYAr7vUeZdGG9/tii1syf2NeqIzqRDFm9M0+BSNlXkKvHqqYPEKyWAVlKk4gQnaFw y+jnoRcURGDZPPf3pTkXS/NdEyYGtPhx9arCT2UlwKXxwZfqi+XhPlA59iDtmD6l7q3O L5fQ== X-Received: by 10.28.107.26 with SMTP id g26mr20905763wmc.34.1447692599676; Mon, 16 Nov 2015 08:49:59 -0800 (PST) Sender: robomod@news.nic.it X-Enigmail-Draft-Status: N1110 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Mailing-List: archive/latest/18880 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/564A0936.2050907@apache.org Approved: robomod@news.nic.it Lines: 63 Organization: linux.* mail to news gateway X-Original-Date: Mon, 16 Nov 2015 17:49:58 +0100 X-Original-Message-ID: <564A0936.2050907@apache.org> X-Original-References: <20151116162200.GQ24766@an3as.eu> X-Original-Sender: Emmanuel Bourg Xref: csiph.com linux.debian.maint.java:8561 Le 16/11/2015 17:22, Andreas Tille a écrit : > While I know that these classes are part of BioJava I fail to understand > how to craft these magical regexps maven wants me to provide. biojava probably doesn't install the Maven artifacts , that's why mh_make can't find bioinfo-ngs. If it does install the artifacts but under a different name, then you need a replacement rule. If the Maven coordinates of the jar equivalent to bioinfo-ngs is foo:bar, then you need this rule: s/org.bioinfo/foo/ s/bioinfo-ngs/bar/ * s/.*/debian/ * * > In pom.xml: This plugin cannot be found in the Debian Maven repository. Ignore this plugin? org.apache.maven.plugins:maven-dependency-plugin:maven-plugin:2.7 > [y/N] > Install libmaven-dependency-plugin-java and try again. > In pom.xml: This dependency cannot be found in the Debian Maven repository. Ignore this dependency? net.sf.picard:picard:jar:1.70 The Maven artifacts for net.sf.picard:picard are not installed by picard-tools. You should extract a libpicard-java package from the binary package picard-tools and add the artifacts there. > but what the hell are groupID and artifactId. This looks like pure magic to me. Let's start with some Maven basics then :) Libraries in a Maven repository are uniquely identified by a group ID, an artifact ID and a version (plus other subtleties, but let's keep things simple). The group identifier often relates to the author of the library, for example the Apache Commons developers use the "org.apache.commons" groupId. The artifact identifier names the library for this group. For Apache commons it's commons-collections, commons-io, commons-lang, etc. Maven expect the libraries to live in a repository, in Debian we use /usr/share/maven-repo. For every library there should be two files (the Maven artifacts) : /usr/share/maven-repo/groupId/artifactId/version/artifactId-version.jar /usr/share/maven-repo/groupId/artifactId/version/artifactId-version.pom If these files do not exist, Maven can't find them (that's what happens with picard-tools). maven-debian-helper install them automatically. For Ant and Gradle based packages you have to use maven-repo-helper to get them installed. Sometimes the coordinates (groupId+artifactId) of a library change, if your project uses the old coordinates and the Debian package uses the new one you have to replace them. That's where the rules comes into play. A rule is just a space separated list of regular expressions to replace the groupId, the artifactId, the type (rarely changed), the version (often s/.*/debian/) and the classifier (rare). I hope it's clearer now :) Emmanuel Bourg