You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "REMIJAN, MICHAEL J [AG/1000]" <mi...@monsanto.com> on 2009/08/12 16:11:26 UTC

How to add SYSTEM scope dependency to manifest?

Greetings all,

I'm looking for how to configure the
<artifactId>maven-jar-plugin</artifactId> so that dependencies with
<scope>system</scope> are included in the class-path of the manifest.  I
already am using the <addClasspath> tag of <manifest> and that works but
if a dependency is defined as <scope>system</scope> then <addClasspath>
does not include it in the manifest.  I need to include it in the
manifest.  Any ideas?

Mike

---------------------------------------------------------------------------------------------------------
This e-mail message may contain privileged and/or confidential information, and is intended to be received only by persons entitled to receive such information. If you have received this e-mail in error, please notify the sender immediately. Please delete it and all attachments from any servers, hard drives or any other media. Other use of this e-mail by you is strictly prohibited.


All e-mails and attachments sent and received are subject to monitoring, reading and archival by Monsanto, including its subsidiaries. The recipient of this e-mail is solely responsible for checking for the presence of "Viruses" or other "Malware". Monsanto, along with its subsidiaries, accepts no liability for any damage caused by any such code transmitted by or accompanying this e-mail or any attachment.
---------------------------------------------------------------------------------------------------------


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


Re: How to add SYSTEM scope dependency to manifest?

Posted by Wayne Fay <wa...@gmail.com>.
> The jar is not in any repository so I read it off of the file
> system by setting the dependency to <scope>system
> </scope> This is the only scope which can read jars
> off the file system.

You really must install this jar into a corporate repo (nexus etc) and
then depend on it with proper scopes. System scope is a bad idea in
general except for very specific uses -- and this is not one of them.

Wayne

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


Re: How to add SYSTEM scope dependency to manifest?

Posted by Brett Randall <ja...@gmail.com>.
If you can't or won't follow the advice to install the artifact into a
repository manager, then simply use install-file to install it to your
local repo, the change the scope to compile.

Best
Brett


On 8/13/09, REMIJAN, MICHAEL J [AG/1000] <mi...@monsanto.com> wrote:
> There are many reasons why a project would use a JAR file which isn't in a
> repository. So I'm assuming Maven cannot be configured to handle this?   It
> seems to me if I can configure the <dependencySet> to include
> <scope>system</scope> dependencies then I should also be able to make a
> similar configuration with the <manifest><addClasspath>.  Or is there
> another way of accomplishing the same thing?
>
> -----Original Message-----
> From: Brian Fox [mailto:brianf@infinity.nu]
> Sent: Wednesday, August 12, 2009 1:58 PM
> To: Maven Users List
> Subject: Re: How to add SYSTEM scope dependency to manifest?
>
> System scope is meant for system objects that would be present on the
> target os, something like MFC.dll etc. Using it to work around having
> the jar in a repository is a definite anti-pattern.  Instead have it
> uploaded to your Corporate Nexus repository.
>
> On Wed, Aug 12, 2009 at 1:10 PM, REMIJAN, MICHAEL J
> [AG/1000]<mi...@monsanto.com> wrote:
>> The jar is not in any repository so I read it off of the file system by
>> setting the dependency to <scope>system</scope> This is the only scope
>> which can read jars off the file system.  If the scope is changed to
>> compile, Maven will want to pull it from a repository.  The m2 plugin for
>> eclipse gives an error if <systemPath> is set and the scope is not system.
>>
>> -----Original Message-----
>> From: Wayne Fay [mailto:waynefay@gmail.com]
>> Sent: Wednesday, August 12, 2009 9:46 AM
>> To: Maven Users List
>> Subject: Re: How to add SYSTEM scope dependency to manifest?
>>
>>> if a dependency is defined as <scope>system</scope> then <addClasspath>
>>> does not include it in the manifest.  I need to include it in the
>>> manifest.  Any ideas?
>>
>> Is there a reason the obvious answer -- change it to a different scope
>> eg compile -- is not acceptable?
>>
>> Wayne
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------------------------------------------
>> This e-mail message may contain privileged and/or confidential
>> information, and is intended to be received only by persons entitled to
>> receive such information. If you have received this e-mail in error,
>> please notify the sender immediately. Please delete it and all attachments
>> from any servers, hard drives or any other media. Other use of this e-mail
>> by you is strictly prohibited.
>>
>>
>> All e-mails and attachments sent and received are subject to monitoring,
>> reading and archival by Monsanto, including its subsidiaries. The
>> recipient of this e-mail is solely responsible for checking for the
>> presence of "Viruses" or other "Malware". Monsanto, along with its
>> subsidiaries, accepts no liability for any damage caused by any such code
>> transmitted by or accompanying this e-mail or any attachment.
>> ---------------------------------------------------------------------------------------------------------
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
> ---------------------------------------------------------------------------------------------------------
> This e-mail message may contain privileged and/or confidential information,
> and is intended to be received only by persons entitled to receive such
> information. If you have received this e-mail in error, please notify the
> sender immediately. Please delete it and all attachments from any servers,
> hard drives or any other media. Other use of this e-mail by you is strictly
> prohibited.
>
>
> All e-mails and attachments sent and received are subject to monitoring,
> reading and archival by Monsanto, including its subsidiaries. The recipient
> of this e-mail is solely responsible for checking for the presence of
> "Viruses" or other "Malware". Monsanto, along with its subsidiaries, accepts
> no liability for any damage caused by any such code transmitted by or
> accompanying this e-mail or any attachment.
> ---------------------------------------------------------------------------------------------------------
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

