guix-patches
[Top][All Lists]
Advanced

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

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


From: Ricardo Wurmus
Subject: [bug#28663] [PATCH 01/22] guix: ant-build-system: Add main-class support.
Date: Tue, 03 Oct 2017 11:09:07 +0200
User-agent: mu4e 0.9.18; emacs 25.3.1

address@hidden writes:

> From: Julien Lepiller <address@hidden>
>
> * 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







reply via email to

[Prev in Thread] Current Thread [Next in Thread]