Subject: Re: [bug#28663] [PATCH 01/22] guix: ant-build-system: Add main-class support.

From: Ricardo Wurmus <[email-masked]>
Date: Tue, 03 Oct 2017 11:09:07 +0200

[email-masked] writes:

> From: Julien Lepiller <[email-masked]>
>
> * guix/build-system/ant.scm: New #:main-class argument
> * guix/build/ant-build-system.scm: Generate a manifest file with
> additional properties.
> ---
[…]
> +                 (target (@ (name "manifest"))
> +                         (mkdir (@ (dir "${manifest.dir}")))
> +                         (echo (@ (file "${manifest.file}")
> +                                  (message ,(string-append
> +                                              (if main-class
> +                                                (string-append
> +                                                  "Main-Class: " main-class
> +                                                  "${line.separator}")
> +                                                "")
> +                                              "")))))
> +
>                   (target (@ (name "compile"))
>                           (mkdir (@ (dir "${classes.dir}")))
>                           (javac (@ (includeantruntime "false")
> @@ -97,10 +112,11 @@
>                                                      (include (@ (name "**/*Test.java" )))))))
>  
>                   (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 ${manifest.file} "
> +                                                             "${jar.dir}/" jar-name
>                                                               " -C ${classes.dir} ."))))))

This is good, thank you.  Could you please also document this in the
manual in section “Build Systems”?

One question remains, though: will this affect the timestamps inside the
jar file?  If so, can we reset the timestamp to ensure reproducibility?

-- 
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net