bg left:40% 80%

Apache Maven


bg right:40% 80%

Distribution Intermezzo

What does it take to build, distribute & run java application?

What are the distribution options?


What is Maven


Maven’s Goals

  1. Making the build process eas(y/ier)
  2. Providing a uniform build system
  3. Providing quality project information
  4. Encouraging better development practices

Maven What?

  1. Describes how to build your project via POM file descriptor
  2. Allows you to define useful metadata about your project
  3. Provides dependency management
  4. There are reasonable defaults

Project structure

project_root
|- src
    |- main
        |- java
        |- resources
    |- test
        |- java
        |- resources
|- pom.xml

Project Object Model

<project>
    <modelVersion>4.0.0</modelVersion>

    <groupId>cz.muni.fi.pv168</groupId>
    <artifactId>zinger</artifactId>
    <version>1.0-SNAPSHOT</version>
</project>

Maven Dependencies


POM Example

Let’s look at full pom.xml


Maven Alternatives

“I don’t like it, what are the other options?”


bg left:40% 80%

PV168

The Calculator Application


Back to the original version


Now to the reworked version


Code Smells vs. Refactoring


bg fit left:40% 80%

Refactoring: Improving the Design of Existing Code, 2nd edition

Martin Fowler, Kent Beck

Addison-Wesley Professional, 2019

https://www.amazon.com/gp/product/B07LCM8RG2


Code Smells in the original version



The Most Usefull Refactorings



What is Refactoring


What is not Refactoring


Key Requirement


Test Categories


Usability Problems in the Calculator