You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Frank Russo <fr...@FXALL.com> on 2005/11/29 18:48:18 UTC

[m2] I need clarification on repositories

Can someone please clear this up for me, as I'm getting the same intermittent problems? 

Here is the situation. I have jars that I have loaded into my local repository using the mvn install:install-file command. These will eventually be loaded into an intranet-based remote repository, but I loaded them locally for the time being. These are internal jars that do not exist on ibiblio. These jars are referenced in my pom.xml as dependencies. Everytime I run the mvn package command, I get something like the following for each of these dependencies:

	Downloading: http://repo1.maven.org/maven2/com/fxall/fxall-admin/fxall_ext_API/1.0/fxall_ext_API-1.0.pom
	[WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2)

Sometimes - and this is the intermittent part - I get the following:

	[ERROR] BUILD ERROR
	[INFO] ----------------------------------------------------------------------------
	[INFO] Failed to resolve artifact.

	GroupId: com.fxall.fxall-admin
	ArtifactId: fxall_ext_API
	Version: 1.0

	Reason: Unable to download the artifact from any repository
	  com.fxall.fxall-admin:fxall_ext_API:1.0:jar

	from the specified remote repositories:
	  central (http://repo1.maven.org/maven2)

These are the points where I need clarification: 

	1) My understanding is that if something exists in my local repository, then it shouldn't be loaded from ibiblio. 
	2) Even if point one is wrong, when loading from ibiblio, if the resource can't be found, then it shouldn't give an error since it does exist locally. It just wouldn't be updated.
	3) What happens if the local repository contains a jar, but with no associated pom? Would that cause the constant update check with ibiblio? 
	4) Are there any differences in how this works if your project is declared as a regular version, eg <version>1.0</version>, as compared to a snapshot version, eg <version>1.0-SNAPSHOT</version>? 

These are not clear from any of the documentation I've read, so any clarification would be greatly appreciated...

Here is a scaled down copy of pom.xml for reference:

	<project 
		xmlns="http://maven.apache.org/POM/4.0.0" 
		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
		xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
	    <modelVersion>4.0.0</modelVersion>
	    <groupId>com.fxall.fxall-admin</groupId>
	    <artifactId>fxall-admin</artifactId>
	    <packaging>war</packaging>
	    <version>1.0-SNAPSHOT</version>
	    <name>Altair Admin</name>
	    <dependencies>
		<dependency>
		    <groupId>junit</groupId>
		    <artifactId>junit</artifactId>
		    <version>3.8.1</version>
		    <scope>test</scope>
		</dependency>
		<dependency>
		    <groupId>com.fxall.fxall-admin</groupId>
		    <artifactId>fxall_ext_API</artifactId>
		    <version>1.0</version>
		    <scope>compile</scope>
		</dependency>
	    </dependencies>
	    <build>
		<finalName>fxalladmin</finalName>
	    </build>
	</project>

Frank Russo
Senior Developer
FX Alliance, LLC

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