0

I am trying to export my bukkit plugin, that im using with an API i made but it cant seem to find my api Jar...

Ive tried moving the file, adding it as a library, editing it, and more!

If anyone can help please tell me whats wrong, I can share some of my code if you need me too but its just a basic plugin, that just cant find the API jar...

"C:\Program Files\Java\jdk1.8.0_202\bin\java.exe" "-Dmaven.multiModuleProjectDirectory=C:\Users\jejoj\Coding\Spigot Plugins\TestPlugin 1.8.9" "-Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2018.3.5\plugins\maven\lib\maven3" "-Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2018.3.5\plugins\maven\lib\maven3\bin\m2.conf" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2018.3.5\lib\idea_rt.jar=51351:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2018.3.5\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2018.3.5\plugins\maven\lib\maven3\boot\plexus-classworlds-2.5.2.jar" org.codehaus.classworlds.Launcher -Didea.version=2018.3.5 clean package
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building TestPlugin 1.8.9 TestPlugin 1.8.9
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ bukkit ---
[INFO] Deleting C:\Users\*NAME*\Coding\Spigot Plugins\TestPlugin 1.8.9\target
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ bukkit ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) @ bukkit ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to C:\Users\*NAME*\Coding\Spigot Plugins\TestPlugin 1.8.9\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /C:/Users/*NAME*/Coding/Spigot Plugins/TestPlugin 1.8.9/src/main/java/mrnitrofish/testplugin/CorePlugin.java:[3,31] package mrnitrofish.MessagesAPI does not exist
[ERROR] /C:/Users/*NAME*/Coding/Spigot Plugins/TestPlugin 1.8.9/src/main/java/mrnitrofish/testplugin/CorePlugin.java:[13,13] cannot find symbol
  symbol:   class MessagesAPI
  location: class mrnitrofish.testplugin.CorePlugin
[ERROR] /C:/Users/*NAME*/Coding/Spigot Plugins/TestPlugin 1.8.9/src/main/java/mrnitrofish/testplugin/CorePlugin.java:[13,32] cannot find symbol
  symbol:   class MessagesAPI
  location: class mrnitrofish.testplugin.CorePlugin
[INFO] 3 errors 
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11.625 s
[INFO] Finished at: 2019-03-22T23:42:58-04:00
[INFO] Final Memory: 15M/155M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project bukkit: Compilation failure: Compilation failure:
[ERROR] /C:/Users/*NAME*/Coding/Spigot Plugins/TestPlugin 1.8.9/src/main/java/mrnitrofish/testplugin/CorePlugin.java:[3,31] package mrnitrofish.MessagesAPI does not exist
[ERROR] /C:/Users/*NAME*/Coding/Spigot Plugins/TestPlugin 1.8.9/src/main/java/mrnitrofish/testplugin/CorePlugin.java:[13,13] cannot find symbol
[ERROR] symbol:   class MessagesAPI
[ERROR] location: class mrnitrofish.testplugin.CorePlugin
[ERROR] /C:/Users/*NAME*/Coding/Spigot Plugins/TestPlugin 1.8.9/src/main/java/mrnitrofish/testplugin/CorePlugin.java:[13,32] cannot find symbol
[ERROR] symbol:   class MessagesAPI
[ERROR] location: class mrnitrofish.testplugin.CorePlugin
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
Picked up _JAVA_OPTIONS: -Xmx2G

Process finished with exit code 1

Expected it to work :P

  • 1
    Have you specified your api jar as a dependency in the plugin pom? – Dmitry Khamitov Mar 23 '19 at 07:25
  • No, how do I do this? I made my own API... I use IntelliJ for coding my plugins. Also, when I add my jar to the libraries, it sets it as Compile, is that needed to change? – Block Gaming Mar 23 '19 at 13:57
  • Maybe https://stackoverflow.com/questions/4955635/how-to-add-local-jar-files-to-a-maven-project will help you. Your plugin has pom.xml into which you should add a dependency on your api jar – Dmitry Khamitov Mar 23 '19 at 16:53
  • If you're using maven for you API as well you should be able to run "mvn install". This will install the compiled API jar inside your local maven repository. If you add the tag for your API inside your pom.xml of the main project maven should be able to resolve the dependency to your API and everything should compile just fine. – Drayke Mar 27 '19 at 09:16
  • Mind posting your pom.xml? – Schokokuchen Bäcker Apr 22 '19 at 13:58
  • This is long gone and i no longer have the code – Block Gaming May 11 '20 at 08:37

0 Answers0