Avatar Maven

15
by James Lorenzen 1

description

See how Maven and the Last Airbender are similar. Quick presentation on helpful maven tips, maven 3, and mvnsh.

Transcript of Avatar Maven

Page 1: Avatar Maven

1

byJames Lorenzen

Page 2: Avatar Maven

2-13

Which Resembles Maven?

Page 3: Avatar Maven

3-13

Builds

Reporting

Dependencies

Convention

Page 4: Avatar Maven

4-13

Frustrated?

Page 5: Avatar Maven

5-13

Tips

Anti-Profile

s

Create SNAPSHOT

Depend Releases

gmaven plugin

archetype

dependency:tree !maven

POM is code

Maven properties

Page 6: Avatar Maven

6-13

gmaven<configuration> <source> def file = "$pom.basedir/target/${project.artifactId}-${project.version}.${project.packaging}" def ear = new File(file) log.info("${ear?.length()}"); def maxsize = project.properties['ear.maxsize']; if (ear?.length() > maxsize?.toInteger()) { fail("EAR Exceeds maximum size allowed."); } </source></configuration>

Ron Alleva gmaven Example

Page 7: Avatar Maven

Useful mvn cmds

• mvn –pl core,netcds-ws install• mvn –pl netcds-ws –am install• mvn –pl core –amd install

7-13

Page 8: Avatar Maven

8-13

Maven 3

Been out for 16

months

Backwards Compatible

Polyglot

mvnsh

Page 9: Avatar Maven

9-13

Backwards Compatible

maven 3maven 2

Compatibility Matrix

Page 10: Avatar Maven

10-13Polyglot Maven

Polyglot

Groovy Ruby

Scala YAML

Page 11: Avatar Maven

11-13

project { groupId 'foo' artifactId 'bar' version '1.0'}dependency('foo:bar:1.0')goals('compile', 'execute')

Groovy POM

Page 12: Avatar Maven

12-13

mvnsh

• Pre-loaded shell environment• Speeds up build times• Based on Maven 3• Therefore can work with Maven 2 projects• History• Color Coded• Alias• Tab completion• Growl support

mvnsh

Page 13: Avatar Maven

Jason van Zyl

“If you use mvnsh and find problems the turn around time for fixes is usually a day or two. Maven 3.x is better then any version of Maven 2.x and the ITs we have for Maven are in an independent project. That's mean we run the same body of tests across multiple versions of Maven and Maven 3.x passes far more then Maven 2.x. Maven 3.x just gets fixed faster. You would honestly be better off using the Maven Shell.”

13-13How to Speed up Maven

Page 15: Avatar Maven

15-13

Maven’s not perfect, but not many projects are. Pulling wisdom from multiple places can

only improve the end solution.