Acceso al repositorio de artefactos personalizados (no Java) de Maven

I'm looking for a way to access a custom, non-Java, artifact repository with Maven. We have an artifact repository consisting (more or less) of a bunch of zip files (containing native executables, header files, etc.) on a Windows share. These are accessed by a Ruby script which can materialize/unpack these artifacts as needed. There are also artifacts which are not stored on disk, but is materialized from other places (Subversion, for example).

I would like to be able to integrate these repositories into a Maven build, so that (for example) integration tests can use .exe and .dll files from the native artifacts. I've looked at Nexus and Artifactory, but it is difficult to tell how well they would suit this scenario. Most of the documentation around "custom layouts" seem to assume that we are talking about Java artifacts of some kind.

preguntado el 12 de junio de 12 a las 21:06

You married to Maven? Apache ivy has a standalone java client that just does dependency management. Ivy also supports more than just Maven repositories -

Changing to something other than Maven is not an alternative at this point, no. -

3 Respuestas

Forget the fact that these things are called "Maven Repositories", while Maven has a certain expectation of repository structure this same structure is also what is used by almost every other Java build tool that is out there. Think of these things as general storage for artifacts with coordinates: groupId, artifactId, version, qualifier.

A good repository manager doesn't care what you are storing in this repository. It could be a ZIP file, an EXE, whatever you want to store. All it cares about is that artifacts are stored in this repository structure. What you end up when you use a repository manager is a collection of artifacts that are addressable by these coordinates.

I use a repository manager to do a number of things that have nothing to do with Java including storing ZIP files used in a deployment process. I access my repository managers using curl. In this case it can be viewed as a simple REST-accessible bit bucket that applies some structure to the files you are storing in it.

(Also, notice that my answer that isn't marketing for either Artifactory or Nexus. ;-)

Respondido el 18 de junio de 12 a las 13:06

The simplest solution here is to expose your repository via HTTP so that it just so happens to have the standard Maven layout and metadata.

If that doesn't work for you, you'll be learning about how to implement some pieces of Maven.

Respondido el 12 de junio de 12 a las 21:06

Artifactory is not tied in with Maven and can store and search any binary, regardless of layout (custom layouts are only needed if you like Artifactory to extract module information about your artifacts, which is used for version auto-cleanup, cross-layout transformations, etc.).

Since Artifactory is accessible purely with HTTP any build tool that can send GET and PUT queries (for resolve and publish, respectively) can talk to it. One common use case is to use curl, but Artifactory also has nice OOTB integrations with leading CI tools for easy configuration-based resolution and publishing. You may find esta entrada del blog helpful as a genreral information about running non-Java/non-Maven builds with Artifactory.

Respondido el 13 de junio de 12 a las 07:06

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.