You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by svenson <se...@uralweb.ru> on 2008/10/15 14:58:45 UTC

Failure to create a WAR file

Hi.
I've encountered the following problem. I work on a web project so to deploy
it on a server I need to create a WAR file. My project depends on a few
libraries and a few projects created by other developers( their projects
also have dependencies). Whenever I use  <packaging>war</packaging> in my
project's POM file, my project doesn't "see" classes from the projects of my
colleagues but when I switch to <packaging>jar</packaging> it goes perfectly
fine. What should I do to create a WAR file by Maven ? Thanks in advance. 
-- 
View this message in context: http://www.nabble.com/Failure-to-create-a-WAR-file-tp19992955p19992955.html
Sent from the Maven - Issues mailing list archive at Nabble.com.


Re: Failure to create a WAR file

Posted by chaitanya Krishna <kr...@gmail.com>.
HI,

You need to add those projects as dependecy in your pom file inside the
dependency tag & try mvn install.

this will work.


On Wed, Oct 15, 2008 at 7:58 AM, svenson <se...@uralweb.ru> wrote:

>
> Hi.
> I've encountered the following problem. I work on a web project so to
> deploy
> it on a server I need to create a WAR file. My project depends on a few
> libraries and a few projects created by other developers( their projects
> also have dependencies). Whenever I use  <packaging>war</packaging> in my
> project's POM file, my project doesn't "see" classes from the projects of
> my
> colleagues but when I switch to <packaging>jar</packaging> it goes
> perfectly
> fine. What should I do to create a WAR file by Maven ? Thanks in advance.
> --
> View this message in context:
> http://www.nabble.com/Failure-to-create-a-WAR-file-tp19992955p19992955.html
> Sent from the Maven - Issues mailing list archive at Nabble.com.
>
>

Re: Failure to create a WAR file

Posted by Wayne Fay <wa...@gmail.com>.
Based on what you've said, I'd guess that the artifacts you are
depending on have not been installed in your local repo cache as yet.

Go into the directories where your various dependencies are located
and run "mvn install" on each one. Then go to your war project and try
"mvn install" again.

Alternatively, if you have a multi-module project set up, you should
be able to run "mvn install" from the top level directory and it will
sort out the proper order to build your modules etc which should help
avoid this error.

Wayne

On Wed, Oct 15, 2008 at 10:14 PM, svenson <se...@uralweb.ru> wrote:
>
> I use mvn install.
> I just mean that when I use <packaging>war</packaging> in my POM file my
> classes for some uncertain reason don't resolve classes from other libraries
> though I use <dependency>...</dependency>.
>
> Wendy Smoak-3 wrote:
>>
>> [moved from dev@]
>>
>> On Wed, Oct 15, 2008 at 5:58 AM, svenson <se...@uralweb.ru> wrote:
>>
>>> I've encountered the following problem. I work on a web project so to
>>> deploy
>>> it on a server I need to create a WAR file. My project depends on a few
>>> libraries and a few projects created by other developers( their projects
>>> also have dependencies). Whenever I use  <packaging>war</packaging> in my
>>> project's POM file, my project doesn't "see" classes from the projects of
>>> my
>>> colleagues but when I switch to <packaging>jar</packaging> it goes
>>> perfectly
>>> fine. What should I do to create a WAR file by Maven ? Thanks in advance.
>>
>> What do you mean by your project doesn't "see" classes from the other
>> projects?  What command did you execute, and what error do you get?
>>
>> --
>> Wendy
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Re%3A-Failure-to-create-a-WAR-file-tp19993976p20007257.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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: Failure to create a WAR file

Posted by Wendy Smoak <ws...@gmail.com>.
On Wed, Oct 15, 2008 at 10:14 PM, svenson <se...@uralweb.ru> wrote:

> I use mvn install.
> I just mean that when I use <packaging>war</packaging> in my POM file my
> classes for some uncertain reason don't resolve classes from other libraries
> though I use <dependency>...</dependency>.

Notice that we're still having to guess what error you're seeing. :)

It *sounds* like a compilation error, which doesn't make sense if you
have the dependencies in your pom, (and the dependency jars actually
contain the classes you think they do.)

If you still need help, paste one of the dependency sections from your
pom and the exact error you're getting.

-- 
Wendy

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


Re: Failure to create a WAR file

Posted by Wayne Fay <wa...@gmail.com>.
Based on what you've said, I'd guess that the artifacts you are
depending on have not been installed in your local repo cache as yet.

Go into the directories where your various dependencies are located
and run "mvn install" on each one. Then go to your war project and try
"mvn install" again.

