Comments (9)
Ah sorry, this is due to the lack of documentation atm. Ill get to writing a proper guide soon.
The gradle plugin version is different from the library version.
to use the latest library version, in your project root create a file called "gradle.properties"
in it, add slimjar.version = 1.2.3
and reload the gradle project
from slimjar.
Also, two side questions:
- is there a way to make SlimJar drop its own dependencies in the directory defined by
downloadDirectoryPath()
? If not, this would also be a great addition to not pollute users' HOME directories. (Since for example, Pterodactyl doesn't support folder names beginning with a dot, so it places the.slimjar
folder in a directory named?
) - SlimJar is currently deleting(?) the dependencies it loads after startup, can this behaviour be changed somehow?
from slimjar.
Yes, we are currently planning to provide users an option to provide their own logger, reason being java's internal logger not being the most useful and we dont want to add another logger framework on just for the library.
About the other questions:
-
Currently it seems we havent provided a way to do that. We'll make sure to include that in the next patch, thank you for the suggestion!
-
It shouldnt be deleting dependencies unless the dependency file changes. Could you confirm if you're seeing this happening as this is unintended behaviour?
from slimjar.
Could you confirm if you're seeing this happening as this is unintended behaviour?
Can confirm that when using ApplicationBuilder.appending("Plan").downloadDirectoryPath(Paths.get(getDataFolder().getAbsolutePath()).resolve("libraries")).build();
to load deps with SlimJar, after a while, the whole libraries
folder disappears from the plugin's data folder. This happens in a Pterodactyl Docker container running Java 16.
from slimjar.
Alright, Ill try to replicate the bug and release a fix asap. Thanks for the report!
from slimjar.
Additionally, SlimJar seems to have issues finding the relocated JARs on Windows, doesn't work at all. On Pterodactyl (and probably on any *nix) works just fine.
I'll try and see if this is related to spaces in the file path.
[23:00:31 INFO] [Plan]: Loading dependencies, this might take a while...
[23:00:37 WARN]: Error loading plugin Plan
io.github.slimjar.injector.InjectionFailedException: SlimJar failed to inject dependency: name -> Dependency{groupId='mysql', artifactId='mysql-connector-java', version='8.0.25', snapshotId='null', transitive=[Dependency{groupId='com.google.protobuf', artifactId='protobuf-java', version='3.11.4', snapshotId='null', transitive=[]}]}
at io.github.slimjar.injector.SimpleDependencyInjector.injectDependencies(SimpleDependencyInjector.java:63) ~[?:?]
at io.github.slimjar.injector.SimpleDependencyInjector.inject(SimpleDependencyInjector.java:50) ~[?:?]
at io.github.slimjar.app.builder.InjectingApplicationBuilder.build(InjectingApplicationBuilder.java:55) ~[?:?]
at com.djrapitops.plan.PlanBungee.onLoad(PlanBungee.java:63) ~[?:?]
at net.md_5.bungee.api.plugin.PluginManager.enablePlugin(PluginManager.java:398) ~[waterfall-1.17-443.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:34188b3:443]
at net.md_5.bungee.api.plugin.PluginManager.loadPlugins(PluginManager.java:300) ~[waterfall-1.17-443.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:34188b3:443]
at net.md_5.bungee.BungeeCord.start(BungeeCord.java:278) ~[waterfall-1.17-443.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:34188b3:443]
at net.md_5.bungee.BungeeCordLauncher.main(BungeeCordLauncher.java:80) ~[waterfall-1.17-443.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:34188b3:443]
at net.md_5.bungee.Bootstrap.main(Bootstrap.java:15) ~[waterfall-1.17-443.jar:git:Waterfall-Bootstrap:1.17-R0.1-SNAPSHOT:34188b3:443]
Caused by: java.nio.file.NoSuchFileException: F:\Software%20Development\minecraft\waterfall%20dev%20server\plugins\Plan\libraries\mysql\mysql-connector-java\8.0.25\relocated\Plan\mysql-connector-java-8.0.25.jar
at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85) ~[?:?]
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103) ~[?:?]
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108) ~[?:?]
at sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:53) ~[?:?]
at sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:38) ~[?:?]
at sun.nio.fs.WindowsFileSystemProvider.readAttributes(WindowsFileSystemProvider.java:199) ~[?:?]
at java.nio.file.Files.readAttributes(Files.java:1843) ~[?:?]
at java.util.zip.ZipFile$Source.get(ZipFile.java:1212) ~[?:?]
at java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:706) ~[?:?]
at java.util.zip.ZipFile.<init>(ZipFile.java:240) ~[?:?]
at java.util.zip.ZipFile.<init>(ZipFile.java:171) ~[?:?]
at java.util.jar.JarFile.<init>(JarFile.java:348) ~[?:?]
at java.util.jar.JarFile.<init>(JarFile.java:319) ~[?:?]
at java.util.jar.JarFile.<init>(JarFile.java:258) ~[?:?]
at io.github.slimjar.injector.loader.InstrumentationInjectable.inject(InstrumentationInjectable.java:70) ~[?:?]
at io.github.slimjar.injector.SimpleDependencyInjector.injectDependencies(SimpleDependencyInjector.java:60) ~[?:?]
... 8 more
from slimjar.
That is an issue from an older version. Try creating a "gradle.properties" file and adding slimjar.version = 1.2.3
to it
It occurs due to the space in the file name
from slimjar.
That is an issue from an older version. Try creating a "gradle.properties" file and adding
slimjar.version = 1.2.3
to itIt occurs due to the space in the file name
Ah, thanks! Is 1.2.3 going to appear in the Gradle plugin portal? I'm trying to use your repo but gradle wants to add .gradle.plugin
to the package name and thus cannot find the artifact in your repo 😅
from slimjar.
This one was my fault 😅 our plugin had a couple of lines of code (which I totally forgot about) that were deleting the dependency cache, apologies!
from slimjar.
Related Issues (20)
- VerifyingRelocationHelper - No data available HOT 2
- [Question/Suggestion] Redundant relocated jars HOT 1
- Skip download if already exists HOT 11
- Choose download location for SlimJar's own dependencies HOT 2
- Add the ability to provide own logger instance HOT 6
- Multi-module issue. HOT 7
- Add exclude feature to "slim" HOT 2
- Unexpected checksum behavior. HOT 1
- Can't inject dependencies HOT 11
- it would be good if you push the sources with javadocs of slimjar artifact to the repository
- sometimes slimjar task stucks HOT 1
- Change default download repo HOT 19
- Project fails to build with Gradle plugin v1.2.2 HOT 2
- Package io.github.slimjar.app.builder does not exist HOT 1
- IllegalArgumentException: URI is not hierarchical
- SlimJar repository HOT 2
- Cannot resolve GSON HOT 11
- Accidental PR HOT 1
- Doesn't support downloading without the Content-Length header HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slimjar.