diff --git a/src/main/java/rife/bld/BldVersion.java b/src/main/java/rife/bld/BldVersion.java index 5f5ec47..b28cc03 100644 --- a/src/main/java/rife/bld/BldVersion.java +++ b/src/main/java/rife/bld/BldVersion.java @@ -8,10 +8,10 @@ import rife.resources.ResourceFinderClasspath; import rife.resources.exceptions.ResourceFinderErrorException; /** - * Singleton class that provides access to the current RIFE2 version as a string. + * Singleton class that provides access to the current bld version as a string. * * @author Geert Bevin (gbevin[remove] at uwyn dot com) - * @since 1.0 + * @since 1.7 */ public class BldVersion { private String version_; diff --git a/src/main/java/rife/bld/BuildExecutor.java b/src/main/java/rife/bld/BuildExecutor.java index 5098a78..6c238cf 100644 --- a/src/main/java/rife/bld/BuildExecutor.java +++ b/src/main/java/rife/bld/BuildExecutor.java @@ -4,7 +4,6 @@ */ package rife.bld; -import rife.bld.dependencies.DependencyResolver; import rife.bld.dependencies.Repository; import rife.bld.help.HelpHelp; import rife.bld.operations.HelpOperation; @@ -29,6 +28,7 @@ import java.util.regex.Pattern; * @since 1.5 */ public class BuildExecutor { + public static final File BLD_USER_DIR = new File(System.getProperty("user.home"), ".bld"); public static final File RIFE2_USER_DIR = new File(System.getProperty("user.home"), ".rife2"); public static final String BLD_PROPERTIES = "bld.properties"; public static final String LOCAL_PROPERTIES = "local.properties"; @@ -83,7 +83,10 @@ public class BuildExecutor { HierarchicalProperties bld_properties = null; HierarchicalProperties local_properties = null; - var bld_properties_file = new File(RIFE2_USER_DIR, BLD_PROPERTIES); + var bld_properties_file = new File(BLD_USER_DIR, BLD_PROPERTIES); + if (!bld_properties_file.exists() || !bld_properties_file.isFile() || !bld_properties_file.canRead()) { + bld_properties_file = new File(RIFE2_USER_DIR, BLD_PROPERTIES); + } if (bld_properties_file.exists() && bld_properties_file.isFile() && bld_properties_file.canRead()) { try { var bld = new Properties(); diff --git a/src/main/java/rife/bld/Cli.java b/src/main/java/rife/bld/Cli.java index c2b1cb4..7a64984 100644 --- a/src/main/java/rife/bld/Cli.java +++ b/src/main/java/rife/bld/Cli.java @@ -8,8 +8,8 @@ import rife.bld.help.*; import rife.bld.operations.*; /** - * Implements the RIFE2 CLI build executor that is available when running - * the RIFE2 jar as an executable jar. + * Implements the CLI build executor that is available when running + * the bld jar as an executable jar. * * @author Geert Bevin (gbevin[remove] at uwyn dot com) * @since 1.5 diff --git a/src/main/java/rife/bld/dependencies/Scope.java b/src/main/java/rife/bld/dependencies/Scope.java index dd8f40c..60a008d 100644 --- a/src/main/java/rife/bld/dependencies/Scope.java +++ b/src/main/java/rife/bld/dependencies/Scope.java @@ -6,7 +6,7 @@ package rife.bld.dependencies; /** * Provides all the dependency scopes that are supported by - * the RIFE2 build system. + * the bld build system. * * @author Geert Bevin (gbevin[remove] at uwyn dot com) * @since 1.5 diff --git a/src/main/java/rife/bld/operations/CreateRife2Operation.java b/src/main/java/rife/bld/operations/CreateRife2Operation.java index 2cb66ac..0127e0c 100644 --- a/src/main/java/rife/bld/operations/CreateRife2Operation.java +++ b/src/main/java/rife/bld/operations/CreateRife2Operation.java @@ -5,7 +5,6 @@ package rife.bld.operations; import rife.bld.blueprints.Rife2ProjectBlueprint; -import rife.bld.dependencies.*; import rife.template.TemplateFactory; import rife.tools.FileUtils; import rife.tools.exceptions.FileUtilsErrorException; diff --git a/src/main/java/rife/bld/operations/HelpOperation.java b/src/main/java/rife/bld/operations/HelpOperation.java index c0212b8..b008e56 100644 --- a/src/main/java/rife/bld/operations/HelpOperation.java +++ b/src/main/java/rife/bld/operations/HelpOperation.java @@ -77,7 +77,7 @@ public class HelpOperation { var commands = executor_.buildCommands(); System.err.println(""" - The RIFE2 CLI provides its features through a series of commands that + The bld CLI provides its features through a series of commands that perform specific tasks. The help command provides more information about the other commands. diff --git a/src/main/java/rife/bld/operations/JUnitOptions.java b/src/main/java/rife/bld/operations/JUnitOptions.java index e085699..e11872c 100644 --- a/src/main/java/rife/bld/operations/JUnitOptions.java +++ b/src/main/java/rife/bld/operations/JUnitOptions.java @@ -79,7 +79,7 @@ public class JUnitOptions extends ArrayList { } /** - * Configures the default options that RIFE2 uses when no + * Configures the default options that bld uses when no * options have been explicitly set. * * @return this list of options diff --git a/src/main/java/rife/bld/operations/PrecompileOperation.java b/src/main/java/rife/bld/operations/PrecompileOperation.java index 9e73f57..7fb5b1d 100644 --- a/src/main/java/rife/bld/operations/PrecompileOperation.java +++ b/src/main/java/rife/bld/operations/PrecompileOperation.java @@ -5,7 +5,6 @@ package rife.bld.operations; import rife.bld.BaseProject; -import rife.bld.Project; import rife.template.TemplateDeployer; import rife.template.TemplateFactory; import rife.tools.FileUtils; diff --git a/src/main/java/rife/bld/operations/UpgradeOperation.java b/src/main/java/rife/bld/operations/UpgradeOperation.java index a38ecaa..4effbc1 100644 --- a/src/main/java/rife/bld/operations/UpgradeOperation.java +++ b/src/main/java/rife/bld/operations/UpgradeOperation.java @@ -9,7 +9,7 @@ import java.nio.file.Path; /** * Upgrades the project's bld wrapper to the version of the running - * RIFE2 framework. + * bld tool. * * @author Geert Bevin (gbevin[remove] at uwyn dot com) * @since 1.5 diff --git a/src/main/java/rife/bld/wrapper/Wrapper.java b/src/main/java/rife/bld/wrapper/Wrapper.java index 5788970..d13cccb 100644 --- a/src/main/java/rife/bld/wrapper/Wrapper.java +++ b/src/main/java/rife/bld/wrapper/Wrapper.java @@ -22,7 +22,7 @@ import static rife.tools.FileUtils.JAR_FILE_PATTERN; import static rife.tools.FileUtils.JAVA_FILE_PATTERN; /** - * Wrapper implementation for the build system that ensures the RIFE2 + * Wrapper implementation for the build system that ensures the bld * jar gets downloaded locally and that the classpath for running the * build logic is properly setup. * @@ -31,23 +31,23 @@ import static rife.tools.FileUtils.JAVA_FILE_PATTERN; */ public class Wrapper { static final String MAVEN_CENTRAL = "https://repo1.maven.org/maven2/"; - static final String DOWNLOAD_LOCATION = MAVEN_CENTRAL + "com/uwyn/rife2/rife2/${version}/"; - static final String RIFE2_FILENAME = "rife2-${version}.jar"; - static final String RIFE2_SOURCES_FILENAME = "rife2-${version}-sources.jar"; + static final String DOWNLOAD_LOCATION = MAVEN_CENTRAL + "com/uwyn/rife2/bld/${version}/"; + static final String BLD_FILENAME = "bld-${version}.jar"; + static final String BLD_SOURCES_FILENAME = "bld-${version}-sources.jar"; static final String BLD_VERSION = "BLD_VERSION"; static final String BLD_BUILD_HASH = "bld-build.hash"; static final String WRAPPER_PREFIX = "bld-wrapper"; static final String WRAPPER_PROPERTIES = WRAPPER_PREFIX + ".properties"; static final String WRAPPER_JAR = WRAPPER_PREFIX + ".jar"; - static final String PROPERTY_VERSION = "rife2.version"; - static final String PROPERTY_DOWNLOAD_LOCATION = "rife2.downloadLocation"; + static final String BLD_PROPERTY_VERSION = "bld.version"; + static final String BLD_PROPERTY_DOWNLOAD_LOCATION = "bld.downloadLocation"; static final String PROPERTY_REPOSITORIES = "bld.repositories"; static final String PROPERTY_EXTENSION_PREFIX = "bld.extension"; static final String PROPERTY_EXTENSIONS = "bld.extensions"; static final String PROPERTY_DOWNLOAD_EXTENSION_SOURCES = "bld.downloadExtensionSources"; static final String PROPERTY_DOWNLOAD_EXTENSION_JAVADOC = "bld.downloadExtensionJavadoc"; - static final File RIFE2_USER_DIR = new File(System.getProperty("user.home"), ".rife2"); - static final File DISTRIBUTIONS_DIR = new File(RIFE2_USER_DIR, "dist"); + static final File BLD_USER_DIR = new File(System.getProperty("user.home"), ".bld"); + static final File DISTRIBUTIONS_DIR = new File(BLD_USER_DIR, "dist"); private File currentDir_ = new File(System.getProperty("user.dir")); @@ -75,7 +75,7 @@ public class Wrapper { * Creates the files required to use the wrapper. * * @param destinationDirectory the directory to put those files in - * @param version the RIFE2 version they should be using + * @param version the bld version they should be using * @throws IOException when an error occurred during the creation of the wrapper files * @since 1.5 */ @@ -87,13 +87,16 @@ public class Wrapper { private static final Pattern RIFE2_JAR_PATTERN = Pattern.compile("rife2-[^\"/!]+(? dependency.baseDependency().equals(new Dependency("com.uwyn.rife2", "rife2"))); + dependencies.removeIf(dependency -> dependency.baseDependency().equals(new Dependency("com.uwyn.rife2", "bld"))); var additional_classifiers = new String[0]; if (downloadSources_ || downloadJavadoc_) { diff --git a/src/main/resources/templates/bld/base/idea/libraries/bld.xml b/src/main/resources/templates/bld/base/idea/libraries/bld.xml index 8fe8c38..f944972 100644 --- a/src/main/resources/templates/bld/base/idea/libraries/bld.xml +++ b/src/main/resources/templates/bld/base/idea/libraries/bld.xml @@ -2,11 +2,11 @@ - + - + diff --git a/src/main/resources/templates/bld/base/vscode/settings.json b/src/main/resources/templates/bld/base/vscode/settings.json index 61070be..126201f 100644 --- a/src/main/resources/templates/bld/base/vscode/settings.json +++ b/src/main/resources/templates/bld/base/vscode/settings.json @@ -7,7 +7,7 @@ ], "java.configuration.updateBuildConfiguration": "automatic", "java.project.referencedLibraries": [ - "${HOME}/.rife2/dist/rife2-{{v version/}}.jar", + "${HOME}/.bld/dist/bld-{{v version/}}.jar", "lib/compile/*.jar", "lib/runtime/*.jar", "lib/test/*.jar" diff --git a/src/main/resources/templates/bld/blank/idea/libraries/bld.xml b/src/main/resources/templates/bld/blank/idea/libraries/bld.xml index 8fe8c38..f944972 100644 --- a/src/main/resources/templates/bld/blank/idea/libraries/bld.xml +++ b/src/main/resources/templates/bld/blank/idea/libraries/bld.xml @@ -2,11 +2,11 @@ - + - + diff --git a/src/main/resources/templates/bld/blank/vscode/settings.json b/src/main/resources/templates/bld/blank/vscode/settings.json index 61070be..126201f 100644 --- a/src/main/resources/templates/bld/blank/vscode/settings.json +++ b/src/main/resources/templates/bld/blank/vscode/settings.json @@ -7,7 +7,7 @@ ], "java.configuration.updateBuildConfiguration": "automatic", "java.project.referencedLibraries": [ - "${HOME}/.rife2/dist/rife2-{{v version/}}.jar", + "${HOME}/.bld/dist/bld-{{v version/}}.jar", "lib/compile/*.jar", "lib/runtime/*.jar", "lib/test/*.jar" diff --git a/src/main/resources/templates/bld/lib/idea/libraries/bld.xml b/src/main/resources/templates/bld/lib/idea/libraries/bld.xml index 8fe8c38..f944972 100644 --- a/src/main/resources/templates/bld/lib/idea/libraries/bld.xml +++ b/src/main/resources/templates/bld/lib/idea/libraries/bld.xml @@ -2,11 +2,11 @@ - + - + diff --git a/src/main/resources/templates/bld/lib/vscode/settings.json b/src/main/resources/templates/bld/lib/vscode/settings.json index 61070be..126201f 100644 --- a/src/main/resources/templates/bld/lib/vscode/settings.json +++ b/src/main/resources/templates/bld/lib/vscode/settings.json @@ -7,7 +7,7 @@ ], "java.configuration.updateBuildConfiguration": "automatic", "java.project.referencedLibraries": [ - "${HOME}/.rife2/dist/rife2-{{v version/}}.jar", + "${HOME}/.bld/dist/bld-{{v version/}}.jar", "lib/compile/*.jar", "lib/runtime/*.jar", "lib/test/*.jar" diff --git a/src/main/resources/templates/bld/rife2_hello/idea/libraries/bld.xml b/src/main/resources/templates/bld/rife2_hello/idea/libraries/bld.xml index 8fe8c38..f944972 100644 --- a/src/main/resources/templates/bld/rife2_hello/idea/libraries/bld.xml +++ b/src/main/resources/templates/bld/rife2_hello/idea/libraries/bld.xml @@ -2,11 +2,11 @@ - + - +