Publishing Artifacts in Ivy or Maven
I'm brand new to Apache Ivy and have posted a few other Ivy-related questions in the last few days because, quite frankly, there's not a whole lot of "gentle" introductory material on it.
I now believe I fully understand the power of these types of dependency resolution tools. There's just one more concept I'm not fully understanding, no matter which article I read, and that is the subject of artifact publishing.
You see, I'm used to JARring up distributables and then copying them to a deployment directory via ant
. So, I'm a little confused as to what this "publication" functionality is.
Does "publishing" mean committing to an SCM? Because if all it means is "moving to a 开发者_如何学运维directory" then I just don't see how its any different than ant move command
Thanks for any insight!
In Ivy, "publishing" an artifact is the same as "deploying" in Maven. It means taking the artifact you've built and uplloading it to a repository somewhere for long-term storage and to make it publicly available. A "published" artifact is very easy to include in any Ivy/Maven project via normal dependency management.
You should think of publish in terms of sharing artefacts through Ivy repository. If your product consist of few projects, there is always present a dependency tree between your projects. So, underlying projects needs to provide their output to upper projects. It's useful to share a libraries through Ivy. Or you could publish output jars from all project in your product, and later retrieve them in project that builds a distributive. In one product, for example, I used to publish *.msm files (MS installation modules) from multiple projects and later retrieve them in few projects that builds different installers.
精彩评论