You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Rajwinder Makkar <rm...@gmail.com> on 2013/01/05 23:58:45 UTC
Manifest
Hi,
Here is the scenario :
- I want to insert "property and value" pair in maven artifact manifest
file.
- I understand there are maven plugins where i can modify manifest like
"Maven Archiver".
- But above requires development team to mention things in POM which
sometimes is difficult to preach in big organization.
Question is :
How can i pass "property/value" pair a part of maven build process on the
command line which insert things in manifest file ? Something like mvn
clean install --manifestdefineproperty property=value
-raj
Re: Manifest
Posted by Stanimir Stamenkov <s7...@netscape.net>.
Sun, 06 Jan 2013 23:46:05 +0200, /Stanimir Stamenkov/:
> Note, depending on the purpose of this property you might not be
> doing something considered a good practice, but I can say from the
> description you've given.
I've really meant to say: "... but I *can't* say from the
description you've given".
--
Stanimir
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Manifest
Posted by Stanimir Stamenkov <s7...@netscape.net>.
Sat, 5 Jan 2013 14:58:45 -0800, /Rajwinder Makkar/:
> How can i pass "property/value" pair a part of maven build process on the
> command line which insert things in manifest file ? Something like mvn
> clean install --manifestdefineproperty property=value
Note, depending on the purpose of this property you might not be
doing something considered a good practice, but I can say from the
description you've given.
On the command-line you should be able to set a system property like:
mvn -Dproperty=value ...
and then refer ${property} in the archive configuration. One should
be able to set the necessary property in his "settings.xml" [1], in
a profile active by default [2], also. In any case, you might want
to add enforcer configuration to verify the necessary property has
been set:
http://maven.apache.org/enforcer/maven-enforcer-plugin/
http://maven.apache.org/enforcer/enforcer-rules/requireProperty.html
[1] http://maven.apache.org/settings.html#Properties
[2] http://maven.apache.org/settings.html#Activation
--
Stanimir
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Manifest
Posted by Benson Margulies <bi...@gmail.com>.
you cannot.
On Sat, Jan 5, 2013 at 5:58 PM, Rajwinder Makkar <rm...@gmail.com>wrote:
> Hi,
>
> Here is the scenario :
>
> - I want to insert "property and value" pair in maven artifact manifest
> file.
> - I understand there are maven plugins where i can modify manifest like
> "Maven Archiver".
> - But above requires development team to mention things in POM which
> sometimes is difficult to preach in big organization.
>
> Question is :
>
> How can i pass "property/value" pair a part of maven build process on the
> command line which insert things in manifest file ? Something like mvn
> clean install --manifestdefineproperty property=value
>
> -raj
>