-- 
Sent from my mobile device

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


RE: How to add SYSTEM scope dependency to manifest?

Posted by "REMIJAN, MICHAEL J [AG/1000]" <mi...@monsanto.com>.
There are many reasons why a project would use a JAR file which isn't in a repository. So I'm assuming Maven cannot be configured to handle this?   It seems to me if I can configure the <dependencySet> to include <scope>system</scope> dependencies then I should also be able to make a similar configuration with the <manifest><addClasspath>.  Or is there another way of accomplishing the same thing? 

-----Original Message-----
From: Brian Fox [mailto:brianf@infinity.nu] 
Sent: Wednesday, August 12, 2009 1:58 PM
To: Maven Users List
Subject: Re: How to add SYSTEM scope dependency to manifest?

System scope is meant for system objects that would be present on the
target os, something like MFC.dll etc. Using it to work around having
the jar in a repository is a definite anti-pattern.  Instead have it
uploaded to your Corporate Nexus repository.

On Wed, Aug 12, 2009 at 1:10 PM, REMIJAN, MICHAEL J
[AG/1000]<mi...@monsanto.com> wrote:
> The jar is not in any repository so I read it off of the file system by setting the dependency to <scope>system</scope> This is the only scope which can read jars off the file system.  If the scope is changed to compile, Maven will want to pull it from a repository.  The m2 plugin for eclipse gives an error if <systemPath> is set and the scope is not system.
>
> -----Original Message-----
> From: Wayne Fay [mailto:waynefay@gmail.com]
> Sent: Wednesday, August 12, 2009 9:46 AM
> To: Maven Users List
> Subject: Re: How to add SYSTEM scope dependency to manifest?
>
>> if a dependency is defined as <scope>system</scope> then <addClasspath>
>> does not include it in the manifest.  I need to include it in the
>> manifest.  Any ideas?
>
> Is there a reason the obvious answer -- change it to a different scope
> eg compile -- is not acceptable?
>
> Wayne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
> ---------------------------------------------------------------------------------------------------------
> This e-mail message may contain privileged and/or confidential information, and is intended to be received only by persons entitled to receive such information. If you have received this e-mail in error, please notify the sender immediately. Please delete it and all attachments from any servers, hard drives or any other media. Other use of this e-mail by you is strictly prohibited.
>
>
> All e-mails and attachments sent and received are subject to monitoring, reading and archival by Monsanto, including its subsidiaries. The recipient of this e-mail is solely responsible for checking for the presence of "Viruses" or other "Malware". Monsanto, along with its subsidiaries, accepts no liability for any damage caused by any such code transmitted by or accompanying this e-mail or any attachment.
> ---------------------------------------------------------------------------------------------------------
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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



---------------------------------------------------------------------------------------------------------
This e-mail message may contain privileged and/or confidential information, and is intended to be received only by persons entitled to receive such information. If you have received this e-mail in error, please notify the sender immediately. Please delete it and all attachments from any servers, hard drives or any other media. Other use of this e-mail by you is strictly prohibited.


