-
Notifications
You must be signed in to change notification settings - Fork 20
Upgrading
Two things changed in 3.0 that can break an existing project.
The SONATYPE_RELEASES, SONATYPE_SNAPSHOTS, SONATYPE_RELEASES_LEGACY and
SONATYPE_SNAPSHOTS_LEGACY repositories were removed. Sonatype retired those
endpoints, replace them with CENTRAL_RELEASES and CENTRAL_SNAPSHOTS.
A repository name that doesn't resolve is now reported and skipped instead of
being used. Before, a name like repository("myrepo") that had no matching
bld.repo.myrepo property became a repository at that relative path, which
silently published into a directory instead of uploading anything. Now it
warns and is left out. Declare the property, use one of the standard names, or
write out the location. A bld.repo. property that holds something that isn't
an absolute path or a URL is refused outright.
NOTE:
bldnow bundles RIFE2's JSON support, sorife.jsonis available to your build logic without declaring anything.
bld offers a very convenient way to upgrade an existing project to the
latest version. If you use a package manager like Homebrew or SDKMAN!, a
global bld tool will be installed on your system. This tool can be used to
automatically upgrade your project.
Do to so, just type:
bldNOTE: you can also use the self-contained
bldjar instead, you can find more information in the installation section.
You'll see the welcome message with a list of commands that are supported, for instance:
Welcome to bld 3.0.0.
Java version 25.0.3 (Oracle Corporation).
The bld CLI provides its features through a series of commands that
perform specific tasks.
The following commands are supported:
create Creates a new project from multiple choice
create-app Creates a new Java application project
create-base Creates a new Java baseline project
create-lib Creates a new Java library project
create-rife2 Creates a new RIFE2 web application project
help Provides help about any of the other commands
upgrade Upgrades the bld wrapper to the latest version
version Outputs the version of the build system
The following bld arguments are supported:
--offline Works without Internet (only as first argument)
--use-stderr Sends the build output to standard error
-?, -h, --help Shows the help
-D<name>=<value> Sets a JVM system property
-s, --stacktrace Prints out the stacktrace for exceptions
-v, --verbose Prints out detailed information about the operations
You'll notice that the version is 3.0.0 and also that upgrade is one
of the available commands.
NOTE: you could have used the
bld versioncommand to directly check the version, but I wanted to highlight theupgradecommand at the same time
With your project as your current directory, you can check the version directly:
./bld version
bld 1.9.1You can see that the version is older than the installed version of bld.
Still with your project as your current directory, you can use the globally
installed version of bld to perform the upgrade.
bld upgrade
The wrapper was successfully upgraded to 3.0.0.NOTE: it can be confusing to spot the difference between
bldand./bld, the first one is installed in your global path, the second one is project specific. Upgrading is only available from the globally installedbld.
TIP: since
blddoesn't need to be installed and can be ran directly from its jar file, you can upgrade any project without requiring any installation, for instance:
bash -c "$(curl -fsSL https://rife2.com/bld/upgrade.sh)"
You can now use the version command again with your project's bld:
./bld version
bld 3.0.0By using git you can also verify exactly which files were changed:
git status
On branch main
Your branch is up to date with 'origin/main'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: .idea/libraries/bld.xml
modified: .vscode/settings.json
modified: lib/bld/bld-wrapper.jar
modified: lib/bld/bld-wrapper.properties
no changes added to commit (use "git add" and/or "git commit -a")Next learn more about Extensions