From 4af43a4bd1fe40b7cebdb8dcd30c73a0b17bbf08 Mon Sep 17 00:00:00 2001 From: Nguyen Nam Thai Date: Mon, 26 Mar 2018 10:40:54 +0700 Subject: [PATCH] Core Maven Plugins --- maven/.gitignore | 1 + maven/input-resources/baeldung.png | Bin 0 -> 4318 bytes maven/input-resources/baeldung.txt | 1 + maven/input-resources/verifications.xml | 9 ++ maven/pom.xml | 116 ++++++++++++++++++ .../java/com/baeldung/maven/plugins/Data.java | 16 +++ .../com/baeldung/maven/plugins/DataCheck.java | 15 +++ .../com/baeldung/maven/plugins/DataTest.java | 15 +++ pom.xml | 1 + 9 files changed, 174 insertions(+) create mode 100644 maven/.gitignore create mode 100644 maven/input-resources/baeldung.png create mode 100644 maven/input-resources/baeldung.txt create mode 100644 maven/input-resources/verifications.xml create mode 100644 maven/pom.xml create mode 100644 maven/src/main/java/com/baeldung/maven/plugins/Data.java create mode 100644 maven/src/test/java/com/baeldung/maven/plugins/DataCheck.java create mode 100644 maven/src/test/java/com/baeldung/maven/plugins/DataTest.java diff --git a/maven/.gitignore b/maven/.gitignore new file mode 100644 index 0000000000..f843ae9109 --- /dev/null +++ b/maven/.gitignore @@ -0,0 +1 @@ +/output-resources \ No newline at end of file diff --git a/maven/input-resources/baeldung.png b/maven/input-resources/baeldung.png new file mode 100644 index 0000000000000000000000000000000000000000..488f52e56e45d7b2b64cd688138f85f6a7dcc0e1 GIT binary patch literal 4318 zcmV<45Fzi0P)foQgqP5Mp zsKlyDj8On=0L9qHn!cV^kz9?3s|u#h=NMJwO{A`pKiG2N>HFWwwO4vS=G-;(rt8X6iJ z8XEtXI6k`re+$#yvwQHD5F69cv-|Le@P@4D*?ss!*Z>3R>3%Q7u3-Sze|9(i3f7ik z7e=2Mqj>-f8G&}(J7KxTR)x%TZ4aN_v0n&(_xY|OQ!CGw@Z-T?`)XjQB-1eL%d>m< zJK&7s@H~%_sp(-*)tLm^F}evS-kmQC!$qbIuP|A_)O22fANJ=cNQu13V~If1S%+{B z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_<#r;!#hM!KEIn!1#xc(4?C7u% z^0p@j4Nll4#2<`Ld$E@O^j1D!VlTYrO zNtl0$2Bd;0~6cM;Wn}ZY@9wXpV3%go|P?}IqJR5ENwbVAfbh-Xqirj%Z%4Z zDCu;#R5l*Z(stb8%igXPo&0?b5RIc$Y9im?eK$Hy7WAKRRUk$Yd6TOp2%Y}P5}Mk4 zQ<_<;RDld633f#SsqdT%&llPO&}&EMh`(GZms+XDxfh)lAIv?vwav=^(i$bF{%9b3 zLDu$ajnYjCgwFaqD*(xUV0l}HHr%gwo z<}yua&{gI|$SLL+s`oQe3AC7dTSGiRB+*9cl&V0<+QV7dF;aefbc~38YQbi2sodh4 z9ld>)4C=M&96xA=e$hof^c${pqP)_SJsb0i>598()`7e zolIg1yjwYWRZLJkrzw?IbgGV-0ssNUX8e6+&;j%>ZC2F&2q6h)s5p@lC;YT2RxE&d zYyShtBL$$-i$cOyakMQSb6q~>BOL_tL_HTXK=}P=E|(tzG^8tD%YDkrsT4m;SGLzL z<&L6wfrL79WaLB3k357tDX~5nW08Dpu7%<5oYKESP;^I934)=9Kq29uEFn%zVFCbb zu6Q-+M=myzS-D!ypCM!-S8~0+EMZ=t>y%FGCs%5%ve)$D)M;?2Njlb)!=h1B4-#6IM^s-v7XHm57A6u-BnS@LBNBdj* zsz%3t`uMaj$2*+OmOd<%I_$5Cu7)%T|M+v?{1%%v{Wgu;OX&1;4)KKh((GY08m&&k zYbY_Ar+Q+pm^w71qHnBf4kyXh8_TPNJE@TklLk6XqX1Em*b;)>qZ12A>MNF-gVj7^ zcs!JA&fv_9H6f_3aRb~Hi`n+qQxrv~#N?bL_cxq`^ + + + input-resources/baeldung.txt + Welcome + + + \ No newline at end of file diff --git a/maven/pom.xml b/maven/pom.xml new file mode 100644 index 0000000000..d21b138762 --- /dev/null +++ b/maven/pom.xml @@ -0,0 +1,116 @@ + + 4.0.0 + com.baeldung + maven + 0.0.1-SNAPSHOT + + + parent-modules + com.baeldung + 1.0.0-SNAPSHOT + + + + 3.0.2 + 3.7.0 + 2.21.0 + 2.21.0 + 1.1 + 3.0.0 + Baeldung + + + + + junit + junit + 4.12 + test + + + + + + + maven-resources-plugin + ${maven.resources.version} + + output-resources + + + input-resources + + *.png + + true + + + + + + maven-compiler-plugin + ${maven.compiler.version} + + 1.8 + 1.8 + + -Xlint:unchecked + + + + + maven-surefire-plugin + ${maven.surefire.version} + + + DataTest.java + + + DataCheck.java + + + + + maven-failsafe-plugin + ${maven.failsafe.version} + + + + integration-test + verify + + + + + + + + + maven-verifier-plugin + ${maven.verifier.version} + + input-resources/verifications.xml + + + + + verify + + + + + + maven-clean-plugin + ${maven.clean.version} + + + + output-resources + + + + + + + \ No newline at end of file diff --git a/maven/src/main/java/com/baeldung/maven/plugins/Data.java b/maven/src/main/java/com/baeldung/maven/plugins/Data.java new file mode 100644 index 0000000000..6ac6f9ab46 --- /dev/null +++ b/maven/src/main/java/com/baeldung/maven/plugins/Data.java @@ -0,0 +1,16 @@ +package com.baeldung.maven.plugins; + +import java.util.ArrayList; +import java.util.List; + +public class Data { + List textList = new ArrayList(); + + public void addText(String text) { + textList.add(text); + } + + public List getTextList() { + return this.textList; + } +} diff --git a/maven/src/test/java/com/baeldung/maven/plugins/DataCheck.java b/maven/src/test/java/com/baeldung/maven/plugins/DataCheck.java new file mode 100644 index 0000000000..9aaf0fb071 --- /dev/null +++ b/maven/src/test/java/com/baeldung/maven/plugins/DataCheck.java @@ -0,0 +1,15 @@ +package com.baeldung.maven.plugins; + +import static org.junit.Assert.assertNotNull; + +import org.junit.Test; + +import com.baeldung.maven.plugins.Data; + +public class DataCheck { + @Test + public void whenDataObjectIsCreated_thenItIsNotNull() { + Data data = new Data(); + assertNotNull(data); + } +} diff --git a/maven/src/test/java/com/baeldung/maven/plugins/DataTest.java b/maven/src/test/java/com/baeldung/maven/plugins/DataTest.java new file mode 100644 index 0000000000..3f03b6f5d6 --- /dev/null +++ b/maven/src/test/java/com/baeldung/maven/plugins/DataTest.java @@ -0,0 +1,15 @@ +package com.baeldung.maven.plugins; + +import static org.junit.Assert.assertNull; + +import org.junit.Test; + +import com.baeldung.maven.plugins.Data; + +public class DataTest { + @Test + public void whenDataObjectIsNotCreated_thenItIsNull() { + Data data = null; + assertNull(data); + } +} diff --git a/pom.xml b/pom.xml index f8e1910b9b..e5679eb29c 100644 --- a/pom.xml +++ b/pom.xml @@ -122,6 +122,7 @@ mapstruct + maven mesos-marathon testing-modules/mockito testing-modules/mockito-2