All e-mails and attachments sent and received are subject to monitoring, reading and archival by Monsanto, including its subsidiaries. The recipient of this e-mail is solely responsible for checking for the presence of "Viruses" or other "Malware". Monsanto, along with its subsidiaries, accepts no liability for any damage caused by any such code transmitted by or accompanying this e-mail or any attachment.
---------------------------------------------------------------------------------------------------------


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


Re: How to add SYSTEM scope dependency to manifest?

Posted by Brian Fox <br...@infinity.nu>.
System scope is meant for system objects that would be present on the
target os, something like MFC.dll etc. Using it to work around having
the jar in a repository is a definite anti-pattern.  Instead have it
uploaded to your Corporate Nexus repository.

On Wed, Aug 12, 2009 at 1:10 PM, REMIJAN, MICHAEL J
[AG/1000]<mi...@monsanto.com> wrote:
> The jar is not in any repository so I read it off of the file system by setting the dependency to <scope>system</scope> This is the only scope which can read jars off the file system.  If the scope is changed to compile, Maven will want to pull it from a repository.  The m2 plugin for eclipse gives an error if <systemPath> is set and the scope is not system.
>
> -----Original Message-----
> From: Wayne Fay [mailto:waynefay@gmail.com]
> Sent: Wednesday, August 12, 2009 9:46 AM
> To: Maven Users List
> Subject: Re: How to add SYSTEM scope dependency to manifest?
>
>> if a dependency is defined as <scope>system</scope> then <addClasspath>
>> does not include it in the manifest.  I need to include it in the
>> manifest.  Any ideas?
>
> Is there a reason the obvious answer -- change it to a different scope
> eg compile -- is not acceptable?
>
> Wayne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
> ---------------------------------------------------------------------------------------------------------
> This e-mail message may contain privileged and/or confidential information, and is intended to be received only by persons entitled to receive such information. If you have received this e-mail in error, please notify the sender immediately. Please delete it and all attachments from any servers, hard drives or any other media. Other use of this e-mail by you is strictly prohibited.
>
>
> All e-mails and attachments sent and received are subject to monitoring, reading and archival by Monsanto, including its subsidiaries. The recipient of this e-mail is solely responsible for checking for the presence of "Viruses" or other "Malware". Monsanto, along with its subsidiaries, accepts no liability for any damage caused by any such code transmitted by or accompanying this e-mail or any attachment.
> ---------------------------------------------------------------------------------------------------------
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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


RE: How to add SYSTEM scope dependency to manifest?

Posted by "REMIJAN, MICHAEL J [AG/1000]" <mi...@monsanto.com>.
The jar is not in any repository so I read it off of the file system by setting the dependency to <scope>system</scope> This is the only scope which can read jars off the file system.  If the scope is changed to compile, Maven will want to pull it from a repository.  The m2 plugin for eclipse gives an error if <systemPath> is set and the scope is not system.

-----Original Message-----
From: Wayne Fay [mailto:waynefay@gmail.com] 
Sent: Wednesday, August 12, 2009 9:46 AM
To: Maven Users List
Subject: Re: How to add SYSTEM scope dependency to manifest?

> if a dependency is defined as <scope>system</scope> then <addClasspath>
> does not include it in the manifest.  I need to include it in the
> manifest.  Any ideas?

Is there a reason the obvious answer -- change it to a different scope
eg compile -- is not acceptable?

Wayne

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



---------------------------------------------------------------------------------------------------------
This e-mail message may contain privileged and/or confidential information, and is intended to be received only by persons entitled to receive such information. If you have received this e-mail in error, please notify the sender immediately. Please delete it and all attachments from any servers, hard drives or any other media. Other use of this e-mail by you is strictly prohibited.


All e-mails and attachments sent and received are subject to monitoring, reading and archival by Monsanto, including its subsidiaries. The recipient of this e-mail is solely responsible for checking for the presence of "Viruses" or other "Malware". Monsanto, along with its subsidiaries, accepts no liability for any damage caused by any such code transmitted by or accompanying this e-mail or any attachment.
---------------------------------------------------------------------------------------------------------


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


Re: How to add SYSTEM scope dependency to manifest?

Posted by Wayne Fay <wa...@gmail.com>.
> if a dependency is defined as <scope>system</scope> then <addClasspath>
> does not include it in the manifest.  I need to include it in the
> manifest.  Any ideas?

Is there a reason the obvious answer -- change it to a different scope
eg compile -- is not acceptable?

Wayne

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