Maven: How to check if an artifact exists?
问题 How do I check from within a Mojo if an artifact already exists in the local repository? I'm installing large binaries into the local Maven repository and I need to know if they already exist before attempting to download them. 回答1: Solved with the help of http://docs.codehaus.org/display/MAVENUSER/Mojo+Developer+Cookbook /** * The local maven repository. * * @parameter expression="${localRepository}" * @required * @readonly */ @SuppressWarnings("UWF_UNWRITTEN_FIELD") private