Support multiple Minecraft versions with abstraction/maven

Discussion in 'Resources' started by mbaxter, Dec 13, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    jorisk322

    drtshock was going to do that, but I think he's currently busy judging ten.java :p.
     
    drtshock likes this.
  2. Offline

    chaseoes

    Happy birthday!
     
  3. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı

    I have updated the example github repository to utilize more recent code, and have removed the pre-refactor info from the thread, because supporting 1.4 is silly at this point.
     
  4. Offline

    xGhOsTkiLLeRx

    Having issues getting this to work in Eclipse...
    I'm always receiving the following error on importing:

    Path must include project and resource name: /

    DerFlash
    Any idea? ;)
    Since you mentioned that you want to use Eclipse, too.

    Thanks for any hint,
    Cheers,
    xGhOsTkiLLeRx
     
  5. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı

    xGhOsTkiLLeRx When I do this in Eclipse I don't load it as a maven project but instead as a normal java project. Might require telling Eclipse (in the build path settings) what folders are 'source' folders, but then all is well.
     
  6. Offline

    xGhOsTkiLLeRx

    mbaxter Well then my eclipse doens't like the pom.xml for each module.
    Any clue how you did solve this? :D
     
  7. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı

  8. Offline

    xGhOsTkiLLeRx

    mbaxter I am using m2e ;)

    However, nailed it down:

    in the "regular" pom.xml that ships all the information about version, dependencies etc the following line is causing issues:
    Code:
    <build>
        ...
        ...
        <directory>../../target</directory>
        ...
        ...
    </build>
    
    Setting it to
    Code:
    <build>
        ...
        ...
        <directory>target</directory>
        ...
        ...
    </build>

    solves the problem.
    Strange, I know.

    Sir Jenkins and mvn command line are fine with ../../ however.
    Just another reason why eclipse with plugins is great :)
     
    Europia79 likes this.
  9. Offline

    Europia79

    awe man, I wanted to make a 1.2.5 server
     
    mbaxter likes this.
  10. Offline

    Europia79

  11. Offline

    mythbusterma

    mbaxter

    I've got a plugin setup with a few NMS modules (used with permission) from dhutils and I've got all the directories set up similar to how you have your modules in TagAPI, with a module to reference the rest of the plugin in "modules/". Right now, when I build the plugin via 'mvn clean package' it creates a working plugin with the correct directory structure, and the only problem I'm having is that when writing code, my IDE doesn't recognize Bukkit as a dependency even with this in the pom.xml in modules/<pluginname>/:

    Code:
    <dependency>
      <groupId>org.bukkit</groupId>
      <artifactId>bukkit</artifactId>
      <version>1.7.9-R0.2</version>
      <type>jar</type>
      <scope>provided</scope>
    </dependency>
    Do I need to create a pom.xml somewhere else? Manually put it on the Build Path in my IDE? Add something else to the pom.xml?

    Thanks in advance.
     
  12. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı

    mythbusterma I have no idea. Depends entirely on your IDE. IntelliJ handles these things (mostly) alright.
     
  13. Offline

    mythbusterma

    mbaxter

    I think it's with maven, because when I use maven -> download sources, it doesn't download anything for the maven dependencies.
     
  14. Offline

    xize

    mythbusterma
    your sure the hierachy in your pom is still correct?

    bukkit on top
    craftbukkit under the bukkit dependcy

    it actually works exactly like the normal non maven dependcy system, if craftbukkit is on top it makes problems.
     
  15. Offline

    mythbusterma

    xize

    It doesn't recognize either
     
  16. Offline

    xize

    mythbusterma

    The only thing I would think is that the repo in your pom where it should download the dependcies is wrong.

    you could do a attempt to remove the lines with <scope> I don't know how maven handles it when provided is used in cases of corruption/reconnects etc.
     
  17. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı

    Please do not suggest people change their scope to the wrong one. Provided is the correct choice for Bukkit/CraftBukkit.
     
Thread Status:
Not open for further replies.

Share This Page