Using Git and Maven

Discussion in 'Plugin Development' started by randomizer1234, Aug 6, 2014.

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

    randomizer1234

    Hello.
    I'm writing a plugin, and I'm using Git for version control and Maven to build.
    The plugin is not ready to be built yet, but when it will be what should I do?
    I commit with Git, and then what do I do with Maven to build the jar package?
    Also, do I have to update the plugin version in both plugin.yml and pom.xml manually after every commit?

    Thank you in advance.
     
  2. Offline

    xAstraah

    randomizer1234, To export the plugins jar using Maven is pretty simple just:
    - Right click on your project.
    - Run As
    - Maven Install
    Then find the file location and the file name should be something like PLUGINNAME-SNAPSHOT.jar

    For updating your plugin to the latest builds using maven you will want to change the version in the pom.xml but you do not have to change the one in the plugin.yml since that is the version of your plugin.

    Hope this helps,
    xAstraah.
     
  3. Offline

    _LB

    If you use NetBeans, you can open maven projects and use the nice build/clean-and-build buttons on the toolbar. NetBeans also has Git integration so you can commit from NetBeans.
     
  4. Offline

    AoH_Ruthless

    randomizer1234
    You will have to update your pom.xml every time you wish to release a new version. However, you may choose to filter your plugin.yml as a resource (define targetpath, all that), set filtering to true, and in your plugin.yml change 'version' to ${project.version}. On build, if you followed the steps correctly, maven will filter through and replace ${project.version} with your version.
     
  5. Offline

    randomizer1234

    Done that. Thank you very much!
     
    AoH_Ruthless likes this.
Thread Status:
Not open for further replies.

Share This Page