Use maven in_right_way
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Use maven in_right_way

on

  • 700 views

Use Maven in Right Way, JEEconf 05/19/2012

Use Maven in Right Way, JEEconf 05/19/2012

Statistics

Views

Total Views
700
Views on SlideShare
412
Embed Views
288

Actions

Likes
0
Downloads
4
Comments
0

2 Embeds 288

http://jeeconf.com 285
https://twitter.com 3

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Use maven in_right_way Presentation Transcript

  • 1. Use Maven in Right Way Make build configurations effective with dependencyManagement, pluginManagement and profilesMonday, May 21, 12
  • 2. Typical Dependency <dependency> <groupId>my-group1</groupId> <artifactId>artifact</artifactId> <version>1.0</version> </dependency>Monday, May 21, 12
  • 3. Typical Dependency <dependency> <groupId>my-group1</groupId> <artifactId>artifact</artifactId> <version>1.0</version> </dependency>Monday, May 21, 12
  • 4. Problem Set 20 dependencies chaotically distributed per 5 modules Review all modules to make change in dependency The worst case it takes 6 reviews The worst case it takes 120 changesMonday, May 21, 12
  • 5. Version in property <artifact.version>1.0</artifact.version> <dependency> <groupId>my-group1</groupId> <artifactId>artifact</artifactId> <version>${artifact.version}</version> </dependency>Monday, May 21, 12
  • 6. Extended Dependency <dependency> <groupId>my-group1</groupId> <artifactId>artifact</artifactId> <version>${artifact.version}</version> <scope>provided</scope> <classifier>jdk15</classifier> <optional>true</optional> <packaging>zip</packaging> </dependency>Monday, May 21, 12
  • 7. Exclusions <dependency> <groupId>my-group1</groupId> <artifactId>artifact</artifactId> ... <exclusions> <exclusion> <groupId>exclude-group</groupId> <groupId>exclude</groupId> </exclusion> </exclusions> </dependency>Monday, May 21, 12
  • 8. Inject ManagementMonday, May 21, 12
  • 9. Solution 1 All dependency configuration in one place The worst case it takes 1 review to change ANY property of ANY dependency The worst case it takes 20 changesMonday, May 21, 12
  • 10. Typical Plugin <build> <plugins> <plugin> <groupId>plugin-group</groupId> <artifactId>plugin</artifactId> <version>1.0</version> <configuration>...</configuration> <executions>...</executions> </plugin> </plugins> </build>Monday, May 21, 12
  • 11. Problem Set 2 10 plugins chaotically distributed per 5 modules Duplicates The worst case it takes 6 reviews to update plugins The worst case it takes 240 changesMonday, May 21, 12
  • 12. Inject ManagementMonday, May 21, 12
  • 13. Solution 2 All plugins defines in one place NO DUPLICATES In the worst case it takes 1 review to update plugins In the worst case it takes 40 changesMonday, May 21, 12
  • 14. Monday, May 21, 12
  • 15. One more thing...Monday, May 21, 12
  • 16. Problem Set 3 Separate unit tests and integration tests Integration environment to run integration tests ONLYMonday, May 21, 12
  • 17. Solution 3 Integration profile Common configuration in default pluginManagement Executions & configuration customization in profileMonday, May 21, 12
  • 18. Thank you! Anton Naumov email: anton.naumow@gmail.com twitter: antonnaumov blog: http://antonnaumov.posterous.comMonday, May 21, 12