Hi, I've recently started to package some java libraries (old versions for a specific project, not suitable for the Debian archive) and I am facing an issue when I am building a Maven based project using the dh's --builddirectory option. When dh_auto_install is executed it calls mh_resolve_dependencies inside the build directory, but it stops and waits for user interaction (asking upstream version and so on), even if it is called with --non-interactive option:
... dh_auto_install cd audience-annotations-component/audience-annotations && /usr/lib/jvm/java-1.8.0-openjdk-amd64/bin/java -noverify -cp /usr/share/maven/boot/plexus-classworlds-2.x.jar:/usr/lib/jvm/java-1.8.0-openjdk-amd64/lib/tools.jar -Dmaven.home=/usr/share/maven -Dmaven.multiModuleProjectDirectory=/<<PKGBUILDDIR>> -Dclassworlds.conf=/etc/maven/m2-debian.conf org.codehaus.plexus.classworlds.launcher.Launcher -s/etc/maven/settings-debian.xml -Ddebian.dir=/<<PKGBUILDDIR>>/debian -Dmaven.repo.local=/<<PKGBUILDDIR>>/debian/maven-repo --batch-mode -Ddebian.dir=/<<PKGBUILDDIR>>/debian -Ddebian.package=libaudience-annotations-java -Dmaven.repo.local=/<<PKGBUILDDIR>>/debian/maven-repo -Dinstall.to.usj=true org.debian.maven:debian-maven-plugin:2.3.1:install [INFO] Scanning for projects... [INFO] [INFO] ---------------< org.apache.yetus:audience-annotations >---------------- [INFO] Building Apache Yetus - Audience Annotations 0.5.0 [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- debian-maven-plugin:2.3.1:install (default-cli) @ audience-annotations --- [INFO] Cleaning pom file: /<<PKGBUILDDIR>>/audience-annotations-component/audience-annotations/pom.xml.save with options: [INFO] --keep-pom-version --package=libaudience-annotations-java --has-package-version [INFO] --rules=/<<PKGBUILDDIR>>/debian/maven.rules [INFO] --ignore-rules=/<<PKGBUILDDIR>>/debian/maven.ignoreRules [INFO] --published-rules=/<<PKGBUILDDIR>>/debian/maven.publishedRules [INFO] --no-parent [INFO] Install jar for audience-annotations into /usr/share/java [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.405 s [INFO] Finished at: 2019-09-12T10:35:32-03:00 [INFO] ------------------------------------------------------------------------ cd audience-annotations-component/audience-annotations && mh_resolve_dependencies --non-interactive --offline --build -plibaudience-annotations-java --javadoc --base-directory=/<<PKGBUILDDIR>> --non-explore Analysing pom.xml... Enter the upstream version for the package. [0.5.0] > Version of org.apache.yetus:audience-annotations is 0.5.0 Choose how the version will be transformed: 0 - Replace all versions starting by 0. with 0.x [1] - Change the version to the symbolic 'debian' version 2 - Keep the version 3 - Custom rule > The list of POM files is now in debian/libaudience-annotations-java.poms .... I think It is also understandable since there is no 'debian' directory inside the build dir and it is probably trying to create it. My question is: Is there a way to avoid this user interaction and rely only on the debian directory in the root of the source package? I also didn't find an example of a Java package which makes use of --builddirectory option. As a side note when I build the package with sbuild it does not get stuck waiting for user interaction and the binaries are successfully built but when I try to build it in a clean chroot using dpkg-buildpackage it waits for user's answer. Thanks in advance for any help or tip! -- Lucas Kanashiro