开发者

How to add maven dependency

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 possabil开发者_开发问答ity 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


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


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).


This should do you:

<dependency>  
    <groupId>jboss.messaging</groupId> 
    <artifactId>jboss-messaging</artifactId> 
    <version>1.4.6.GA</version>
</dependency>


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