tags:

views:

69

answers:

4

I have a jar for jboss messaging, and I don't know group id and artifact id and version, I just have a working jar , how can I add dependency

EDIT

I assume there is a jar somewhere online, I once found a sontype maven repository with search possability if I found it, probably the messaging jar would be there. Does anybody know the url ?

Found it :

http://maven.nuxeo.org/nexus/index.html

A: 

This should do you:

<dependency>  
    <groupId>jboss.messaging</groupId> 
    <artifactId>jboss-messaging</artifactId> 
    <version>1.4.6.GA</version>
</dependency>
David Grant
+3  A: 

Regardless of this jboss-messaging case, you can manually install any jar:

mvn install:install-file -Dfile=<path-to-file> -DgroupId=<myGroup> \
    -DartifactId=<myArtifactId> -Dversion=<myVersion> -Dpackaging=<myPackaging>

Then just use these values in <dependency> tag:

<dependency>  
    <groupId>myGroup</groupId> 
    <artifactId>myArtifactId</artifactId> 
    <version>myVersion</version>
</dependency>

http://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html

snw
+1  A: 

In that case, use a repository search engine, for example:

http://mavensearch.net/search?q=jboss-messaging

I particularly like mavensearch.net because it has lots of indexed repositories, including jboss repository.

If you can find an existing repository containing the artifact you're looking for, prefer this solution over the manual install of an artifact in your local repository (not portable) and over using a system scope (worse than the manual install).

Pascal Thivent
Also http://www.mvnbrowser.com/index.html is good. And if you know a Class name but not which .jar it's in try http://www.findjar.com/index.x
Chris Nava
A: 

Here is the real sonatype repository you mentioned. The other is just running Nexus, and has only central proxied. Check out the this one.

larrys