开发者

determining maven artifacts

I'm still a beginner in maven, and would like to know the way to find out what artifacts are actually needed for my webapp project that'll make use of jsf 2+cdi / spring core, security, aop, persistence / jpa 2, hibernate.

Do I really need to find all the related artifactIds somewhere (from book, articles?) and include them all; or perhaps I just need to use a closely related archetype for this, and add the rest of t开发者_StackOverflow中文版he dependencies manually?

Also let's say, if I know that I'm going to use jsf 2 + cdi, is there any tool I could use to find the related artifacts, or perhaps some website to reference? I've been to an mvnrepository website, tried a search on jsf, ok, it shows up jsf-api, but the version is not 2, it's still 1.2 or so.

In determining the newest version of the artifact, I could use the answer from this thread.

Please share your experiences in this, on how find out the correct artifacts.


Maven Archetypes were created to solve this problem. I'm sure an archetype out there exists that will create for you a base JSF project. I think Codehaus has a basic JSF archetype that might meet your needs.

One of the great features of Maven is its ability to resolve transitive dependencies. So if you depend on the necessary JSF libraries, then you will also depending on the JSF libraries depenencies, and Maven will automatically detect and download those for you.

Of course all of this only works if you can find the necessary artifacts in existing public repositories. If you have the jars, but they don't exist in a public repo, you could manager your own repository for all your 3rd party jars. This is fairly common, and there are many ways to do it.

As far as finding the Java jars in a repo, that can be tricky at times too. It's getting better though.

This looks like a nice tutorial. I suggest trying it.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