You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by so...@tanesha.net on 2006/05/12 10:21:06 UTC

Dependency on war file in local repository.

Hello List,

I am a new user with Maven, so please excuse me if I am asking a trivial
question.

My question is that I have a 3rd party war file, which I would like to
extend with some additional functionality.   I read that if I in a war
project, I specify dependency on another war, then the two will be merged.
 However, I get stuck before that.

In my pom I have the following:
..
    <dependency>
      <groupId>net.sf.pebble</groupId>
      <artifactId>pebble</artifactId>
      <version>1.9</version>
      <type>war</type>
    </dependency>
..
pebble is a 3rdparty war that I've installed into my local repository with:
mvn install:install-file -Dfile=pebble.war -DgroupId=net.sf.pebble
-DartifactId=pebble -Dversion=1.9 -Dpackaging=war

When I try to create the new war with the war:war goal, then I get the
following:
Downloading:
http://repo1.maven.org/maven2/net/sf/pebble/pebble/1.9/pebble-1.9.pom
[WARNING] Unable to get resource from repository central
(http://repo1.maven.org/maven2)

However, this file should (and does) exist in the local repository. Is
there some fundamental flaw in my understanding of Maven or am I just
missing some step?

Thanks,
Soren Davidsen


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


Re: Dependency on war file in local repository.

Posted by so...@tanesha.net.
[snip]

>> My question is that I have a 3rd party war file, which I would like to
>> extend with some additional functionality.   I read that if I in a war
>> project, I specify dependency on another war, then the two will be
>> merged.

> This is probably now the most frequently asked question on this list;
> the maven docs really need to be updated to cover this.
>
> As the message above shows, it is trying to download
>   pebble-1.9.pom
> ie a pom file, NOT the jarfile. This is just a warning that no pom file
> can be located; everything will still work.
>
> You can get rid of this by repeating the mvn install:install-file and
> adding -DgeneratePom=true. See the email archives for this week for a
> whole lot more info on this subject.

Sorry about that - I was aware it was a warning, but it was the only thing
which triggered my mind as something wrong.

My question was more like what to do to get the dependency war to merge
into my webapp?  I read that adding the war as dependency was enough for
this, but I'm somehow missing something since its not happening.

Thanks again,
Soren


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


Re: Dependency on war file in local repository.

Posted by Simon Kitching <sk...@apache.org>.
On Fri, 2006-05-12 at 10:21 +0200, soren@tanesha.net wrote:
> Hello List,
> 
> I am a new user with Maven, so please excuse me if I am asking a trivial
> question.
> 
> My question is that I have a 3rd party war file, which I would like to
> extend with some additional functionality.   I read that if I in a war
> project, I specify dependency on another war, then the two will be merged.
>  However, I get stuck before that.
> 
> In my pom I have the following:
> ..
>     <dependency>
>       <groupId>net.sf.pebble</groupId>
>       <artifactId>pebble</artifactId>
>       <version>1.9</version>
>       <type>war</type>
>     </dependency>
> ..
> pebble is a 3rdparty war that I've installed into my local repository with:
> mvn install:install-file -Dfile=pebble.war -DgroupId=net.sf.pebble
> -DartifactId=pebble -Dversion=1.9 -Dpackaging=war
> 
> When I try to create the new war with the war:war goal, then I get the
> following:
> Downloading:
> http://repo1.maven.org/maven2/net/sf/pebble/pebble/1.9/pebble-1.9.pom
> [WARNING] Unable to get resource from repository central
> (http://repo1.maven.org/maven2)
> 
> However, this file should (and does) exist in the local repository. Is
> there some fundamental flaw in my understanding of Maven or am I just
> missing some step?

This is probably now the most frequently asked question on this list;
the maven docs really need to be updated to cover this.

As the message above shows, it is trying to download
  pebble-1.9.pom
ie a pom file, NOT the jarfile. This is just a warning that no pom file
can be located; everything will still work.

You can get rid of this by repeating the mvn install:install-file and
adding -DgeneratePom=true. See the email archives for this week for a
whole lot more info on this subject.

Regards,

Simon


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