Release management with Maven

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 ธ.ค. 2024

ความคิดเห็น • 54

  • @joelfankam3719
    @joelfankam3719 2 ปีที่แล้ว +1

    great job Daniel, like your explanation

  • @licosan-z2v
    @licosan-z2v 3 ปีที่แล้ว +2

    thanks for the clear explanation, it helps a lot for a beginner

  • @motarski
    @motarski 5 ปีที่แล้ว +1

    Maybe one of the best maven videos on youtube

    • @DanielPersson
      @DanielPersson  5 ปีที่แล้ว

      Hi Ivan
      Thank you, and thank you for watching my videos
      Best regards
      Daniel

  • @ruixue6955
    @ruixue6955 ปีที่แล้ว +1

    4:33 skip till 5:38 then make releases
    9:34 maven-release-plugin
    12:25 command: mvn release:prepare

  • @cdclaxton
    @cdclaxton 4 ปีที่แล้ว +3

    This was really useful. Thanks for uploading the tutorial :-)

  • @putumaninomzaza1008
    @putumaninomzaza1008 2 ปีที่แล้ว +1

    This was really helpful, Thanks D

  • @stefanfrei6199
    @stefanfrei6199 3 ปีที่แล้ว +1

    good info friend, be blessed!

  • @DanielPersson
    @DanielPersson  7 ปีที่แล้ว

    One thing you can use the tag after release:prepare is to run a more extensive testing sweet on your remote server.
    So for instance you could add a webhook on github or you coworkers could download and test the tag before pushing the release.

  • @richardlanglois5183
    @richardlanglois5183 5 ปีที่แล้ว +1

    Great presentation!

  • @arjunachuravi
    @arjunachuravi 9 หลายเดือนก่อน +1

    still useful

  • @kunalborse800
    @kunalborse800 8 หลายเดือนก่อน +1

    I am using this and it is working fine but it only increamnet patch version how to use this and auto increament major or minor version as well

    • @DanielPersson
      @DanielPersson  8 หลายเดือนก่อน

      Hi.
      Yes you are correct, it only auto increment the patch version. If you want to push a major or minor version you just change when you specify the version during the release process. And then a new snapshot with the next patch version will be created. So you decide when to release major or minor but default is patch.
      I hope this helps. Thank you for watching my videos.
      Best regards
      Daniel

  • @32gabryel
    @32gabryel 4 ปีที่แล้ว +1

    Thanks! It helped me with some configs. :)

  • @ccJoeMurphy
    @ccJoeMurphy 4 ปีที่แล้ว +1

    thanks - just wondering how do you setup you studio the way you do?

    • @DanielPersson
      @DanielPersson  4 ปีที่แล้ว

      Hi Tony.
      I mostly use Intellj today with the standard setup. I have used Visual Studio.Net earlier and use code for editing also without any extra bells or whistles.
      Thank you for watching my videos
      Best regards
      Daniel

  • @sukumar16k
    @sukumar16k 4 ปีที่แล้ว +1

    Hi Daniel, is there an example for multi module maven project release?

    • @DanielPersson
      @DanielPersson  4 ปีที่แล้ว

      Hi Sukumar
      I don't think there would be much difference in a multi module approach. The main program should just inherit the maven dependencies required in order to build your project.
      If you talking about the module system that only Java engineers uses for their projects I don't know if there is a problem that it creates that would make your builds harder to build. I stay clear of that technology as it does not add any benefit for the developer of the program.
      Thank you for watching my videos.
      Best regards
      Daniel

  • @poojahiremath8206
    @poojahiremath8206 4 ปีที่แล้ว +1

    Hi Daniel, I am setting up pipeline for a maven project. I have private maven repository and I want my project to access the jar files in the private repository when I set up pipelines. My project's version is -RELEASE, what should I mention in .yml file?

    • @DanielPersson
      @DanielPersson  4 ปีที่แล้ว +1

      Hi Pooja.
      Thank you for watching my videos.
      I must have missed some detail in your question but I can't really figure out what you are looking for. Please add more information so I might understand your question easier.
      Again, sorry for not understanding.
      Best regards
      Daniel

  • @chandraveersinghdeora9120
    @chandraveersinghdeora9120 4 ปีที่แล้ว +1

    Hi Daniel, Any Reference to handle releases for multi-module Projects.
    Thanks in Advance !!

    • @DanielPersson
      @DanielPersson  4 ปีที่แล้ว

      Hi Chandraveer.
      No I don't sadly. I have some projects that I manage that have multiple modules and that is a struggle. But mainly the best solution is to handle them as separate projects and then make releases for the main module from time to time but the other modules lives their own life. But making it clear in docs and release notes is hard.
      I hope this helps. Thank you for watching my videos.
      Best regards
      Daniel

  • @rajsinroy
    @rajsinroy 5 ปีที่แล้ว +1

    Hi Daniel , Can you show me how to set up Maven project in azure devops realease pipeline ?

    • @DanielPersson
      @DanielPersson  5 ปีที่แล้ว

      Hi Rajdeeo
      I will look into it and create a video.
      Thank you for watching my videos.
      Best regards
      Daniel

  • @sparrownature9189
    @sparrownature9189 4 ปีที่แล้ว +1

    Hi would like to understand on how to integrate maven release plugin into jenkins, is there any easy ways out.

    • @DanielPersson
      @DanielPersson  4 ปีที่แล้ว

      Well, Jenkins should be able to run any maven project tasks. So if you prep your build with a release.properties it should be able to run the release plugin without any inputs. Never tried it myself as I see this as a manual process.
      Hope this helps.
      Thank you for watching my videos
      Best regards
      Daniel

  • @himaggu
    @himaggu 4 ปีที่แล้ว +1

    So using maven how we can automatically change the parent version in pom file. like version:set -newversion need to give a version name through command line , so how can i automate this command version should be increment automatically i.e. if previous version is 1.0 snapshot it would change to 1.1 snapshot.

    • @DanielPersson
      @DanielPersson  4 ปีที่แล้ว

      Hi Himanshu.
      I'm not sure if the plugin has this functionality. Have never had a use-case for this; worked once in a company that had a parent project to many child projects, but that is the only instance I've come across this setup. And in that case, you rarely updated the version of the parent as it rarely changed.
      Sorry I can't give you an answer, but I'm grateful that you've taken the time to watch my video, and I hope you learned something.
      Best regards
      Daniel

  • @vimbaichatitai6715
    @vimbaichatitai6715 8 หลายเดือนก่อน +1

    At 2:53, you neglect to say what scm is. I don't think it's enough to call it "our little setup for this project".

    • @DanielPersson
      @DanielPersson  8 หลายเดือนก่อน

      Hi.
      SCM = Source code management, usually git but could be older things like subversion and cvs.
      I hope this helps.
      Best regards
      Daniel

  • @shadkhan1700
    @shadkhan1700 6 ปีที่แล้ว +1

    Hi Daniel, Please check this maven-jgitflow-plugin.. It does all work for maven-release-plugin and takes care of git flow as well.

    • @DanielPersson
      @DanielPersson  6 ปีที่แล้ว

      Hi Shad
      I've read the differences and depending on your workflow I can see the pros of both methods. What ever fits your style I guess.
      We work in branches and merges into master before a tagged release so maven-release-plugin works.
      But I'll try it out because we have some issues with resources and It's always fun to learn something new.
      best regards
      Daniel

  • @shadkhan1700
    @shadkhan1700 6 ปีที่แล้ว +1

    Hi Daniel, with your help I was able to use mvn-release-plugin. now my code is pushed to my development branch and tag is updated as 0.1
    there are two subsequent check-in in my development branch with below comments:
    2 .[maven-release-plugin] prepare for next development iteration [maven-release-plugin] prepare for next development iteration
    1. [maven-release-plugin] prepare release 0.1
    Now I want the 0.1 (version tag) code to be pushed to master branch [typical git flow], I mean I want to merge the version 0.1 to master branch, Could you please help me with this ?

    • @DanielPersson
      @DanielPersson  6 ปีที่แล้ว

      Hi Shad.
      The question is if you are coding in both? If you only code in development then you only set your master so it points to the 0.1 version.
      On the other hand, if you have parallel programming in both branches you need to merge them. This could be done with
      git merge 0.1
      Hope this helps.
      Best regards
      Daniel

    • @shadkhan1700
      @shadkhan1700 6 ปีที่แล้ว +1

      Hey Daniel , ahh pardon my silly questions.. i am quite new to git and maven...
      Actually i want to point master to latest release, so in my case:
      1. Master should point to 0.1
      2. Development should point to 0.2-Snapshot ( this is already happening )
      Now, kindly let me know
      1. how to achieve 1st point manually .
      2. Is there any way to automatically point master to the latest release as soon as mvn release:perform is executed.
      P.s. - i only work in development branch master is just to point at latest release

    • @DanielPersson
      @DanielPersson  6 ปีที่แล้ว +1

      Hi Shad
      There are no silly questions. We are all new at something.
      To your question there are two ways to update a branch pointer without merging.
      git branch -f branch-name new-tip-commit
      and
      git update-ref -m "reset: Reset to " refs/heads/
      So
      git branch -f master
      git update-ref -m "reset: Reset master to " refs/heads/master
      You find the commit hash by looking in your development branch log for the tagged commit.
      Hope this helps
      Best regards
      Daniel

  • @nagorik24
    @nagorik24 6 ปีที่แล้ว +1

    Thanks for the tutorial. I had to unset commit.gpgsign for signing error

    • @DanielPersson
      @DanielPersson  6 ปีที่แล้ว +1

      HI Philip
      Thank you for watching my videos.
      I usually use this feature with certificate authentication but it should work with password auth and GitHub as well.
      Glad you got it to work.
      Best regards
      Daniel

  • @shadkhan1700
    @shadkhan1700 6 ปีที่แล้ว +1

    hi Daniel, could you please let me know how to configure this plugin for bitbucket .

    • @DanielPersson
      @DanielPersson  6 ปีที่แล้ว +1

      Hi Shad.
      Thank you for watching my videos.
      Well I looked at the specification of BitBucket, never used it myself, and I see that they support git repositories. So this plugin should work with bitbucket the same way that it does for github you just change your scm url.
      Hope this helps, and if not then don't hesitate to ask again.
      Best regards
      Daniel

  • @SCMowns
    @SCMowns 6 ปีที่แล้ว +1

    I have a question. If I build a client jar and distribute it how does Maven keep it updated when I push version updates?

    • @DanielPersson
      @DanielPersson  6 ปีที่แล้ว +2

      Hi SCMowns
      The short answer is it doesn't.
      If you are using dependencies maven will help you download and keep these up to date, depending on your configuration in the pom file.
      But if you build a client and distribute that maven helps you with versioning but not distribution. So the users of your jar need to download a new one.
      But you can build a function to download the new jar and replace the old one but that's out of the scope of what maven does.
      Example of such a client: Minecraft
      Hope this helps.
      Best regards
      Daniel

    • @SCMowns
      @SCMowns 6 ปีที่แล้ว +1

      Thanks! Subscribed. :) I like how you mentioned Minecraft. I have seen how they distribute jars using their launcher. I could find all the jars under %appdata% > .minecraft. Thanks again for the insight.

  • @ИгорьКузьмин-ч1д
    @ИгорьКузьмин-ч1д 4 ปีที่แล้ว +1

    You didn't explane how you seted up maven for ssh connection!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    • @DanielPersson
      @DanielPersson  4 ปีที่แล้ว

      Hi Игорь
      That is true, I did not cover that in this video. Maven uses the installed keys for the user in the operating system so by adding an SSH key to your user and then send the public part to the git repository provider you will be able to use a git connection for your releases.
      Hope this helps.
      Thank you for watching my videos.
      Best regards
      Daniel

    • @ИгорьКузьмин-ч1д
      @ИгорьКузьмин-ч1д 4 ปีที่แล้ว +1

      @@DanielPersson can i set up this key in server section in setting xml? If yes which id i should specify?Because i use jenkins in remote server, and maven on jenkins dont know about key that i actualy use

    • @DanielPersson
      @DanielPersson  4 ปีที่แล้ว

      Hi Игорь
      Jenkins probably have a local user usually called jenkins or something like that. Perhaps there is a user that initiates the jenkins runner. That user on the system needs a ssh key in their .ssh directory that you give access to on your repository server.
      Maven does not, to my knowledge, use any special ssh setup. It uses the same ssh configuration you have setup locally for the user running the maven command.
      Best regards
      Daniel

  • @istvaneliaszenteno
    @istvaneliaszenteno 10 หลายเดือนก่อน +1

    Because it gives me the following problem: Caused by: org.apache.maven.shared.release.ReleaseFailureException: You don't have a SNAPSHOT project in the reactor projects list.

    • @DanielPersson
      @DanielPersson  10 หลายเดือนก่อน

      Hi
      I have not gotten that issue myself. Maybe your pom file points to a version instead of a SNAPSHOT?
      I hope this helps. Thank you for watching my videos.
      Best regards
      Daniel

    • @istvaneliaszenteno
      @istvaneliaszenteno 8 หลายเดือนก่อน +1

      @@DanielPersson I finally solved the problem, I was having problems with a specific version. But if the example works, thanks for the contribution.