Alternatively, if you have a multi-module project set up, you should
be able to run "mvn install" from the top level directory and it will
sort out the proper order to build your modules etc which should help
avoid this error.

Wayne

On Wed, Oct 15, 2008 at 10:14 PM, svenson <se...@uralweb.ru> wrote:
>
> I use mvn install.
> I just mean that when I use <packaging>war</packaging> in my POM file my
> classes for some uncertain reason don't resolve classes from other libraries
> though I use <dependency>...</dependency>.
>
> Wendy Smoak-3 wrote:
>>
>> [moved from dev@]
>>
>> On Wed, Oct 15, 2008 at 5:58 AM, svenson <se...@uralweb.ru> wrote:
>>
>>> I've encountered the following problem. I work on a web project so to
>>> deploy
>>> it on a server I need to create a WAR file. My project depends on a few
>>> libraries and a few projects created by other developers( their projects
>>> also have dependencies). Whenever I use  <packaging>war</packaging> in my
>>> project's POM file, my project doesn't "see" classes from the projects of
>>> my
>>> colleagues but when I switch to <packaging>jar</packaging> it goes
>>> perfectly
>>> fine. What should I do to create a WAR file by Maven ? Thanks in advance.
>>
>> What do you mean by your project doesn't "see" classes from the other
>> projects?  What command did you execute, and what error do you get?
>>
>> --
>> Wendy
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Re%3A-Failure-to-create-a-WAR-file-tp19993976p20007257.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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

The information contained in this email is strictly confidential and for the use of the addressee only, unless otherwise indicated. If you are not the intended recipient, please do not read, copy, use or disclose to others this message or any attachment. Please also notify the sender by replying to this email or by telephone (+44 (0)20 7896 0011) and then delete the email and any copies of it. Opinions, conclusions (etc.) that do not relate to the official business of this company shall be understood as neither given nor endorsed by it. IG Index plc is a company registered in England and Wales under number 01190902. VAT registration number 761 2978 07. Registered Office: Friars House, 157-168 Blackfriars Road, London SE1 8EZ. Authorised and regulated by the Financial Services Authority. FSA Register number 114059.

Re: Failure to create a WAR file

Posted by svenson <se...@uralweb.ru>.
I use mvn install.
I just mean that when I use <packaging>war</packaging> in my POM file my
classes for some uncertain reason don't resolve classes from other libraries
though I use <dependency>...</dependency>.

Wendy Smoak-3 wrote:
> 
> [moved from dev@]
> 
> On Wed, Oct 15, 2008 at 5:58 AM, svenson <se...@uralweb.ru> wrote:
> 
>> I've encountered the following problem. I work on a web project so to
>> deploy
>> it on a server I need to create a WAR file. My project depends on a few
>> libraries and a few projects created by other developers( their projects
>> also have dependencies). Whenever I use  <packaging>war</packaging> in my
>> project's POM file, my project doesn't "see" classes from the projects of
>> my
>> colleagues but when I switch to <packaging>jar</packaging> it goes
>> perfectly
>> fine. What should I do to create a WAR file by Maven ? Thanks in advance.
> 
> What do you mean by your project doesn't "see" classes from the other
> projects?  What command did you execute, and what error do you get?
> 
> -- 
> Wendy
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Re%3A-Failure-to-create-a-WAR-file-tp19993976p20007257.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: Failure to create a WAR file

Posted by Wendy Smoak <ws...@gmail.com>.
[moved from dev@]

On Wed, Oct 15, 2008 at 5:58 AM, svenson <se...@uralweb.ru> wrote:

> I've encountered the following problem. I work on a web project so to deploy
> it on a server I need to create a WAR file. My project depends on a few
> libraries and a few projects created by other developers( their projects
> also have dependencies). Whenever I use  <packaging>war</packaging> in my
> project's POM file, my project doesn't "see" classes from the projects of my
> colleagues but when I switch to <packaging>jar</packaging> it goes perfectly
> fine. What should I do to create a WAR file by Maven ? Thanks in advance.

What do you mean by your project doesn't "see" classes from the other
projects?  What command did you execute, and what error do you get?

-- 
Wendy

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


Re: Failure to create a WAR file

Posted by Wendy Smoak <ws...@gmail.com>.
On Wed, Oct 15, 2008 at 5:58 AM, svenson <se...@uralweb.ru> wrote:
> I've encountered the following problem. I work on a web project
...

Please ask questions on the users@maven.apache.org list rather than dev@.

I answered (or, rather, asked more questions,) on that list.  As it
looks like you're posting through Nabble, you can find it here:
http://www.nabble.com/Re%3A-Failure-to-create-a-WAR-file-td19993976.html

-- 
Wendy

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