It works also if I replace "path of java source files" with
"${basedir}/../", because all the dependencies lies under this path
only.
Just posted, because others may also get some info.

Regards, Jaikumar

-----Original Message-----
From: Sharma, Jaikumar 
Sent: Wednesday, April 26, 2006 2:41 PM
To: 'Maven Users List'
Subject: RE: [M2] : How to resolve package level dependencies


Thanks Tim for valulable info, you mentioned.

However, I was trying like the following and it worked fine.

        <dependencies>
          <dependency>
            <groupId>com.mycompany</groupId>
            <artifactId>mycompany</artifactId>
            <version>LATEST</version>
            <scope>system</scope>
             <systemPath><path of java source files></systemPath>
          </dependency>         
        </dependencies> 

Thanks again for the valuable info!

Regards, Jaikumar


-----Original Message-----
From: Tim Kettler [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 26, 2006 2:30 PM
To: Maven Users List
Subject: Re: [M2] : How to resolve package level dependencies


Hi,

just to be sure I understood your problem correctly:
In some class of project C you import a package/class that is defined in
project D. And 
then, when you try to build project C the Java compiler fails with an
error that it can't 
find the imported package/class. Correct?

As Anshuman said you just need to declare a dependency to project D in
your pom of project C.

 From which directory do you execute your 'mvn ...'? command from
project C or from the 
top level project (project A)?

In a multiproject build you always must run your mvn commands (with the
possible exception 
of 'mvn clean') form the directory of the topmost project. Else maven
can not calculate 
the all subprojects it has to build and therefore doesn't know anything
about project D if 
you just try to build project C directly as a standalone project.

Hope this helps
-Tim

Sharma, Jaikumar schrieb:
> I have folder structure of the project :
>  
>  
> |------Project   A 
> |      |-----sub-project B
> |      |
> |      |----|-------sub-sub project C
> |      |    |-----------pom.xml 
> |      |----|------sub-sub project D
> |      |    |-----------pom.xml
> |      |-----pom.xml   
> |------pom.xml
>  
>  
> In this scanario, packages access is defined in the classes, when I
> compile sub-sub project C, it says package does not exist (which is 
> already there sub-sub project D)
>  
> How to define dependency for this ?
>  
> Thanks!
>  
> Regards, Jaikumar
>  
> 
> BM__MailAutoSig_________________________________________
> 
>  
> 
> Jaikumar Sharma
> 
> Sr.Software Development Engineer
> 
>  
> 
> Barco Control Rooms
> 
> A-5, Sector - 5,
> 
> Noida. India 201 301.
> 
> Tel +91 120-2421-651 to 659  Ext.313
> 
> Fax+91 120 2421 691
> 
>  <http://www.barco.com/> http://www.barco.com
> 
>  <mailto:[EMAIL PROTECTED]> mailto:[EMAIL PROTECTED]
> 
> _________________________________________
> 
>  
> - - - - - - - DISCLAIMER- - - - - - - -
> Unless indicated otherwise, the information contained in this message
> is privileged and confidential, and is intended only for the use of 
> the
> addressee(s) named above and others who have been specifically
authorized to
> receive it. If you are not the intended recipient, you are hereby
notified
> that any dissemination, distribution or copying of this message and/or
> attachments is strictly prohibited. The company accepts no liability
for any
> damage caused by any virus transmitted by this email. Furthermore, the
> company does not warrant a proper and complete transmission of this
> information, nor does it accept liability for any delays. If you have
> received this message in error, please contact the sender and delete
the
> message. Thank you.
> 


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

- - - - - - - DISCLAIMER- - - - - - - -
Unless indicated otherwise, the information contained in this message is
privileged and confidential, and is intended only for the use of the
addressee(s) named above and others who have been specifically authorized to
receive it. If you are not the intended recipient, you are hereby notified
that any dissemination, distribution or copying of this message and/or
attachments is strictly prohibited. The company accepts no liability for any
damage caused by any virus transmitted by this email. Furthermore, the
company does not warrant a proper and complete transmission of this
information, nor does it accept liability for any delays. If you have
received this message in error, please contact the sender and delete the
message. Thank you.

Reply via email to