You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by MATHUS Baptiste <ma...@mipih.fr> on 2007/03/08 15:22:10 UTC

Add compilation date in the manifest

Hi all,

I'm looking for the variable that could be used to declare an additional property "compilationDate" in the manifest. I've been looking at this page as a starting point : http://maven.apache.org/guides/mini/guide-manifest.html 

But I can't find anywhere on the net how the variable corresponding to when the compilation process was started is called.

Thanks in advance.

-- 
Baptiste MATHUS - mathus.b@mipih.fr
Systèmes & Méthodes
MIPIH - Midi Pyrénées Informatique Hospitalière

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Add compilation date in the manifest

Posted by Marcos Silva Pereira <ma...@gmail.com>.
I really don't know if maven already has such property/variable, but is a
quite simple write a plugin to set it in the project properties. Your plugin
could have code like the snipped below:

/**
 * @parameter default-value="${project}"
 * @required
 * @readonly
 */
private MavenProject project;

/**
 * @parameter default-value="yyyy-MM-dd"
 */
private String format;

public void execute() throws MojoExecutionException {

    String currentDate = getFormattedDate();
    project.getProperties().setProperty("currentDate", currentDate);

}

Kind Regards,

On 3/8/07, MATHUS Baptiste <ma...@mipih.fr> wrote:
>
> Hi all,
>
> I'm looking for the variable that could be used to declare an additional
> property "compilationDate" in the manifest. I've been looking at this page
> as a starting point :
> http://maven.apache.org/guides/mini/guide-manifest.html
>
> But I can't find anywhere on the net how the variable corresponding to
> when the compilation process was started is called.
>
> Thanks in advance.
>
> --
> Baptiste MATHUS - mathus.b@mipih.fr
> Systèmes & Méthodes
> MIPIH - Midi Pyrénées Informatique Hospitalière
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Marcos Silva Pereira
recife - pe
marcos.silva@gmail.com
skype: marcos.silva.pereira
http://blastemica.blogspot.com