Howto configure maven2 repositories in a pom.xml

I've used the wagon-plugin to create a maven repository in my GoogleCode svn-repository and wanted to configure another project to correctly access this repository, but I seem to completely miss the point, or maybe maven2 is?

Here's what I setup in my pom.xml for the project where I want to use the plugin:

I had added the pluginRepositories after many a failed attempt to get the jar-file, even thought the pom for my jsdoctk-plugin was being downloaded, somehow, don't ask me what the specific setup was at that time. However, this configuration in maven 2.0.8 will simply state that the required files were not found, it even includes these mirrors in the places it supposedly went looking. So, I upgraded to 2.0.10, thinking that maybe my maven was too old. As a result it didn't even check my custom repositories anymore, so I started muddling around again and in the end added these mirrors to my settings.xml:

                   <name>jsdoctk Maven Repository</name>
                   <name>jsdoctk Maven Repository</name>

This will make it work, in both 2.0.8 as well as 2.0.10, but I'm left thinking, did I do something wrong? It should be easier than this, right?

The reason I want to know for sure that this is the only way to do it, is because I want to setup a howto on my GoogleCode project to make easy for other developers to start using my plugin without manualy installing it to their local repo... Hope somebody here knows more about repo's in maven2...
LVL 17
Who is Participating?
mreuringAuthor Commented:
I've figured it out, my pom.xml was fine, the problem was in my 'settings.xml'. Long time ago, when I wasn't so wise in maven 2 and working on a new project that required projects that weren't in the apache repository somebody had told me to add a couple of mirrors with a <mirrorOf>*</mirrorOf> attribute, these mirrors were now replacing the repository defined within my project. Only by specifying a more specific <mirroOf>jsdoctk1</mirrorOf> was I overruling these mirrors, the other option being to simply remove the other mirrors...

So, everything's now working as expected! The original settings for my pom.xml were all I needed :)
I am not sure I got your question. Are you trying to add custom source
code repository? The way you have written the pom.xml, you have added
the plugin's maven repository location (*not* the source respository).
mreuringAuthor Commented:
No, I'll try to rephrase.
I want to use a plugin called jsdoctk-plugin within a new project, for generating documentation out of javascript files. Since the plugin isn't in the maven repository I need to install it manually or get it from a seperate maven-repository which was created within the svn-repository of the plugin project at This is a valid maven repository, even though it is managed within a source repository.

The objective is to create a pom.xml for a new project that will allow another programmer to install the project without the need to modify his/her settings.xml and without the need to install the plugin manually, however all my attempts seem to need those 'mirror' configurations within the settings.xml, otherwise maven simply fails to download the pom and jar for the plugin, I just don't understand why and was hoping somebody here has plenty of experience with this and can point out the obvious error that I overlooked?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.