diff --git a/src/main/java/rife/bld/BaseProject.java b/src/main/java/rife/bld/BaseProject.java index d379ae0..67350c1 100644 --- a/src/main/java/rife/bld/BaseProject.java +++ b/src/main/java/rife/bld/BaseProject.java @@ -1546,22 +1546,22 @@ private String createHash() { var finger_print = new StringBuilder(); for (var repository : repositories()) { finger_print.append(repository.toString()); - finger_print.append("\n"); + finger_print.append('\n'); } for (var entry : dependencies().entrySet()) { finger_print.append(entry.getKey()); - finger_print.append("\n"); + finger_print.append('\n'); if (entry.getValue() != null) { for (var dependency : entry.getValue()) { finger_print.append(dependency.toString()); - finger_print.append("\n"); + finger_print.append('\n'); } } } - finger_print.append(downloadSources()); - finger_print.append("\n"); - finger_print.append(downloadJavadoc()); - finger_print.append("\n"); + finger_print.append(downloadSources()) + .append('\n') + .append(downloadJavadoc()) + .append('\n'); try { var digest = MessageDigest.getInstance("SHA-1"); diff --git a/src/main/java/rife/bld/BuildExecutor.java b/src/main/java/rife/bld/BuildExecutor.java index 6c238cf..028b578 100644 --- a/src/main/java/rife/bld/BuildExecutor.java +++ b/src/main/java/rife/bld/BuildExecutor.java @@ -399,7 +399,7 @@ public boolean executeCommand(String command) fuzzy_regexp.append(ch); fuzzy_regexp.append("\\E.*"); } - fuzzy_regexp.append("$"); + fuzzy_regexp.append('$'); var fuzzy_pattern = Pattern.compile(fuzzy_regexp.toString()); matches.addAll(buildCommands().keySet().stream() .filter(c -> fuzzy_pattern.matcher(c.toLowerCase()).matches()) diff --git a/src/main/java/rife/bld/blueprints/BaseProjectBlueprint.java b/src/main/java/rife/bld/blueprints/BaseProjectBlueprint.java index 6a299f4..440cb11 100644 --- a/src/main/java/rife/bld/blueprints/BaseProjectBlueprint.java +++ b/src/main/java/rife/bld/blueprints/BaseProjectBlueprint.java @@ -13,7 +13,6 @@ import static rife.bld.dependencies.Repository.MAVEN_CENTRAL; import static rife.bld.dependencies.Repository.SONATYPE_SNAPSHOTS; -import static rife.bld.dependencies.Scope.test; /** * Provides the dependency information required to create a new base project. diff --git a/src/main/java/rife/bld/dependencies/Dependency.java b/src/main/java/rife/bld/dependencies/Dependency.java index 48fbe0f..a18c7c7 100644 --- a/src/main/java/rife/bld/dependencies/Dependency.java +++ b/src/main/java/rife/bld/dependencies/Dependency.java @@ -130,25 +130,25 @@ public Dependency withClassifier(String classifier) { */ public String toFileName() { var result = new StringBuilder(artifactId()); - result.append("-").append(version()); + result.append('-').append(version()); if (!classifier().isEmpty()) { - result.append("-").append(classifier()); + result.append('-').append(classifier()); } - result.append(".").append(type()); + result.append('.').append(type()); return result.toString(); } public String toString() { - var result = new StringBuilder(groupId).append(":").append(artifactId); + var result = new StringBuilder(groupId).append(':').append(artifactId); if (!version.equals(VersionNumber.UNKNOWN)) { - result.append(":").append(version); + result.append(':').append(version); } if (!classifier.isEmpty()) { - result.append(":").append(classifier); + result.append(':').append(classifier); } - if (!type.isEmpty() && !type.equals("jar")) { - result.append("@").append(type); + if (!type.isEmpty() && !"jar".equals(type)) { + result.append('@').append(type); } return result.toString(); } diff --git a/src/main/java/rife/bld/dependencies/DependencyExclusion.java b/src/main/java/rife/bld/dependencies/DependencyExclusion.java index 23bb3b3..f9a7d7e 100644 --- a/src/main/java/rife/bld/dependencies/DependencyExclusion.java +++ b/src/main/java/rife/bld/dependencies/DependencyExclusion.java @@ -25,10 +25,10 @@ public int hashCode() { } boolean matches(PomDependency dependency) { - return (groupId().equals("*") && artifactId().equals("*")) || - (groupId().equals("*") && artifactId().equals(dependency.artifactId())) || - (groupId().equals(dependency.groupId()) && artifactId().equals("*")) || - (groupId().equals(dependency.groupId()) && artifactId().equals(dependency.artifactId())); + return ("*".equals(groupId()) && "*".equals(artifactId())) || + ("*".equals(groupId()) && artifactId().equals(dependency.artifactId())) || + (groupId().equals(dependency.groupId()) && "*".equals(artifactId())) || + (groupId().equals(dependency.groupId()) && dependency.artifactId().equals(artifactId())); } } diff --git a/src/main/java/rife/bld/dependencies/DependencyResolver.java b/src/main/java/rife/bld/dependencies/DependencyResolver.java index 281c857..8f61937 100644 --- a/src/main/java/rife/bld/dependencies/DependencyResolver.java +++ b/src/main/java/rife/bld/dependencies/DependencyResolver.java @@ -315,15 +315,15 @@ private List getTransferArtifacts() { return getArtifactLocations().stream().map(a -> { var result = new StringBuilder(); - result.append(version).append("/").append(dependency_.artifactId()).append("-").append(pom_version); + result.append(version).append('/').append(dependency_.artifactId()).append('-').append(pom_version); if (!dependency_.classifier().isEmpty()) { - result.append("-").append(dependency_.classifier()); + result.append('-').append(dependency_.classifier()); } var type = dependency_.type(); if (type == null) { type = "jar"; } - result.append(".").append(type); + result.append('.').append(type); return a.appendPath(result.toString()); }).toList(); diff --git a/src/main/java/rife/bld/dependencies/Repository.java b/src/main/java/rife/bld/dependencies/Repository.java index 2eb7fdd..d388f67 100644 --- a/src/main/java/rife/bld/dependencies/Repository.java +++ b/src/main/java/rife/bld/dependencies/Repository.java @@ -26,6 +26,7 @@ public record Repository(String location, String username, String password) { public static final Repository GOOGLE = new Repository("https://maven.google.com/"); public static final Repository MAVEN_CENTRAL = new Repository("https://repo1.maven.org/maven2/"); public static final Repository SONATYPE_RELEASES = new Repository("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"); + public static final Repository SONATYPE_RELEASES_LEGACY = new Repository("https://oss.sonatype.org/service/local/staging/deploy/maven2/"); public static final Repository SONATYPE_SNAPSHOTS = new Repository("https://s01.oss.sonatype.org/content/repositories/snapshots/"); public static final Repository SONATYPE_SNAPSHOTS_LEGACY = new Repository("https://oss.sonatype.org/content/repositories/snapshots/"); public static final Repository APACHE = new Repository("https://repo.maven.apache.org/maven2/"); @@ -83,9 +84,11 @@ public static Repository resolveRepository(HierarchicalProperties properties, St } return switch (locationOrName) { + case "GOOGLE" -> Repository.GOOGLE; case "MAVEN_LOCAL" -> Repository.MAVEN_LOCAL; case "MAVEN_CENTRAL" -> Repository.MAVEN_CENTRAL; case "SONATYPE_RELEASES" -> Repository.SONATYPE_RELEASES; + case "SONATYPE_RELEASES_LEGACY" -> Repository.SONATYPE_RELEASES_LEGACY; case "SONATYPE_SNAPSHOTS" -> Repository.SONATYPE_SNAPSHOTS; case "SONATYPE_SNAPSHOTS_LEGACY" -> Repository.SONATYPE_SNAPSHOTS_LEGACY; case "APACHE" -> Repository.APACHE; @@ -191,11 +194,11 @@ public String getMetadataName() { public String toString() { var result = new StringBuilder(location); if (username() != null) { - result.append(":"); + result.append(':'); try { result.append(StringEncryptor.MD5HLO.performEncryption(username(), null)); if (password() != null) { - result.append(":"); + result.append(':'); result.append(StringEncryptor.MD5HLO.performEncryption(password(), null)); } } catch (NoSuchAlgorithmException e) { diff --git a/src/main/java/rife/bld/dependencies/VersionNumber.java b/src/main/java/rife/bld/dependencies/VersionNumber.java index 650d70b..a205e75 100644 --- a/src/main/java/rife/bld/dependencies/VersionNumber.java +++ b/src/main/java/rife/bld/dependencies/VersionNumber.java @@ -219,11 +219,11 @@ public String toString() { var version = new StringBuilder(); version.append(majorInt()); if (minor != null || revision != null) { - version.append("."); + version.append('.'); version.append(minorInt()); } if (revision != null) { - version.append("."); + version.append('.'); version.append(revisionInt()); } if (qualifier != null && !qualifier.isEmpty()) { diff --git a/src/main/java/rife/bld/dependencies/Xml2MavenMetadata.java b/src/main/java/rife/bld/dependencies/Xml2MavenMetadata.java index 51ad0b7..3a21b0c 100644 --- a/src/main/java/rife/bld/dependencies/Xml2MavenMetadata.java +++ b/src/main/java/rife/bld/dependencies/Xml2MavenMetadata.java @@ -89,20 +89,19 @@ public void endElement(String uri, String localName, String qName) { public void endDocument() throws SAXException { // determine latest stable version by removing pre-release qualifiers - var filtered_versions = new TreeSet(); - filtered_versions.addAll(versions_.stream() - .filter(v -> { - if (v.qualifier() == null) return true; - var q = v.qualifier().toLowerCase(); - return !q.startsWith("rc") && - !q.startsWith("cr") && - !q.contains("milestone") && - !MILESTONE.matcher(q).matches() && - !q.contains("beta") && - !BETA.matcher(q).matches() && - !q.contains("alpha") && - !ALPHA.matcher(q).matches(); - }).toList()); + var filtered_versions = new TreeSet<>(versions_.stream() + .filter(v -> { + if (v.qualifier() == null) return true; + var q = v.qualifier().toLowerCase(); + return !q.startsWith("rc") && + !q.startsWith("cr") && + !q.contains("milestone") && + !MILESTONE.matcher(q).matches() && + !q.contains("beta") && + !BETA.matcher(q).matches() && + !q.contains("alpha") && + !ALPHA.matcher(q).matches(); + }).toList()); // only replace the stable version from the metadata when // something remained from the filtering, then use the diff --git a/src/main/java/rife/bld/dependencies/Xml2MavenPom.java b/src/main/java/rife/bld/dependencies/Xml2MavenPom.java index fd3e46e..03d5c82 100644 --- a/src/main/java/rife/bld/dependencies/Xml2MavenPom.java +++ b/src/main/java/rife/bld/dependencies/Xml2MavenPom.java @@ -287,19 +287,19 @@ public void endElement(String uri, String localName, String qName) { } private boolean isChildOfProject() { - return elementStack_.peek().equals("project"); + return "project".equals(elementStack_.peek()); } private boolean isChildOfParent() { - return elementStack_.peek().equals("parent"); + return "parent".equals(elementStack_.peek()); } private boolean isChildOfDependency() { - return elementStack_.peek().equals("dependency"); + return "dependency".equals(elementStack_.peek()); } private boolean isChildOfExclusion() { - return elementStack_.peek().equals("exclusion"); + return "exclusion".equals(elementStack_.peek()); } private void addProjectProperty(String name) { diff --git a/src/main/java/rife/bld/operations/AbstractCreateOperation.java b/src/main/java/rife/bld/operations/AbstractCreateOperation.java index dd0a0a8..eafc699 100644 --- a/src/main/java/rife/bld/operations/AbstractCreateOperation.java +++ b/src/main/java/rife/bld/operations/AbstractCreateOperation.java @@ -220,13 +220,17 @@ protected void executePopulateProjectStructure() for (var entry : project_.dependencies().entrySet()) { build_template.blankValue("dependencies"); + var version_string = new StringBuilder(0); for (var dependency : entry.getValue()) { build_template.setValue("groupId", dependency.groupId()); build_template.setValue("artifactId", dependency.artifactId()); var version = dependency.version(); - var version_string = version.major() + "," + version.minor() + "," + version.revision(); + version_string.setLength(0); + version_string.append(version.major()).append(',') + .append(version.minor()).append(',') + .append(version.revision()); if (!version.qualifier().isEmpty()) { - version_string += ",\"" + version.qualifier() + "\""; + version_string.append(",\"" ).append(version.qualifier()).append('"'); } build_template.setValue("version", version_string); build_template.appendBlock("dependencies", "dependency"); @@ -364,10 +368,10 @@ protected void executeDownloadDependencies() { public T fromArguments(List arguments) { String package_name = null; String project_name = null; - if (arguments.size() > 0) { + if (!arguments.isEmpty()) { package_name = arguments.remove(0); } - if (arguments.size() > 0) { + if (!arguments.isEmpty()) { project_name = arguments.remove(0); } if ((package_name == null || project_name == null) && System.console() == null) { diff --git a/src/main/java/rife/bld/operations/CleanOperation.java b/src/main/java/rife/bld/operations/CleanOperation.java index b29223e..e4a07ae 100644 --- a/src/main/java/rife/bld/operations/CleanOperation.java +++ b/src/main/java/rife/bld/operations/CleanOperation.java @@ -5,7 +5,6 @@ package rife.bld.operations; import rife.bld.BaseProject; -import rife.bld.Project; import rife.tools.FileUtils; import rife.tools.exceptions.FileUtilsErrorException; diff --git a/src/main/java/rife/bld/operations/CompileOperation.java b/src/main/java/rife/bld/operations/CompileOperation.java index 9eefed3..6805926 100644 --- a/src/main/java/rife/bld/operations/CompileOperation.java +++ b/src/main/java/rife/bld/operations/CompileOperation.java @@ -5,7 +5,6 @@ package rife.bld.operations; import rife.bld.BaseProject; -import rife.bld.Project; import rife.bld.operations.exceptions.ExitStatusException; import rife.tools.FileUtils; diff --git a/src/main/java/rife/bld/operations/CreateLibOperation.java b/src/main/java/rife/bld/operations/CreateLibOperation.java index 91516f7..c4df0f1 100644 --- a/src/main/java/rife/bld/operations/CreateLibOperation.java +++ b/src/main/java/rife/bld/operations/CreateLibOperation.java @@ -5,7 +5,6 @@ package rife.bld.operations; import rife.bld.Project; -import rife.bld.blueprints.BaseProjectBlueprint; import rife.bld.blueprints.LibProjectBlueprint; import java.io.File; diff --git a/src/main/java/rife/bld/operations/CreateOperation.java b/src/main/java/rife/bld/operations/CreateOperation.java index 066cf57..9a64ffe 100644 --- a/src/main/java/rife/bld/operations/CreateOperation.java +++ b/src/main/java/rife/bld/operations/CreateOperation.java @@ -27,13 +27,13 @@ public class CreateOperation { String type = null; String package_name = null; String project_name = null; - if (arguments.size() > 0) { + if (!arguments.isEmpty()) { type = arguments.remove(0); } - if (arguments.size() > 0) { + if (!arguments.isEmpty()) { package_name = arguments.remove(0); } - if (arguments.size() > 0) { + if (!arguments.isEmpty()) { project_name = arguments.remove(0); } if ((type == null || package_name == null || project_name == null) && System.console() == null) { diff --git a/src/main/java/rife/bld/operations/JUnitOperation.java b/src/main/java/rife/bld/operations/JUnitOperation.java index f79a6f3..c13b3f0 100644 --- a/src/main/java/rife/bld/operations/JUnitOperation.java +++ b/src/main/java/rife/bld/operations/JUnitOperation.java @@ -34,7 +34,7 @@ public JUnitOperation fromProject(BaseProject project) { } // add the default JUnit options if none were specified - if (testToolOptions().isEmpty() && mainClass().equals(DEFAULT_TEST_TOOL_JUNIT5)) { + if (testToolOptions().isEmpty() && DEFAULT_TEST_TOOL_JUNIT5.equals(mainClass())) { testToolOptions().defaultOptions(); } @@ -45,9 +45,9 @@ public JUnitOperation fromProject(BaseProject project) { var argument = arguments.get(0); if (argument.startsWith("-")) { arguments.remove(0); - if (argument.equals("--junit-help")) { + if ("--junit-help".equals(argument)) { testToolOptions().add("--help"); - } else if (argument.equals("--junit-clear")) { + } else if ("--junit-clear".equals(argument)) { testToolOptions().clear(); } else { testToolOptions().add(argument); diff --git a/src/main/java/rife/bld/operations/JarOperation.java b/src/main/java/rife/bld/operations/JarOperation.java index b04ae9d..9e8e869 100644 --- a/src/main/java/rife/bld/operations/JarOperation.java +++ b/src/main/java/rife/bld/operations/JarOperation.java @@ -6,7 +6,6 @@ import rife.bld.BaseProject; import rife.bld.NamedFile; -import rife.bld.Project; import rife.tools.FileUtils; import rife.tools.StringUtils; @@ -95,6 +94,7 @@ protected Manifest executeCreateManifest() { // don't use putAll since Attributes does an instanceof check // on the map being passed in, causing it to fail if it's not // and instance of Attributes + //noinspection UseBulkOperation attributes.put(entry.getKey(), entry.getValue()); // ^^^ READ above, don't use putAll } diff --git a/src/main/java/rife/bld/operations/JavaOptions.java b/src/main/java/rife/bld/operations/JavaOptions.java index 4d553b8..5e4ab59 100644 --- a/src/main/java/rife/bld/operations/JavaOptions.java +++ b/src/main/java/rife/bld/operations/JavaOptions.java @@ -8,7 +8,6 @@ import java.io.File; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; /** diff --git a/src/main/java/rife/bld/operations/JavadocOperation.java b/src/main/java/rife/bld/operations/JavadocOperation.java index 12cad14..29573ca 100644 --- a/src/main/java/rife/bld/operations/JavadocOperation.java +++ b/src/main/java/rife/bld/operations/JavadocOperation.java @@ -5,7 +5,6 @@ package rife.bld.operations; import rife.bld.BaseProject; -import rife.bld.Project; import rife.bld.operations.exceptions.ExitStatusException; import rife.tools.FileUtils; import rife.tools.StringUtils; diff --git a/src/main/java/rife/bld/operations/PublishOperation.java b/src/main/java/rife/bld/operations/PublishOperation.java index 537c3c4..9385fb9 100644 --- a/src/main/java/rife/bld/operations/PublishOperation.java +++ b/src/main/java/rife/bld/operations/PublishOperation.java @@ -165,15 +165,15 @@ protected VersionNumber executePublishSnapshotMetadata(Repository repository, Zo protected void executePublishArtifacts(Repository repository, VersionNumber actualVersion) { // upload artifacts for (var artifact : artifacts()) { - var artifact_name = new StringBuilder(info().artifactId()).append("-").append(actualVersion); + var artifact_name = new StringBuilder(info().artifactId()).append('-').append(actualVersion); if (!artifact.classifier().isEmpty()) { - artifact_name.append("-").append(artifact.classifier()); + artifact_name.append('-').append(artifact.classifier()); } var type = artifact.type(); if (type == null) { type = "jar"; } - artifact_name.append(".").append(type); + artifact_name.append('.').append(type); executePublishFileArtifact(repository, artifact.file(), info().version() + "/" + artifact_name); } diff --git a/src/main/java/rife/bld/operations/TestOperation.java b/src/main/java/rife/bld/operations/TestOperation.java index 3002253..184e8ba 100644 --- a/src/main/java/rife/bld/operations/TestOperation.java +++ b/src/main/java/rife/bld/operations/TestOperation.java @@ -5,12 +5,10 @@ package rife.bld.operations; import rife.bld.BaseProject; -import rife.bld.Project; import rife.tools.FileUtils; import java.util.ArrayList; import java.util.List; -import java.util.stream.Collectors; /** * Tests a Java application. diff --git a/src/main/java/rife/bld/operations/UberJarOperation.java b/src/main/java/rife/bld/operations/UberJarOperation.java index 24bb303..ee5f20a 100644 --- a/src/main/java/rife/bld/operations/UberJarOperation.java +++ b/src/main/java/rife/bld/operations/UberJarOperation.java @@ -6,7 +6,6 @@ import rife.bld.BaseProject; import rife.bld.NamedFile; -import rife.bld.Project; import rife.tools.FileUtils; import rife.tools.exceptions.FileUtilsErrorException; diff --git a/src/main/java/rife/bld/operations/UpdatesOperation.java b/src/main/java/rife/bld/operations/UpdatesOperation.java index 16395df..c03aa0f 100644 --- a/src/main/java/rife/bld/operations/UpdatesOperation.java +++ b/src/main/java/rife/bld/operations/UpdatesOperation.java @@ -5,7 +5,6 @@ package rife.bld.operations; import rife.bld.BaseProject; -import rife.bld.Project; import rife.bld.dependencies.*; import java.util.ArrayList; diff --git a/src/main/java/rife/bld/operations/exceptions/SignException.java b/src/main/java/rife/bld/operations/exceptions/SignException.java index 1140b61..eab071d 100644 --- a/src/main/java/rife/bld/operations/exceptions/SignException.java +++ b/src/main/java/rife/bld/operations/exceptions/SignException.java @@ -4,8 +4,6 @@ */ package rife.bld.operations.exceptions; -import rife.tools.HttpUtils; - import java.io.File; import java.io.Serial; diff --git a/src/main/java/rife/bld/publish/PomBuilder.java b/src/main/java/rife/bld/publish/PomBuilder.java index 9e2540b..8df677b 100644 --- a/src/main/java/rife/bld/publish/PomBuilder.java +++ b/src/main/java/rife/bld/publish/PomBuilder.java @@ -151,7 +151,7 @@ private void addDependencies(Template t, Scope scope) { t.blankValue("dependency-type"); t.blankValue("dependency-type-tag"); - if (!dependency.type().equals("jar")) { + if (!"jar".equals(dependency.type())) { t.setValueEncoded("dependency-type", dependency.type()); t.setBlock("dependency-type-tag"); } diff --git a/src/main/java/rife/bld/wrapper/Wrapper.java b/src/main/java/rife/bld/wrapper/Wrapper.java index aa73412..1ff47a9 100644 --- a/src/main/java/rife/bld/wrapper/Wrapper.java +++ b/src/main/java/rife/bld/wrapper/Wrapper.java @@ -364,7 +364,7 @@ private String downloadUrl(String version, String fileName) { var location = getWrapperDownloadLocation(version); var result = new StringBuilder(location); if (!location.endsWith("/")) { - result.append("/"); + result.append('/'); } result.append(fileName); return result.toString(); @@ -496,7 +496,7 @@ private void resolveExtensions() { private int launchMain(File jarFile, List arguments) throws IOException, InterruptedException, FileUtilsErrorException { - if (arguments.isEmpty() || !arguments.get(0).equals("--build")) { + if (arguments.isEmpty() || !"--build".equals(arguments.get(0))) { return launchMainCli(jarFile, arguments); } return launchMainBuild(jarFile, arguments); diff --git a/src/main/java/rife/bld/wrapper/WrapperExtensionResolver.java b/src/main/java/rife/bld/wrapper/WrapperExtensionResolver.java index c0b9f5d..1239a0c 100644 --- a/src/main/java/rife/bld/wrapper/WrapperExtensionResolver.java +++ b/src/main/java/rife/bld/wrapper/WrapperExtensionResolver.java @@ -134,7 +134,7 @@ private void writeHash() { contents.append(fingerPrintHash_); for (var file : localArtifacts_) { if (file.exists() && file.canRead()) { - contents.append("\n").append(file.lastModified()).append(":").append(file.getAbsolutePath()); + contents.append("\n").append(file.lastModified()).append(':').append(file.getAbsolutePath()); } } diff --git a/src/test/java/rife/bld/TestProject.java b/src/test/java/rife/bld/TestProject.java index cd4401c..d432a9d 100644 --- a/src/test/java/rife/bld/TestProject.java +++ b/src/test/java/rife/bld/TestProject.java @@ -11,7 +11,6 @@ import java.io.ByteArrayOutputStream; import java.io.File; import java.io.PrintStream; -import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.util.List; diff --git a/src/test/java/rife/bld/operations/TestCreateBaseOperation.java b/src/test/java/rife/bld/operations/TestCreateBaseOperation.java index ee8ed6f..79edde2 100644 --- a/src/test/java/rife/bld/operations/TestCreateBaseOperation.java +++ b/src/test/java/rife/bld/operations/TestCreateBaseOperation.java @@ -5,16 +5,9 @@ package rife.bld.operations; import org.junit.jupiter.api.Test; -import rife.bld.dependencies.LocalDependency; -import rife.bld.dependencies.Scope; -import rife.bld.operations.exceptions.ExitStatusException; import rife.tools.FileUtils; -import javax.tools.DiagnosticCollector; -import javax.tools.JavaFileObject; -import java.io.File; import java.nio.file.Files; -import java.nio.file.Path; import java.util.regex.Pattern; import static org.junit.jupiter.api.Assertions.*; diff --git a/src/test/java/rife/bld/operations/TestCreateLibOperation.java b/src/test/java/rife/bld/operations/TestCreateLibOperation.java index c54c09b..7cfb736 100644 --- a/src/test/java/rife/bld/operations/TestCreateLibOperation.java +++ b/src/test/java/rife/bld/operations/TestCreateLibOperation.java @@ -5,14 +5,9 @@ package rife.bld.operations; import org.junit.jupiter.api.Test; -import rife.bld.dependencies.LocalDependency; -import rife.bld.dependencies.Scope; import rife.tools.FileUtils; -import java.io.File; import java.nio.file.Files; -import java.nio.file.Path; -import java.util.regex.Pattern; import static org.junit.jupiter.api.Assertions.*; diff --git a/src/test/java/rife/bld/operations/TestJUnitOperation.java b/src/test/java/rife/bld/operations/TestJUnitOperation.java index e3a502b..e837f4a 100644 --- a/src/test/java/rife/bld/operations/TestJUnitOperation.java +++ b/src/test/java/rife/bld/operations/TestJUnitOperation.java @@ -14,7 +14,6 @@ import java.util.function.Function; import static org.junit.jupiter.api.Assertions.*; -import static org.junit.jupiter.api.Assertions.assertNull; public class TestJUnitOperation { @Test diff --git a/src/test/java/rife/bld/operations/TestJarOperation.java b/src/test/java/rife/bld/operations/TestJarOperation.java index 46a3174..8f70192 100644 --- a/src/test/java/rife/bld/operations/TestJarOperation.java +++ b/src/test/java/rife/bld/operations/TestJarOperation.java @@ -161,7 +161,7 @@ void testExecute() while (e.hasMoreElements()) { var jar_entry = e.nextElement(); content.append(jar_entry.getName()); - content.append("\n"); + content.append('\n'); } } @@ -203,7 +203,7 @@ void testFromProject() while (e.hasMoreElements()) { var jar_entry = e.nextElement(); content.append(jar_entry.getName()); - content.append("\n"); + content.append('\n'); } } diff --git a/src/test/java/rife/bld/operations/TestUberJarOperation.java b/src/test/java/rife/bld/operations/TestUberJarOperation.java index 71e3001..ab35e69 100644 --- a/src/test/java/rife/bld/operations/TestUberJarOperation.java +++ b/src/test/java/rife/bld/operations/TestUberJarOperation.java @@ -19,7 +19,6 @@ import java.util.jar.JarFile; import static org.junit.jupiter.api.Assertions.*; -import static org.junit.jupiter.api.Assertions.assertEquals; public class TestUberJarOperation { @Test diff --git a/src/test/java/rife/bld/operations/TestUpdatesOperation.java b/src/test/java/rife/bld/operations/TestUpdatesOperation.java index ff966fa..f8ba73c 100644 --- a/src/test/java/rife/bld/operations/TestUpdatesOperation.java +++ b/src/test/java/rife/bld/operations/TestUpdatesOperation.java @@ -5,7 +5,6 @@ package rife.bld.operations; import org.junit.jupiter.api.Test; -import rife.bld.dependencies.DependencyScopes; import rife.bld.WebProject; import rife.bld.dependencies.*; import rife.tools.FileUtils; diff --git a/src/test/java/rife/bld/operations/TestWarOperation.java b/src/test/java/rife/bld/operations/TestWarOperation.java index d3925e4..077e2bb 100644 --- a/src/test/java/rife/bld/operations/TestWarOperation.java +++ b/src/test/java/rife/bld/operations/TestWarOperation.java @@ -15,7 +15,6 @@ import java.util.regex.Pattern; import static org.junit.jupiter.api.Assertions.*; -import static org.junit.jupiter.api.Assertions.assertEquals; public class TestWarOperation { @Test @@ -138,7 +137,7 @@ void testFromProject() while (e.hasMoreElements()) { var jar_entry = e.nextElement(); content.append(jar_entry.getName()); - content.append("\n"); + content.append('\n'); } }