pastebin-java-api icon indicating copy to clipboard operation
pastebin-java-api copied to clipboard

Class not found

Open Arraying opened this issue 9 years ago • 9 comments

Hi, I am adding this API to my Minecraft plugin, and it seems to be throwing an error at me,

Apparently it cannot find the class, but I've checked the dependency and it seems to be correct. IntelliJ is not erroring either.

Error: http://pastebin.com/gMv1c92L

pom.xml: http://pastebin.com/SYWdSE5D

Code: http://pastebin.com/huBpGs7Q

I'm still very new to maven, could you help me out please?

Arraying avatar Oct 03 '16 17:10 Arraying

Hmm, I guess it may be caused by maven that doesn't copy all the dependencies, check this link

marcoacierno avatar Oct 03 '16 22:10 marcoacierno

You can try this (I've just replaced the package name)

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-shade-plugin</artifactId>
    <version>2.1</version>
    <executions>
        <execution>
            <phase>package</phase>
            <goals>
                <goal>shade</goal>
            </goals>
            <configuration>
                <artifactSet>
                    <includes>
                        <include> com.besaba.revonline:Pastebin:*:*</include>
                    </includes>
                </artifactSet>
            </configuration>
        </execution>
    </executions>
</plugin>

marcoacierno avatar Oct 03 '16 22:10 marcoacierno

Still doesn't work, added the following to the pom.xml: http://pastebin.com/uKAXNp6d

Arraying avatar Oct 04 '16 16:10 Arraying

http://stackoverflow.com/questions/1832853/is-it-possible-to-create-an-uber-jar-containing-the-project-classes-and-the-pr

Weird, I found on stackoverflow the assembly plugin that seems to work as the shade plugin, you can try too

marcoacierno avatar Oct 10 '16 07:10 marcoacierno

Can you try to use the jar file directly? Download it here: https://github.com/marcoacierno/pastebin-java-api/releases/tag/v0.2.0

marcoacierno avatar May 27 '17 11:05 marcoacierno

Sorry for the delayed reply, I've moved over to Gradle now and I thought it'd give it a shot, so using a manual jar is a hastle. Is it still on Maven?

Arraying avatar Jun 04 '17 16:06 Arraying

Nope :( I will see if I can upload it again on Maven

marcoacierno avatar Jun 07 '17 10:06 marcoacierno

If you want to use a custom jar: https://stackoverflow.com/a/20956456/1091466

marcoacierno avatar Jun 07 '17 10:06 marcoacierno

Is there any update on this?

phil14052 avatar Aug 15 '20 15:08 phil14052