I've been grappling with getting an internal repository set up for a
couple of days.  (Ben, you responded to my initial post over the
weekend, thanks again.)

I'm still wrestling with some issues, but I've had some success too.
The repository is just a directory with a specific structure.  The key
is making sure items are placed in the repository correctly.  Here is
the command I used to place items in an internal repository called
"repository".

mvn deploy:deploy-file -DgroupId=apache -DartifactId=xercesImpl
-Dversion=2.5.0 -Dpackaging=jar -Dfile=./xercesImpl.jar
-DrepositoryId=repository
-Durl=file:///home/mmarkovich/public_html/repository

Executing the above command created the following
directories /apache/xercesImpl/2.5.0 in the repository and placed
xercesImpl-2.5.0.jar in the 2.5.0 directory.  There were also some other
files created.

Study the command and you should be able to get it to work for your own
needs.  I executed the command in the same directory that contained the
jar file (xercesImpl.jar)  I wanted in the repository.

In order to use the jar file I added the following lines to my pom.xml
file.

  <repositories>        
  <repository>
      <id>repository</id>
      <name>repository</name>
      <url>http://localhost/~mmarkovich/repository</url>
    </repository>
  </repositories>


I'm running Apache on my local box...Apache automatically exposes items
public_html...if you are not familiar with this the url may look
funny...the key is make sure your url is pointing at your repository.

Good luck,
Mike


On Tue, 2006-05-23 at 10:38 +0100, ben short wrote:
> Hi,
> 
> Search the list for "Structure of an Internal Repository".
> 
> and this is what i did...
> 
> I have added the following to my settings.xml
> 
> <profile>
>      <id>internal</id>
>      <repositories>
>        <repository>
>          <id>internal-release</id>
>          <name>Internal Release</name>
>      <url>http://192.168.100.20/maven2/release</url>
>        </repository>
>      </repositories>
>    </profile>
> 
> <activeProfiles>
>     <activeProfile>internal</activeProfile>
>   </activeProfiles>
> 
> Also I added
> 
> text/xml   pom
> test/plain md5 sha1
> 
> to /etc/mime.types
> 
> 
> 
> On 5/23/06, Chris Eidhof <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I'm trying to create an internal repository. It should only contain
> > some libraries that are specific to our project, and not part of
> > IBiblio. What I've done, is this (probably not right, so correct me
> > where I'm wrong):
> >
> > 0. Add those libraries (3d-party jars) with mvn install:install-file
> > 1. Add them as dependencies to my pom.xml
> > 2. mvn install does a build successful.
> >
> > I don't think every developer should do this, so what I want to do is
> > share all those 3d-party libraries in an internal repository. I
> > backed up my .m2 directory (and removed it), and this is what I did
> > next.
> >
> > 1. Create a directory "custom-repos" on my webserver.
> > 2. Recursively copied the directories from my local repository to my
> > webserver (every custom library inside ~/.m2/repository)
> > 3. Added the following line to my pom.xml:
> >    <repositories>
> >        <repository>
> >            <id>custom.repository</id>
> >            <name>My Custom Repository</name>
> >            <url>http://www.example.com/custom-repos/</url>
> >        </repository>
> >    </repositories>
> > 4. mvn install
> >
> > Well, maven doesn't find or doesn't know how to interact with my
> > custom repository. Can anyone give me a hint on what I'm doing wrong?
> >
> > Also, is there a naming convention for repository id's? I was
> > thinking to use the package name of this project, something like
> > com.example.project.
> >
> > Thanks in advance,
> > Chris Eidhof
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to