You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by maven apache <ap...@gmail.com> on 2009/09/23 12:54:38 UTC

How to identify class in different modules in maven

Hi:
I following the guide:
http://www.sonatype.com/products/maven/documentation/book-defguide
And I am try to test the simple-parent project, it contain two modules
: simple-weather and simple-webapp ,the former provider some interface
to retrive the weather from yahoo website, and the simple-webapp
module is to present the result, so in the servlet of the
simple-webapp ,it call a class named WeatherService in the
simple-weather/src/main/java/org/sonatype/mavenbook/weather.
the servlet path is :
simple-webapp/src/main/java/org/sonatype/mavenbook/web/WeatherServlet.

After the config of the pom. I enter the simple-parent direct and run
commond : mvn clean install,then I got the error message:
the class WeatherService can not resolved! It can not identify the class.
I wonder why cause I followed the guide step by step'....
The annex are the three poms,anyone can check it ? since I have check
them many times ,and found nothing..

Re: How to identify class in different modules in maven

Posted by maven apache <ap...@gmail.com>.
Oh, I am sorry for my carelessness...
It wors now, maven is so magical !

2009/9/23 Anders Hammar <an...@hammar.net>:
> Your webapp does not have a dependency on the simple-weather artifact, which
> contains the class missing. Ad that and try again.
>
> /Anders
>
> On Wed, Sep 23, 2009 at 12:54, maven apache <ap...@gmail.com> wrote:
>
>> Hi:
>> I following the guide:
>> http://www.sonatype.com/products/maven/documentation/book-defguide
>> And I am try to test the simple-parent project, it contain two modules
>> : simple-weather and simple-webapp ,the former provider some interface
>> to retrive the weather from yahoo website, and the simple-webapp
>> module is to present the result, so in the servlet of the
>> simple-webapp ,it call a class named WeatherService in the
>> simple-weather/src/main/java/org/sonatype/mavenbook/weather.
>> the servlet path is :
>> simple-webapp/src/main/java/org/sonatype/mavenbook/web/WeatherServlet.
>>
>> After the config of the pom. I enter the simple-parent direct and run
>> commond : mvn clean install,then I got the error message:
>> the class WeatherService can not resolved! It can not identify the class.
>> I wonder why cause I followed the guide step by step'....
>> The annex are the three poms,anyone can check it ? since I have check
>> them many times ,and found nothing..
>>
>>
>> ---------------------------------------------------------------------
>> 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 identify class in different modules in maven

Posted by Anders Hammar <an...@hammar.net>.
Your webapp does not have a dependency on the simple-weather artifact, which
contains the class missing. Ad that and try again.

/Anders

On Wed, Sep 23, 2009 at 12:54, maven apache <ap...@gmail.com> wrote:

> Hi:
> I following the guide:
> http://www.sonatype.com/products/maven/documentation/book-defguide
> And I am try to test the simple-parent project, it contain two modules
> : simple-weather and simple-webapp ,the former provider some interface
> to retrive the weather from yahoo website, and the simple-webapp
> module is to present the result, so in the servlet of the
> simple-webapp ,it call a class named WeatherService in the
> simple-weather/src/main/java/org/sonatype/mavenbook/weather.
> the servlet path is :
> simple-webapp/src/main/java/org/sonatype/mavenbook/web/WeatherServlet.
>
> After the config of the pom. I enter the simple-parent direct and run
> commond : mvn clean install,then I got the error message:
> the class WeatherService can not resolved! It can not identify the class.
> I wonder why cause I followed the guide step by step'....
> The annex are the three poms,anyone can check it ? since I have check
> them many times ,and found nothing..
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>