Using following Maven command, the version of artifacts can be updated in a multi-module maven project.
mvn versions:set -DnewVersion='new-version'
For instance, the following maven command updates the version in POM.xml files of the enclosed moduels to
mvn versions:set -DnewVersion='7.1.0-DEV-SNAPSHOT'
Note that, by default this command creates a backup of the existing POM files. In essence, it creates a
pom.xml.versionBackup for each POM file. This behavior can be disabled as follows.
mvn versions:set -DnewVersion='7.1.0-DEV-SNAPSHOT' -DgenerateBackupPoms=false
In my job, we work with a maven multi-module project. While using maven, I have discovered several commands that are quite effective during development. In this post, and in the upcoming posts I am planning to share those.
So, today's post is regarding Maven command to build a specific project. For instance, we have a project, with three modules:
C depends on
B depends on
A. And we are working with
B at this moment. Using following command, we can run different maven phases on module
B as follows.
We can include multiple projects as follows
What is more interesting is that the following command run maven command not only this module, but also the modules that depends on it.
mvn -pl :B clean install -amd
The above command in effect includes module
–am command, we can include all the dependencies as well, which is module
A in this example.
Hope this helps!
Yay! Finally, I have received the certificate of Functional Programming Principles in Scala course. Thanks @coursera! It has been a great pleasure, and I look forward to the future courses (e.g., Discrete Optimization).
In a previous post, I remember mentioning how awesome this course is, and how much I have enjoyed this course, and looking forward to the next advanced course in this topic. It’s great to know that around 70% students ‘Absolutely’ share the same feeling. So, prof. @oderskey, please hurry up. We are waiting!
Once again, thanks prof. @oderskey and his team for this excellent course.
Yay! Just finished Functional Programming Principles in Scala (with 100% score :D) instructed by Prof. Martin Odersky et al, at Coursera. It has been an excellent experience due to its great content, amazing teacher, and interesting assignments (e.g., implementing a solver for Bloxorz).
This course focuses on providing a deeper understanding of FP paradigm, and demonstrates how it excels elegantly compare to its contemporaries. Function composition, recursion, pattern matching, concepts of persistent data structures, lazy evaluation are among the few important concepts that have been emphasized and exemplified in the seven weeks of the course. The application of term-rewriting during reduction of expressions and reasoning about it, seemed simply awesome.
Overall, it has been a wonderful experience and I highly recommend it for anyone interested in learning FP paradigm. To motivate further, note that upon successful completion, a certificate from Coursera is provided ;).
Thanks @oderskey, his team, and @coursera for this excellent course, and for this great opportunity. Looking forward to its advanced part.
Ira Glass’s advice for beginners: