You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Luke Meyer <lm...@redhat.com> on 2005/11/02 13:13:14 UTC

[m2] Creating a remote repository from a local one

I'm trying to do this and came upon this document:

http://maven.apache.org/maven2/guides/introduction/introduction-to-repositories.html

It looks like I can just copy the contents of ibiblio outright, or set 
up a maven proxy, in order to create my own repository structure.  But 
what I'd really like to do is get my local repository in a place where 
I'm happy with it (everything is downloaded, my stuff builds, etc) and 
then make that a remote repository for all.  The document above 
indicates "The local and remote repositories are structured the same 
way..." so it sounds like I could just literally copy my local 
repository as my remote repository.

I tried this.  I copied my local repository to a web server, set up that 
server in settings.xml as a mirror for central, blew away my local repo, 
and tried to mvn compile.  No dice, plugins could not be found, and as a 
side note, mvn -X doesn't actually tell me what URLs it's trying to 
download from, which would be helpful:

DEBUG] maven-resources-plugin: using locally installed snapshot
[DEBUG] Artifact not found - using stub model: Unable to determine the 
latest version org.apache.maven.plugins:maven-resources-plugin:LATEST:pom
[DEBUG] Using defaults for missing POM 
org.apache.maven.plugins:maven-resources-plugin:pom:LATEST
[DEBUG] maven-resources-plugin: using locally installed snapshot
[DEBUG] Artifact not found - using stub model: Unable to determine the 
release version  org.apache.maven.plugins:maven-resources-plugin:RELEASE:pom
[DEBUG] Using defaults for missing POM 
org.apache.maven.plugins:maven-resources-plugin:pom:RELEASE
[INFO] 
----------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] 
----------------------------------------------------------------------------
[INFO] The plugin 'org.apache.maven.plugins:maven-resources-plugin' does 
not exist or no valid version could be found

Looking at the directory structures, the main difference I can see 
between my repo and ibiblio's is that the metadata file has a different 
name (maven-metadata-central.xml vs maven-metadata.xml).  So I tried 
just changing the name.  This seems to "work" but maven now complains 
about the checksum failing (as there is none):

[WARNING] *** CHECKSUM FAILED - Error retrieving checksum file for 
org/apache/maven/plugins/maven-resources-plugin/maven-metadata.xml - 
IGNORING

I have a feeling there must be a better way to go about this than 
renaming all metadata files and ignoring checksum errors.  Any suggestions?

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


Re: [m2] Creating a remote repository from a local one

Posted by Brett Porter <br...@gmail.com>.
We're working on some tools to help manage repositories in such a way.

It depends on which information you need to maintain. The complete
solution would be to merge the metadata files in the same directory
and recompute the checksums. However, Maven will work even if they are
all removed with the exception of version ranges on dependencies.

- Brett

On 11/2/05, Luke Meyer <lm...@redhat.com> wrote:
> I'm trying to do this and came upon this document:
>
> http://maven.apache.org/maven2/guides/introduction/introduction-to-repositories.html
>
> It looks like I can just copy the contents of ibiblio outright, or set
> up a maven proxy, in order to create my own repository structure.  But
> what I'd really like to do is get my local repository in a place where
> I'm happy with it (everything is downloaded, my stuff builds, etc) and
> then make that a remote repository for all.  The document above
> indicates "The local and remote repositories are structured the same
> way..." so it sounds like I could just literally copy my local
> repository as my remote repository.
>
> I tried this.  I copied my local repository to a web server, set up that
> server in settings.xml as a mirror for central, blew away my local repo,
> and tried to mvn compile.  No dice, plugins could not be found, and as a
> side note, mvn -X doesn't actually tell me what URLs it's trying to
> download from, which would be helpful:
>
> DEBUG] maven-resources-plugin: using locally installed snapshot
> [DEBUG] Artifact not found - using stub model: Unable to determine the
> latest version org.apache.maven.plugins:maven-resources-plugin:LATEST:pom
> [DEBUG] Using defaults for missing POM
> org.apache.maven.plugins:maven-resources-plugin:pom:LATEST
> [DEBUG] maven-resources-plugin: using locally installed snapshot
> [DEBUG] Artifact not found - using stub model: Unable to determine the
> release version  org.apache.maven.plugins:maven-resources-plugin:RELEASE:pom
> [DEBUG] Using defaults for missing POM
> org.apache.maven.plugins:maven-resources-plugin:pom:RELEASE
> [INFO]
> ----------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ----------------------------------------------------------------------------
> [INFO] The plugin 'org.apache.maven.plugins:maven-resources-plugin' does
> not exist or no valid version could be found
>
> Looking at the directory structures, the main difference I can see
> between my repo and ibiblio's is that the metadata file has a different
> name (maven-metadata-central.xml vs maven-metadata.xml).  So I tried
> just changing the name.  This seems to "work" but maven now complains
> about the checksum failing (as there is none):
>
> [WARNING] *** CHECKSUM FAILED - Error retrieving checksum file for
> org/apache/maven/plugins/maven-resources-plugin/maven-metadata.xml -
> IGNORING
>
> I have a feeling there must be a better way to go about this than
> renaming all metadata files and ignoring checksum errors.  Any suggestions?
>
> ---------------------------------------------------------------------
> 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