OK, then I guess it must be either the coordinates that are incorrect or the
scope set to runtime. The runtime scope sounds unlikely to me.

/Anders

On Mon, Apr 18, 2011 at 11:13, Sailer, Richard <richard.sai...@cassidian.com
> wrote:

> Thanks for your reply.
>
> The project a is already a maven project and is installed in the mvn repo
> correctly because all the other sources from project b compiles correctly.
> Therefore it seems really strange to me.
>
> Richard
>
> -----Ursprüngliche Nachricht-----
> Von: anders.g.ham...@gmail.com [mailto:anders.g.ham...@gmail.com] Im
> Auftrag von Anders Hammar
> Gesendet: Montag, 18. April 2011 10:34
> An: Maven Users List
> Betreff: Re: How to model dependency from Unit Test Source to a another
> Projects Source
>
> It should work as it is I believe (if the coordinates of project a are
> correct). Possible you just need to build the a project so that it is
> copied
> to the local repo by
> mvn install
>
> /Anders
>
> On Mon, Apr 18, 2011 at 09:02, Sailer, Richard <
> richard.sai...@cassidian.com
> > wrote:
>
> > Hello,
> >
> > I try to execute our unit tests with maven. The problem that I know get
> > is a compilation failure (Cannot find class), when maven tries to
> > compile the Unit Test souces in these sources we import a Class from
> > another sub projects normal src Directory.
> >
> > So what I have is the following situation:
> >
> > Subproject project_a:
> > I have Class name a1.java on the file System it looks like
> > a/src/a1.java
> >
> > In Subproject project_b:
> > I have another Classes and the Unit Tests:
> > b/src/b1.java
> > and also
> > b/test/src.c1
> > In the class c1 I have a import to a1.java.
> > When the test sources being compiled I get the compilation failure in
> > Class c1 cannot filnd symbol a1.
> >
> > The dependency in the pom file in project b is modeled like this:
> >
> > <dependencies>
> >   <dependency>
> >      <groupId>com.xxx</groupId>
> >     <artifactId>a<artifactId>
> >   </ependency>
> >
> > </dependencies>
> >
> >
> > So my question Is how do I have to model theses dependency in the pom.
> > file so that the class a1 can be found ??
> > Must model the dependency additionaly in another Scope ?
> >
> > Thanks for your help.
> > I really try to solve this problem since a while and I'm quite new to
> > maven.
> >
> > Regards
> > Richard Sailer
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>

Reply via email to