Compiling Plugins Help!

Discussion in 'Spigot Plugin Development' started by GlobalPost, May 10, 2015.

  1. I want to compile a plugin, but when I right click the project in eclipse in the run as section I do not see Maven install, nor do I know if I need to use maven. I also don't know how to compile a plugin with spigot 1.8 either, so a tutorial would be nice. If you need more info, please ask.

    PS
    I am trying to compile this plugin: https://github.com/drtshock/ObsidianDestroyer
    BTW, this is not the only plugin I want to compile, but the main one.
     
    #1 GlobalPost, May 10, 2015
    Last edited: May 10, 2015
  2. If you can't get any other help, IntelliJ has maven built in, which makes it super easy to compile maven projects. As for eclipse, you'll need to install a maven plugin I believe.
     
  3. just install maven and do /mvn clean package in the console...
     
    • Like Like x 1
  4. It says "No consoles to display at this time." in ecliples.
     
  5. Ok, sounds like you're on Windows machine. Options:
    1. Easiest: have maven installed for the windows and run "mvn clean package" in cod.exe
    2. If you need to use eclipse , have m2e module installed, then run maven task
     
    • Like Like x 1
  6. What is cod.exe?
     
  7. This
     
    • Agree Agree x 1
  8. I can not be spending money online, I am very secure and also do not like wasting money unless absolutely necessary, minecraft is a hobby which I do not want to spend too much money on.
     
  9. Here is what happens when I run the maven install on the pom file

    [INFO] Scanning for projects...
    [WARNING]
    [WARNING] Some problems were encountered while building the effective model for com.drtshock:ObsidianDestroyer-Factions-v1_6_9_UU:jar:v1_6_9_UU
    [WARNING] 'dependencies.dependency.systemPath' for com.massivecraft:Factions:jar should not point at files within the project directory, ${project.basedir}/../lib/Factions_1.6.9.5-U0.1.12.jar will be unresolvable by dependent projects @ line 22, column 25
    [WARNING]
    [WARNING] Some problems were encountered while building the effective model for com.drtshock:ObsidianDestroyer-Factions-v2_7_x:jar:v2_7_x
    [WARNING] 'dependencies.dependency.systemPath' for com.massivecraft:MassiveCore:jar should not point at files within the project directory, ${project.basedir}/../lib/MassiveCore_2.7.4.jar will be unresolvable by dependent projects @ line 28, column 25
    [WARNING] 'dependencies.dependency.systemPath' for com.massivecraft:Factions:jar should not point at files within the project directory, ${project.basedir}/../lib/Factions_2.7.4.jar will be unresolvable by dependent projects @ line 35, column 25
    [WARNING]
    [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
    [WARNING]
    [WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
    [WARNING]
    [INFO] ------------------------------------------------------------------------
    [INFO] Reactor Build Order:
    [INFO]
    [INFO] ObsidianDestroyer Parent
    [INFO] ObsidianDestroyer Factions Integration
    [INFO] ObsidianDestroyer Factions v1_6_9
    [INFO] ObsidianDestroyer Factions v1_6_9_UU
    [INFO] ObsidianDestroyer Factions v1_8_x
    [INFO] ObsidianDestroyer Factions v2_5_x
    [INFO] ObsidianDestroyer Factions v2_6_x
    [INFO] ObsidianDestroyer Factions v2_7_x
    [INFO] ObsidianDestroyer
    [INFO]
    [INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
    [INFO]
    [INFO] ------------------------------------------------------------------------
    [INFO] Building ObsidianDestroyer Parent parent
    [INFO] ------------------------------------------------------------------------
    [INFO]
    [INFO] --- maven-install-plugin:2.4:install (default-install) @ ObsidianDestroyer ---
    [INFO] Installing C:\Users\Arm\workspace\Obsidain Destroyer\pom.xml to C:\Users\Arm\.m2\repository\com\drtshock\ObsidianDestroyer\parent\ObsidianDestroyer-parent.pom
    [INFO]
    [INFO] ------------------------------------------------------------------------
    [INFO] Building ObsidianDestroyer Factions Integration integration
    [INFO] ------------------------------------------------------------------------
    [INFO]
    [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ ObsidianDestroyer-Factions-Integration ---
    [INFO] Using 'UTF-8' encoding to copy filtered resources.
    [INFO] skip non existing resourceDirectory C:\Users\Arm\workspace\Obsidain Destroyer\factions_integration\src\main\resources
    [INFO]
    [INFO] --- maven-compiler-plugin:3.2:compile (default-compile) @ ObsidianDestroyer-Factions-Integration ---
    [INFO] Nothing to compile - all classes are up to date
    [INFO]
    [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ ObsidianDestroyer-Factions-Integration ---
    [INFO] Using 'UTF-8' encoding to copy filtered resources.
    [INFO] skip non existing resourceDirectory C:\Users\Arm\workspace\Obsidain Destroyer\factions_integration\src\test\resources
    [INFO]
    [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ ObsidianDestroyer-Factions-Integration ---
    [INFO] No sources to compile
    [INFO]
    [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ ObsidianDestroyer-Factions-Integration ---
    [INFO] No tests to run.
    [INFO]
    [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ ObsidianDestroyer-Factions-Integration ---
    [INFO]
    [INFO] --- maven-install-plugin:2.4:install (default-install) @ ObsidianDestroyer-Factions-Integration ---
    [INFO] Installing C:\Users\Arm\workspace\Obsidain Destroyer\factions_integration\target\ObsidianDestroyer-Factions-Integration-integration.jar to C:\Users\Arm\.m2\repository\com\drtshock\ObsidianDestroyer-Factions-Integration\integration\ObsidianDestroyer-Factions-Integration-integration.jar
    [INFO] Installing C:\Users\Arm\workspace\Obsidain Destroyer\factions_integration\pom.xml to C:\Users\Arm\.m2\repository\com\drtshock\ObsidianDestroyer-Factions-Integration\integration\ObsidianDestroyer-Factions-Integration-integration.pom
    [INFO]
    [INFO] ------------------------------------------------------------------------
    [INFO] Building ObsidianDestroyer Factions v1_6_9 v1_6_9
    [INFO] ------------------------------------------------------------------------
    [INFO]
    [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ ObsidianDestroyer-Factions-v1_6_9 ---
    [INFO] Using 'UTF-8' encoding to copy filtered resources.
    [INFO] skip non existing resourceDirectory C:\Users\Arm\workspace\Obsidain Destroyer\factions_1_6_9\src\main\resources
    [INFO]
    [INFO] --- maven-compiler-plugin:3.2:compile (default-compile) @ ObsidianDestroyer-Factions-v1_6_9 ---
    [INFO] Changes detected - recompiling the module!
    [INFO] Compiling 1 source file to C:\Users\Arm\workspace\Obsidain Destroyer\factions_1_6_9\target\classes
    [INFO] -------------------------------------------------------------
    [ERROR] COMPILATION ERROR :
    [INFO] -------------------------------------------------------------
    [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
    [INFO] 1 error
    [INFO] -------------------------------------------------------------
    [INFO] ------------------------------------------------------------------------
    [INFO] Reactor Summary:
    [INFO]
    [INFO] ObsidianDestroyer Parent .......................... SUCCESS [ 1.908 s]
    [INFO] ObsidianDestroyer Factions Integration ............ SUCCESS [ 7.162 s]
    [INFO] ObsidianDestroyer Factions v1_6_9 ................. FAILURE [ 0.169 s]
    [INFO] ObsidianDestroyer Factions v1_6_9_UU .............. SKIPPED
    [INFO] ObsidianDestroyer Factions v1_8_x ................. SKIPPED
    [INFO] ObsidianDestroyer Factions v2_5_x ................. SKIPPED
    [INFO] ObsidianDestroyer Factions v2_6_x ................. SKIPPED
    [INFO] ObsidianDestroyer Factions v2_7_x ................. SKIPPED
    [INFO] ObsidianDestroyer ................................. SKIPPED
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 9.428 s
    [INFO] Finished at: 2015-05-09T21:26:43-06:00
    [INFO] Final Memory: 10M/164M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-compile) on project ObsidianDestroyer-Factions-v1_6_9: Compilation failure
    [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
    [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
    [ERROR]
    [ERROR] After correcting the problems, you can resume the build with the command
    [ERROR] mvn <goals> -rf :ObsidianDestroyer-Factions-v1_6_9
     
  10. "wasting money" lol yeah because $15 for a plugin that's been maintained for 2+ years used by a huge amount of Factions servers is a waste of money. If it's a waste of money then why are you spending so much time trying to get it working?

    If you really are doing it as a 'hobby' and doing it for all the right reasons (not even accepting donations on your server), then you should've read my rant that I put on all of my premium plugins saying I give out free copies to those people if they ask nicely. I would've been happy to give you a free copy had you taken the few seconds to read what I put out there and not been such an ass saying my years of work is a "waste of money."
     
    • Agree Agree x 2
  11. sorry, auto correction.... cmd.exe.
     
    • Useful Useful x 1
  12. I actually made a post on your profile, but I do not believe you ever replied, so I took things into my own hands. Also, I am not accepting donations but I am just developing the server for fun, just to mess around with on with friends. I can even send you the files of the server, it is just for fun. Sorry if I offended you in any way I just really want to have the plugin, but I understand what you are talking about.
     
  13. Thanks for that correction, I assumed so but just wanted to be sure.
     
  14. Despite my profile saying I don't respond to questions on there and the rant on the resource threads saying to private message me.

    People that can't follow basic directions or read what I put out there are one of the main reasons I started charging for my plugins / support. But with that, I've wasted enough time on this thread.
     
  15. I saw that, and I could not figure out how to PM, as idiotic as I am. You seem to be acting very immature in my opinion, but that will be fine.

    Does anyone have any ideas how to fix the errors in the log I posted above?
     
  16. you just need to install Factions-1.6.9.4.jar in your local maven repository, then you should be good to go.

    Looks like ObsidianDestoryer's module try to get Factions-1.6.9.4 from their local repository. You just need to provide this inaccessible resource from your own local repository.
     
    • Informative Informative x 1
  17. Alright, how may I go about this? Just drop it into the folder ObsidianDestroyer?

    (Thanks so much for the help!)
     
  18. this is what I did:

    1) open my terminal:
    2) downloaded Facitons-1.6.9.4.jar
    3) executed
    Code (Text):

    mvn install:install-file -Dfile=Factions-1.6.9.4.jar -DgroupId=com.turt2live.lib -DartifactId=Factions-1.6.9.4 -Dversion=1.6.9.4 -Dpackaging=jar
     
    to install Factions-1.6.9.4.jar into my local maven repository
    4) did
    Code (Text):

    git clone https://github.com/drtshock/ObsidianDestroyer.git
     
    5) did "mvn clean package"
     
    • Friendly Friendly x 1
  19. Thanks I will try and then give you an update.