From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35654) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dzJDQ-0002gc-90 for guix-patches@gnu.org; Tue, 03 Oct 2017 05:10:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dzJDG-0007lr-Ic for guix-patches@gnu.org; Tue, 03 Oct 2017 05:10:12 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:36482) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dzJDG-0007lf-Dk for guix-patches@gnu.org; Tue, 03 Oct 2017 05:10:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dzJDG-0000GQ-7d for guix-patches@gnu.org; Tue, 03 Oct 2017 05:10:02 -0400 Subject: [bug#28663] [PATCH 01/22] guix: ant-build-system: Add main-class support. Resent-Message-ID: References: <20171001194418.67936d4e@lepiller.eu> <20171001175334.2694-1-julien@lepiller.eu> From: Ricardo Wurmus In-reply-to: <20171001175334.2694-1-julien@lepiller.eu> Date: Tue, 03 Oct 2017 11:09:07 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-ID: <87efqk4mz0.fsf@elephly.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: julien@lepiller.eu Cc: 28663@debbugs.gnu.org julien@lepiller.eu writes: > From: Julien Lepiller > > * guix/build-system/ant.scm: New #:main-class argument > * guix/build/ant-build-system.scm: Generate a manifest file with > additional properties. > --- [=E2=80=A6] > + (target (@ (name "manifest")) > + (mkdir (@ (dir "${manifest.dir}"))) > + (echo (@ (file "${manifest.file}") > + (message ,(string-append > + (if main-class > + (string-append > + "Main-Class: " main-cl= ass > + "${line.separator}") > + "") > + ""))))) > + > (target (@ (name "compile")) > (mkdir (@ (dir "${classes.dir}"))) > (javac (@ (includeantruntime "false") > @@ -97,10 +112,11 @@ > (include (@ (name "*= */*Test.java" ))))))) > =20 > (target (@ (name "jar") > - (depends "compile")) > + (depends "compile, manifest")) > (mkdir (@ (dir "${jar.dir}"))) > (exec (@ (executable "jar")) > - (arg (@ (line ,(string-append "-cf ${jar.= dir}/" jar-name > + (arg (@ (line ,(string-append "-cmf ${man= ifest.file} " > + "${jar.dir}= /" jar-name > " -C ${clas= ses.dir} .")))))) This is good, thank you. Could you please also document this in the manual in section =E2=80=9CBuild Systems=E2=80=9D? One question remains, though: will this affect the timestamps inside the jar file? If so, can we reset the timestamp to ensure reproducibility? --=20 Ricardo GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC https://elephly.net