1 00:00:00,310 --> 00:00:03,070 There's far more that you can do with Maven than we could 2 00:00:03,070 --> 00:00:04,770 ever cover in one workshop. 3 00:00:04,770 --> 00:00:07,920 But there's one more tip I'll show you that's super useful for 4 00:00:07,920 --> 00:00:09,560 collaborating with others. 5 00:00:09,560 --> 00:00:12,650 When somebody joins our team, we want them to get the project up and 6 00:00:12,650 --> 00:00:15,040 running on their system as quickly as possible. 7 00:00:15,040 --> 00:00:17,870 Wouldn't it be nice if developers didn't have to install Maven on 8 00:00:17,870 --> 00:00:19,910 their own machines to get up and running? 9 00:00:19,910 --> 00:00:21,985 Well, there is a solution for that. 10 00:00:21,985 --> 00:00:24,828 Borrowed from Gradle and its use of the Gradle wrapper, 11 00:00:24,828 --> 00:00:26,291 there is the Maven wrapper. 12 00:00:26,291 --> 00:00:30,759 To add it to your project, in your project directory, 13 00:00:30,759 --> 00:00:37,680 that is in file-spy on my system, I'll say mvn -N io.takari:maven:wrapper. 14 00:00:37,680 --> 00:00:41,850 This will download the wrapper and when it's done, you'll see a .mvn directory as 15 00:00:41,850 --> 00:00:47,850 well as an mvnw and an mvnw.cmd file which are the executables for 16 00:00:47,850 --> 00:00:51,480 Unix based systems and Windows systems respectively. 17 00:00:51,480 --> 00:00:56,050 So let me show you what that looks like, tree -P and 18 00:00:56,050 --> 00:00:59,706 let's just look for *mvn* items. 19 00:00:59,706 --> 00:01:07,160 Let's --prune the tree and there we go, we get an mvnw and an mvnw.cmd. 20 00:01:07,160 --> 00:01:11,100 Now you can commit these new additions to your repository like Git. 21 00:01:11,100 --> 00:01:15,390 So that when a new developer joins the team, they can simply run mvnw package, 22 00:01:15,390 --> 00:01:19,680 for example, all without installing Maven on their own machines. 23 00:01:19,680 --> 00:01:21,460 All right, that's all for now. 24 00:01:21,460 --> 00:01:24,690 Thanks for hanging with me today to learn the most widely used build tool 25 00:01:24,690 --> 00:01:25,620 in the Java market.