Last active
January 20, 2020 18:18
-
-
Save aalmiray/f5ee3eb0d6e255e81aa7ce5e58b87dd9 to your computer and use it in GitHub Desktop.
MasteringMaven-03
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.acme</groupId> | |
<artifactId>sample03</artifactId> | |
<version>0.0.0-SNAPSHOT</version> | |
<dependencies> | |
<dependency> | |
<groupId>org.apache.commons</groupId> | |
<artifactId>commons-lang3</artifactId> | |
<version>3.9</version> | |
</dependency> | |
</dependencies> | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.codehaus.mojo</groupId> | |
<artifactId>exec-maven-plugin</artifactId> | |
<version>1.6.0</version> | |
<inherited>true</inherited> | |
<configuration> | |
<mainClass>com.acme.Sample</mainClass> | |
</configuration> | |
</plugin> | |
</plugins> | |
</build> | |
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.acme</groupId> | |
<artifactId>sample03</artifactId> | |
<version>0.0.0-SNAPSHOT</version> | |
<dependencies> | |
<dependency> | |
<groupId>org.apache.commons</groupId> | |
<artifactId>commons-lang3</artifactId> | |
<version>3.9</version> | |
</dependency> | |
</dependencies> | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.codehaus.mojo</groupId> | |
<artifactId>exec-maven-plugin</artifactId> | |
<version>1.6.0</version> | |
<inherited>true</inherited> | |
<configuration> | |
<mainClass>com.acme.Sample</mainClass> | |
</configuration> | |
</plugin> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-jar-plugin</artifactId> | |
<version>3.2.0</version> | |
<configuration> | |
<archive> | |
<manifestEntries> | |
<X-Foo>bar</X-Foo> | |
</manifestEntries> | |
</archive> | |
</configuration> | |
</plugin> | |
</plugins> | |
</build> | |
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.acme; | |
import static org.apache.commons.lang3.StringUtils.capitalize; | |
public class Sample { | |
public String greeting() { | |
return capitalize("hello world"); | |
} | |
public static void main(String[] args) { | |
Sample s = new Sample(); | |
System.out.println(s.greeting()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment