I have to make small website using spring
. so i chose spring template project
then new spring mvc project
whatever i try there
If you don't want to completely remove your local maven repository, use the following to find the broken artifacts and remove them:
public static void main(String[] args) throws IOException {
findBrokenZip(Paths.get(System.getProperty("user.home") + "/.m2/repository"));
}
static void findBrokenZip(Path path) throws IOException {
try (DirectoryStream stream = Files.newDirectoryStream(path)) {
for (Path entry : stream) {
if (Files.isDirectory(entry)) {
findBrokenZip(entry);
} else {
if (entry.getFileName().toString().endsWith(".jar")) {
try (JarFile zipFile = new JarFile(entry.toFile())) {
zipFile.getManifest();
} catch (ZipException e) {
Files.delete(entry);
}
}
}
}
}
}