maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Cohen <sco...@javactivity.org>
Subject Re: Imported JAR causes problems in suboptimal situation
Date Fri, 04 Feb 2011 14:32:03 GMT
On 02/04/2011 07:24 AM, Wendy Smoak wrote:
> On Fri, Feb 4, 2011 at 8:18 AM, Steve Cohen<scohen@javactivity.org>  wrote:
>> Let's say one of my modules (Module A) depends on Hibernate v, X.Y.Z. If I
>> change some code in one of my own modules (Module B) that depends on Module
>> A, the system does not go out to the Internet or other non-local repository
>> to see if Hibernate v. X.Y.Z has changed.  Why is my third party imported
>> dependency (which is versioned at 1.1.3, not a snapshot) treated any
>> differently?  Why does Maven want to check the non-local repos in this
>> situation to see if it has changed?
>
> If it's a released version, Maven is not checking to see if it has changed.
>
> How did your third-party imported dependency get into your local repo?
>
> My guess is that the jar is there, but not the pom.  So every time you
> build, Maven goes looking for the missing pom.
>
> Install the jar *with* a pom:  mvn install:install-file with either
> -DpomFile=... if you have it or -DgeneratePom=true (which I thought
> was the default...) and this should stop.
>
> Another way to make this situation easier is to run a repository
> manager locally and configure a mirror in settings.xml to go to the
> repo on localhost.  That way you can delete your local repo if needed
> and Maven will "download" everything again from the local machine.
>

No, there is a POM.  I believe I ran mvn:install:install-file and I 
would guess that you're right that -DgeneratePom=true is the default 
because I know I didn't create a POM myself.  This POM is quite simple. 
  Is it too simple? Or is this what -Dgenerate=true should generate? 
Should it's type be jar?

  <dependency>
   <groupId>biz.what.ever</groupId>
   <artifactId>ever</artifactId>
   <version>1.1.3</version>
   <type>pom</type>
</dependency>

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


Mime
View raw message