package org.opentrafficsim; import java.io.File; import java.io.IOException; import java.net.URISyntaxException; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Paths; import java.util.List; /** * Utility to clean the .classfile files for all projects; the excludes=** will be removed. Run this class only from Eclipse! *
* Copyright (c) 2003-2020 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. * BSD-style license. See OpenTrafficSim License. *
* @author Alexander Verbraeck */ public final class CleanClassfileFiles { /** */ private CleanClassfileFiles() { // utility class } /** * @param args String[]; none * @throws IOException on I/O error * @throws URISyntaxException on I/O error */ public static void main(final String[] args) throws IOException, URISyntaxException { File classFolder = new File(CleanClassfileFiles.class.getResource("/").toURI()); File workspaceFolder = classFolder.getParentFile().getParentFile().getParentFile(); for (File projectFolder : workspaceFolder.listFiles()) { if (projectFolder.isDirectory() && projectFolder.getName().startsWith("ots") && new File(projectFolder, ".classpath").exists()) { boolean changed = false; File classPathFile = new File(projectFolder, ".classpath"); List