Skip to content

Commit e0b728c

Browse files
hbothra15iluwatar
authored andcommitted
Package patterns into executable jars setup (iluwatar#1092)
* Adding support for maven assembly plugin to generate executable jar with all dependencies in built * Merge branch 'master' into issue-989 # Conflicts: # abstract-document/pom.xml # pom.xml * Adding maven assemly plugin for projects with name A * Update in format as per checkstyle, i.e. Spcae in place of tab with size of 2
1 parent 515b7e7 commit e0b728c

File tree

13 files changed

+1083
-932
lines changed

13 files changed

+1083
-932
lines changed

abstract-document/pom.xml

+53-40
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,55 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<!--
3-
4-
The MIT License
5-
Copyright © 2014-2019 Ilkka Seppälä
6-
7-
Permission is hereby granted, free of charge, to any person obtaining a copy
8-
of this software and associated documentation files (the "Software"), to deal
9-
in the Software without restriction, including without limitation the rights
10-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11-
copies of the Software, and to permit persons to whom the Software is
12-
furnished to do so, subject to the following conditions:
13-
14-
The above copyright notice and this permission notice shall be included in
15-
all copies or substantial portions of the Software.
16-
17-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23-
THE SOFTWARE.
24-
25-
-->
26-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
27-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
28-
<modelVersion>4.0.0</modelVersion>
29-
<parent>
30-
<artifactId>java-design-patterns</artifactId>
31-
<groupId>com.iluwatar</groupId>
32-
<version>1.23.0-SNAPSHOT</version>
33-
</parent>
34-
<artifactId>abstract-document</artifactId>
35-
<dependencies>
36-
<dependency>
37-
<groupId>org.junit.jupiter</groupId>
38-
<artifactId>junit-jupiter-engine</artifactId>
39-
<scope>test</scope>
40-
</dependency>
41-
</dependencies>
2+
<!-- The MIT License Copyright © 2014-2019 Ilkka Seppälä Permission is hereby
3+
granted, free of charge, to any person obtaining a copy of this software
4+
and associated documentation files (the "Software"), to deal in the Software
5+
without restriction, including without limitation the rights to use, copy,
6+
modify, merge, publish, distribute, sublicense, and/or sell copies of the
7+
Software, and to permit persons to whom the Software is furnished to do so,
8+
subject to the following conditions: The above copyright notice and this
9+
permission notice shall be included in all copies or substantial portions
10+
of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
11+
KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
12+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
13+
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
14+
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
15+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
16+
DEALINGS IN THE SOFTWARE. -->
17+
<project xmlns="http://maven.apache.org/POM/4.0.0"
18+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
19+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
20+
<modelVersion>4.0.0</modelVersion>
21+
<parent>
22+
<artifactId>java-design-patterns</artifactId>
23+
<groupId>com.iluwatar</groupId>
24+
<version>1.23.0-SNAPSHOT</version>
25+
</parent>
26+
<artifactId>abstract-document</artifactId>
27+
<dependencies>
28+
<dependency>
29+
<groupId>org.junit.jupiter</groupId>
30+
<artifactId>junit-jupiter-engine</artifactId>
31+
<scope>test</scope>
32+
</dependency>
33+
</dependencies>
34+
<build>
35+
<plugins>
36+
<!-- Maven assembly plugin is invoked with default setting which we have
37+
in parent pom and specifying the class having main method -->
38+
<plugin>
39+
<groupId>org.apache.maven.plugins</groupId>
40+
<artifactId>maven-assembly-plugin</artifactId>
41+
<executions>
42+
<execution>
43+
<configuration>
44+
<archive>
45+
<manifest>
46+
<mainClass>com.iluwatar.abstractdocument.App</mainClass>
47+
</manifest>
48+
</archive>
49+
</configuration>
50+
</execution>
51+
</executions>
52+
</plugin>
53+
</plugins>
54+
</build>
4255
</project>

abstract-factory/pom.xml

+54-40
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,56 @@
11
<?xml version="1.0"?>
2-
<!--
3-
4-
The MIT License
5-
Copyright © 2014-2019 Ilkka Seppälä
6-
7-
Permission is hereby granted, free of charge, to any person obtaining a copy
8-
of this software and associated documentation files (the "Software"), to deal
9-
in the Software without restriction, including without limitation the rights
10-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11-
copies of the Software, and to permit persons to whom the Software is
12-
furnished to do so, subject to the following conditions:
13-
14-
The above copyright notice and this permission notice shall be included in
15-
all copies or substantial portions of the Software.
16-
17-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23-
THE SOFTWARE.
24-
25-
-->
26-
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
27-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
28-
<modelVersion>4.0.0</modelVersion>
29-
<parent>
30-
<groupId>com.iluwatar</groupId>
31-
<artifactId>java-design-patterns</artifactId>
32-
<version>1.23.0-SNAPSHOT</version>
33-
</parent>
34-
<artifactId>abstract-factory</artifactId>
35-
<dependencies>
36-
<dependency>
37-
<groupId>org.junit.jupiter</groupId>
38-
<artifactId>junit-jupiter-engine</artifactId>
39-
<scope>test</scope>
40-
</dependency>
41-
</dependencies>
2+
<!-- The MIT License Copyright © 2014-2019 Ilkka Seppälä Permission is hereby
3+
granted, free of charge, to any person obtaining a copy of this software
4+
and associated documentation files (the "Software"), to deal in the Software
5+
without restriction, including without limitation the rights to use, copy,
6+
modify, merge, publish, distribute, sublicense, and/or sell copies of the
7+
Software, and to permit persons to whom the Software is furnished to do so,
8+
subject to the following conditions: The above copyright notice and this
9+
permission notice shall be included in all copies or substantial portions
10+
of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
11+
KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
12+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
13+
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
14+
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
15+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
16+
DEALINGS IN THE SOFTWARE. -->
17+
<project
18+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
19+
xmlns="http://maven.apache.org/POM/4.0.0"
20+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
21+
<modelVersion>4.0.0</modelVersion>
22+
<parent>
23+
<groupId>com.iluwatar</groupId>
24+
<artifactId>java-design-patterns</artifactId>
25+
<version>1.23.0-SNAPSHOT</version>
26+
</parent>
27+
<artifactId>abstract-factory</artifactId>
28+
<dependencies>
29+
<dependency>
30+
<groupId>org.junit.jupiter</groupId>
31+
<artifactId>junit-jupiter-engine</artifactId>
32+
<scope>test</scope>
33+
</dependency>
34+
</dependencies>
35+
<build>
36+
<plugins>
37+
<!-- Maven assembly plugin is invoked with default setting which we have
38+
in parent pom and specifying the class having main method -->
39+
<plugin>
40+
<groupId>org.apache.maven.plugins</groupId>
41+
<artifactId>maven-assembly-plugin</artifactId>
42+
<executions>
43+
<execution>
44+
<configuration>
45+
<archive>
46+
<manifest>
47+
<mainClass>com.iluwatar.abstractfactory.App</mainClass>
48+
</manifest>
49+
</archive>
50+
</configuration>
51+
</execution>
52+
</executions>
53+
</plugin>
54+
</plugins>
55+
</build>
4256
</project>

acyclic-visitor/pom.xml

+43-31
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,29 @@
1-
<!--
2-
3-
The MIT License
4-
Copyright © 2014-2019 Ilkka Seppälä
5-
6-
Permission is hereby granted, free of charge, to any person obtaining a copy
7-
of this software and associated documentation files (the "Software"), to deal
8-
in the Software without restriction, including without limitation the rights
9-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10-
copies of the Software, and to permit persons to whom the Software is
11-
furnished to do so, subject to the following conditions:
12-
13-
The above copyright notice and this permission notice shall be included in
14-
all copies or substantial portions of the Software.
15-
16-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22-
THE SOFTWARE.
23-
24-
-->
1+
<!-- The MIT License Copyright © 2014-2019 Ilkka Seppälä Permission is hereby
2+
granted, free of charge, to any person obtaining a copy of this software
3+
and associated documentation files (the "Software"), to deal in the Software
4+
without restriction, including without limitation the rights to use, copy,
5+
modify, merge, publish, distribute, sublicense, and/or sell copies of the
6+
Software, and to permit persons to whom the Software is furnished to do so,
7+
subject to the following conditions: The above copyright notice and this
8+
permission notice shall be included in all copies or substantial portions
9+
of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
10+
KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
11+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
12+
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
13+
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
14+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
15+
DEALINGS IN THE SOFTWARE. -->
2516
<project xmlns="http://maven.apache.org/POM/4.0.0"
2617
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2718
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2819
<modelVersion>4.0.0</modelVersion>
29-
20+
3021
<parent>
3122
<groupId>com.iluwatar</groupId>
3223
<artifactId>java-design-patterns</artifactId>
3324
<version>1.23.0-SNAPSHOT</version>
3425
</parent>
35-
26+
3627
<artifactId>acyclic-visitor</artifactId>
3728

3829
<properties>
@@ -56,16 +47,37 @@
5647
<version>1.0.0</version>
5748
<scope>test</scope>
5849
</dependency>
59-
<dependency>
60-
<groupId>org.junit.jupiter</groupId>
61-
<artifactId>junit-jupiter-engine</artifactId>
62-
<scope>test</scope>
63-
</dependency>
50+
<dependency>
51+
<groupId>org.junit.jupiter</groupId>
52+
<artifactId>junit-jupiter-engine</artifactId>
53+
<scope>test</scope>
54+
</dependency>
6455
<dependency>
6556
<groupId>org.mockito</groupId>
6657
<artifactId>mockito-all</artifactId>
6758
<version>1.9.5</version>
6859
<scope>test</scope>
6960
</dependency>
7061
</dependencies>
62+
<build>
63+
<plugins>
64+
<!-- Maven assembly plugin is invoked with default setting which we have
65+
in parent pom and specifying the class having main method -->
66+
<plugin>
67+
<groupId>org.apache.maven.plugins</groupId>
68+
<artifactId>maven-assembly-plugin</artifactId>
69+
<executions>
70+
<execution>
71+
<configuration>
72+
<archive>
73+
<manifest>
74+
<mainClass>com.iluwatar.acyclicvisitor.App</mainClass>
75+
</manifest>
76+
</archive>
77+
</configuration>
78+
</execution>
79+
</executions>
80+
</plugin>
81+
</plugins>
82+
</build>
7183
</project>

adapter/pom.xml

+59-45
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,61 @@
11
<?xml version="1.0"?>
2-
<!--
3-
4-
The MIT License
5-
Copyright © 2014-2019 Ilkka Seppälä
6-
7-
Permission is hereby granted, free of charge, to any person obtaining a copy
8-
of this software and associated documentation files (the "Software"), to deal
9-
in the Software without restriction, including without limitation the rights
10-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11-
copies of the Software, and to permit persons to whom the Software is
12-
furnished to do so, subject to the following conditions:
13-
14-
The above copyright notice and this permission notice shall be included in
15-
all copies or substantial portions of the Software.
16-
17-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23-
THE SOFTWARE.
24-
25-
-->
26-
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
27-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
28-
<modelVersion>4.0.0</modelVersion>
29-
<parent>
30-
<groupId>com.iluwatar</groupId>
31-
<artifactId>java-design-patterns</artifactId>
32-
<version>1.23.0-SNAPSHOT</version>
33-
</parent>
34-
<artifactId>adapter</artifactId>
35-
<dependencies>
36-
<dependency>
37-
<groupId>org.junit.jupiter</groupId>
38-
<artifactId>junit-jupiter-engine</artifactId>
39-
<scope>test</scope>
40-
</dependency>
41-
<dependency>
42-
<groupId>org.mockito</groupId>
43-
<artifactId>mockito-core</artifactId>
44-
<scope>test</scope>
45-
</dependency>
46-
</dependencies>
2+
<!-- The MIT License Copyright © 2014-2019 Ilkka Seppälä Permission is hereby
3+
granted, free of charge, to any person obtaining a copy of this software
4+
and associated documentation files (the "Software"), to deal in the Software
5+
without restriction, including without limitation the rights to use, copy,
6+
modify, merge, publish, distribute, sublicense, and/or sell copies of the
7+
Software, and to permit persons to whom the Software is furnished to do so,
8+
subject to the following conditions: The above copyright notice and this
9+
permission notice shall be included in all copies or substantial portions
10+
of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
11+
KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
12+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
13+
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
14+
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
15+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
16+
DEALINGS IN THE SOFTWARE. -->
17+
<project
18+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
19+
xmlns="http://maven.apache.org/POM/4.0.0"
20+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
21+
<modelVersion>4.0.0</modelVersion>
22+
<parent>
23+
<groupId>com.iluwatar</groupId>
24+
<artifactId>java-design-patterns</artifactId>
25+
<version>1.23.0-SNAPSHOT</version>
26+
</parent>
27+
<artifactId>adapter</artifactId>
28+
<dependencies>
29+
<dependency>
30+
<groupId>org.junit.jupiter</groupId>
31+
<artifactId>junit-jupiter-engine</artifactId>
32+
<scope>test</scope>
33+
</dependency>
34+
<dependency>
35+
<groupId>org.mockito</groupId>
36+
<artifactId>mockito-core</artifactId>
37+
<scope>test</scope>
38+
</dependency>
39+
</dependencies>
40+
<build>
41+
<plugins>
42+
<!-- Maven assembly plugin is invoked with default setting which we have
43+
in parent pom and specifying the class having main method -->
44+
<plugin>
45+
<groupId>org.apache.maven.plugins</groupId>
46+
<artifactId>maven-assembly-plugin</artifactId>
47+
<executions>
48+
<execution>
49+
<configuration>
50+
<archive>
51+
<manifest>
52+
<mainClass>com.iluwatar.adapter.App</mainClass>
53+
</manifest>
54+
</archive>
55+
</configuration>
56+
</execution>
57+
</executions>
58+
</plugin>
59+
</plugins>
60+
</build>
4761
</project>

0 commit comments

Comments
 (0)