boomslap 5 Posted November 19, 2021 Long story short I'm trying to build a script with maven because I want to use dependencies. Currently I only have one dependency and that's the Apache Commons Lang3. I know from the guide that you have to pack the dependencies in the script JAR which I have setup successfully since when I open the jar I can see the class files of the dependency in there. For some reason though, when in the script I execute a method from the dependency I get the 'NoSuchMethodError' Can anyone think of why that possibly happens? Let me know if you need any additional information. I am using Eclipse IDE ERROR: Quote 2:53:34 PM: [ERROR] The script had a problem starting: java.lang.NoSuchMethodError: 'java.lang.String org.apache.commons.lang3.StringUtils.capitalize(java.lang.String)' at adeline.Adeline.onStart(Adeline.java:34) at org.dreambot.api.script.AbstractScript.run(AbstractScript.java) at java.base/java.lang.Thread.run(Thread.java:833) My POM: Spoiler <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>boomslap</groupId> <artifactId>RsBot_Adeline</artifactId> <version>0.0.1-SNAPSHOT</version> <name>Dreambot Adeline</name> <description>Noice</description> <properties> <!-- java properties --> <maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.source>1.8</maven.compiler.source> <dreambot.path>C:/Users/boomslap/DreamBot</dreambot.path> </properties> <dependencies> <!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 --> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> <version>3.12.0</version> </dependency> <dependency> <groupId>dreambot</groupId> <artifactId>client</artifactId> <version>1.0</version> <scope>system</scope> <systemPath>${dreambot.path}/BotData/client.jar</systemPath> </dependency> </dependencies> <!-- build jar file with dependencies --> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.6.1</version> <configuration> <source>1.8</source> <target>1.8</target> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <version>3.1.1</version> <configuration> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> <outputDirectory>${dreambot.path}/Scripts</outputDirectory> </configuration> <executions> <execution> <id>make-assembly</id> <phase>package</phase> <goals> <goal>single</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </project> Thanks for your attention!
boomslap 5 Author Posted November 20, 2021 If possible, could someone provide me with a POM file that is tested and works 100%? Every dreambot POM file I find online doesn't work.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.