Hi Marco,

I thought of doing "mvn install", but the problem is we are having multiple
build machines and the "mvn install" needs to be done in all the machines.
Instead of that, I decided to keep the jar files in the system path.

Here is the pom.xml snippets.

Dir-A/pom.xml
=================

<dependency>
        <groupId>SVU-LAP</groupId>
        <artifactId>svu_lap</artifactId>
        <version>1.0</version>
        <scope>system</scope>

<systemPath>${basedir}/../Dir-B/src/main/webapp/WEB-INF/lib/svulap.jar</systemPath>
</dependency>
                
Dir-B/pom.xml
=================

Since the jar files are there in the Dir-B/.../lib, I didn't specify it. It
is picked during the compile time.

Dir-C/pom.xml
=================

<dependency>
        <groupId>SVU-LAP</groupId>
        <artifactId>svu_lap</artifactId>
        <version>1.0</version>
        <scope>system</scope>

<systemPath>${basedir}/../Dir-B/src/main/webapp/WEB-INF/lib/svulap.jar</systemPath>
</dependency>

I am getting the following error.

Missing:
----------
1) SVU-LAP:svu_lap:jar:1.0

  Try downloading the file manually from the project website.

  Then, install it using the command:
      mvn install:install-file -DgroupId=SVU-LAP -DartifactId=svu_lap
-Dversion=
1.0 -Dpackaging=jar -Dfile=/path/to/file

  Alternatively, if you host your own repository you can deploy the file
there:

      mvn deploy:deploy-file -DgroupId=SVU-LAP -DartifactId=svu_lap
-Dversion=1.
0 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

  Path to dependency:
        1) com.aol.reg:rsp-stats:war:3.0
        2) SVU-LAP:svu_lap:jar:1.0

----------
1 required artifact is missing.

Yes. Project B and Project C are generating "war" files. Project A is more
like a common libraries.

I am not sure, whether overlays will work for the jar files defined in
"systempath". Any idea?

Regards
Prabhu



Beelen, M. - SPLXL wrote:
> 
> Hello Prabhu,
> 
> Your problem isn't 100% clear to me yet. I'll try to anwser, but please
> explain more about your problem if this doesn't help.
> 
> 
> When you use maven the jar-files should not be within your project
> directory structure.
> The jar-files are in your local M2-repository and by declaring
> dependencies in your pom  those jar-files will be made available on the
> classpath during builds by maven. Only during the packaging of your
> project do the files get included into your war-file by maven. You
> should not add any jar-files to your WEB-INF/lib manually.
> 
> If you need to add some jar-files to your project, which isn't available
> in the central repository, then you should install them into your local
> repository by using mvn install:install-file. [1] After that you can add
> a normal dependencies declaration to your pom.xml of both project B or
> C.
> 
> 
> If I understand your problem correctly, then you want to have your
> project C have the same jar-files available as project B.
> 
> Since your project B is a war-project, that seams are bit strange to me
> unless project C also is a war-project. If C is also a war-project, then
> you might want to look at Overlays of the maven-war-plugin. [2]
> 
> If your project B and C need to share some dependencies, your could
> define those dependencies elsewhere (along project A or a new module D)
> and make both project B and project C depend on that artifact with the
> share dependencies.
> 
> 
> I hope this helps.
> 
> 
> [1] : http://maven.apache.org/plugins/maven-install-plugin/usage.html
> [2] : http://maven.apache.org/plugins/maven-war-plugin/overlays.html
> 
> 
> 
> 
> With kind regards,
>   Marco Beelen
>  ~Software Engineer~
> 
> Iprofs BV.
> Claus Sluterweg 125
> 2012 WS Haarlem
> www.iprofs.nl
> 
> 
>  
> 
> -----Original Message-----
> From: prabho [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, June 19, 2008 11:44 PM
> To: users@maven.apache.org
> Subject: RE: How to omit/include a jar file during packaging
> 
> 
> Thanks a lot.
> 
> I am having a problem in including a jar file though.
> 
> I have the following directory structure.
> 
> Dir A/ 
>      - lib/
>      - pom.xml
> 
> Dir B/
>     - WEB-INF/lib
>     - pom.xml (includes dependency for Dir A)
> 
> Dir C/
>     - pom.xml
> 
> I want to place the jar files in Dir B/WEB-INF/lib directory and make it
> accessible to Dir C ?? How can I do this ??
> 
> Regards
> Prabhu
> 
> 
> 
> 
>> 
>> -----Original Message-----
>> From: prabho [mailto:[EMAIL PROTECTED]
>> Sent: Thursday, June 19, 2008 4:15 PM
>> To: users@maven.apache.org
>> Subject: How to omit/include a jar file during packaging
>> 
>> 
>> Hi all,
>> 
>> I am trying to create a WAR file with class files and other jar files.
>> As I have conflict with an external jar file, I am supposed to omit my
> 
>> jar file while packaging. Can you please let me know how to achieve 
>> that?
>> 
>> Any help is greatly appreciated.
>> 
>> Thanks
>> Prabhu
>> --
>> View this message in context:
>> http://www.nabble.com/How-to-omit-include-a-jar-file-during-packaging-
>> tp
>> 18009940p18009940.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> **********************************************************************
>> For information, services and offers, please visit our web site:
>> http://www.klm.com. This e-mail and any attachment may contain 
>> confidential and privileged material intended for the addressee only. 
>> If you are not the addressee, you are notified that no part of the 
>> e-mail or any attachment may be disclosed, copied or distributed, and 
>> that any other action related to this e-mail or attachment is strictly
> 
>> prohibited, and may be unlawful. If you have received this e-mail by 
>> error, please notify the sender immediately by return e-mail, and 
>> delete this message.
>> 
>> Koninklijke Luchtvaart Maatschappij NV (KLM), its subsidiaries and/or 
>> its employees shall not be liable for the incorrect or incomplete 
>> transmission of this e-mail or any attachments, nor responsible for 
>> any delay in receipt.
>> Koninklijke Luchtvaart Maatschappij N.V. (also known as KLM Royal 
>> Dutch Airlines) is registered in Amstelveen, The Netherlands, with 
>> registered number 33014286
>> **********************************************************************
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 
>> 
> 
> --
> View this message in context:
> http://www.nabble.com/How-to-omit-include-a-jar-file-during-packaging-tp
> 18009940p18018894.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> **********************************************************************
> For information, services and offers, please visit our web site:
> http://www.klm.com. This e-mail and any attachment may contain
> confidential and privileged material intended for the addressee
> only. If you are not the addressee, you are notified that no part
> of the e-mail or any attachment may be disclosed, copied or
> distributed, and that any other action related to this e-mail or
> attachment is strictly prohibited, and may be unlawful. If you have
> received this e-mail by error, please notify the sender immediately
> by return e-mail, and delete this message. 
> 
> Koninklijke Luchtvaart Maatschappij NV (KLM), its subsidiaries
> and/or its employees shall not be liable for the incorrect or
> incomplete transmission of this e-mail or any attachments, nor
> responsible for any delay in receipt.
> Koninklijke Luchtvaart Maatschappij N.V. (also known as KLM Royal
> Dutch Airlines) is registered in Amstelveen, The Netherlands, with
> registered number 33014286 
> **********************************************************************
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-omit-include-a-jar-file-during-packaging-tp18009940p18029961.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to