ant-purifier
Locked, Nix-resolved dependencies for Ant and Apache Ivy.
Quickstart
From a project containing build.xml, ivy.xml:
nix shell 'github:nix-purifiers/ant-purifier'
ant-purifier lock
ant-purifier prefetch
ant test
The project needs an Ivy resolution target. The default is resolve;
select another with ant-purifier --resolve-target dependencies lock.
Use --property name=value for resolver properties.
Commit the lockfiles: ivy.lock.xml, ant-purifier.lock.json.
The native lock records exact revisions; its companion records artifact hashes, original metadata, and resolution configuration.
Development loop
Run ant-purifier lock after changing dependency declarations. Relocking retains existing pins.
Run ant-purifier update to update dependencies, then ant-purifier prefetch.
Update one selected dependency with ant-purifier update commons-lang3. Other selected pins are retained.
Using locked dependencies
The development environment supplies a wrapper that runs the build tool with the locked dependencies. Without an applicable purifier lock, it warns and lets the tool use its usual dependency resolution. A stale or invalid lock fails with a repair command.
The wrapper handles Ant targets; other commands run normally.
Alternatively, activate the native plugin in the build. Resolve io.github.nix-purifiers:ant-purifier from the native plugin repository. Keep bootstrap dependencies separate from application dependencies.
See the activation example.
Native Maven bootstrap resolution is impure; use the wrapper for pure plugin resolution.
Working offline
Run ant-purifier prefetch to prepare the locked dependencies. This does not guarantee that the entire build can run offline.
Outside this lock: Arbitrary downloads performed by other Ant tasks.
Prefetch retains dependency repository, compiler, Ant, plugin, editor toolchain through garbage-collector roots beside the selected lockfile.
Nix builds
Apply overlays.default and call pkgs.ant-purifier.buildAntProject.
The result exposes: packages, tests, release, fetches.
packages.project builds the project. packages.environment contains
the locked repository. publishTarget enables native Ivy publications
through packages.repository.
See builder examples.
The project builds in the Nix sandbox.
Builder options include buildTargets, publishTarget, lockFile, ivyLock, ivyFile, buildFile, fetchers, projectDependencies.
Supported scope
Target systems
- x86_64-linux
- aarch64-linux
Dependency sources
- HTTP(S)
Checked toolchain
- Ant 1.10.18
- Ivy 2.6.0
- JDK 21
The native plugin targets Java 11.
Not supported
- inline Ivy resolution
- inherited descriptors
- branches
- multiple project base directories
- custom cache managers
- explicit artifact URLs
More information
Setup and activation · Version compatibility · Using locked dependencies · Language tooling integration · Nix builds · Project projections.