Configure Java
Point Maven or Gradle dependencies at Depsilo's /maven/ route with a mirror or repository entry.
BEFORE
https://repo.maven.apache.org/maven2AFTER
http://localhost:23333/maven/Maven and Gradle share the /maven/ route. Maven has no general command-line option that overrides every remote repository, so configure a mirror.
Configure Maven
Section titled “Configure Maven”<settings> <mirrors> <mirror> <id>depsilo</id> <url>http://localhost:23333/maven/</url> <mirrorOf>*</mirrorOf> </mirror> </mirrors></settings>mvn help:effective-settings | grep depsilo<mirrorOf>*</mirrorOf> routes every declared repository through Depsilo. If you need exclusions, express them explicitly instead of relying on an implicit public fallback.
Configure Gradle
Section titled “Configure Gradle”Use ~/.gradle/init.gradle for a machine-wide setting:
allprojects { repositories { maven { url "http://localhost:23333/maven/" } }}Or add the repository to the project’s repositories block. Choose one of the two, not both.
Verify requests
Section titled “Verify requests”-
Check that the instance is ready
终端窗口 curl -fsS http://localhost:23333/ready -
Refresh dependencies
终端窗口 gradle dependencies --refresh-dependencies -
Confirm the traffic in Admin
Check the
/maven/requests and cache results in Access logs.