Skip to content

Commit 4fb7e40

Browse files
authored
Merge pull request eugenp#10767 from MicuEmerson/master
BAEL-4800: example of different POM types in Maven
2 parents 5651644 + 3739d67 commit 4fb7e40

3 files changed

Lines changed: 395 additions & 0 deletions

File tree

Lines changed: 238 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,238 @@
1+
<?xml version="1.0" encoding="Cp1252"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
<groupId>com.baeldung</groupId>
7+
<artifactId>maven-pom-types</artifactId>
8+
<version>1.0-SNAPSHOT</version>
9+
<repositories>
10+
<repository>
11+
<snapshots>
12+
<enabled>false</enabled>
13+
</snapshots>
14+
<id>central</id>
15+
<name>Central Repository</name>
16+
<url>https://repo.maven.apache.org/maven2</url>
17+
</repository>
18+
</repositories>
19+
<pluginRepositories>
20+
<pluginRepository>
21+
<releases>
22+
<updatePolicy>never</updatePolicy>
23+
</releases>
24+
<snapshots>
25+
<enabled>false</enabled>
26+
</snapshots>
27+
<id>central</id>
28+
<name>Central Repository</name>
29+
<url>https://repo.maven.apache.org/maven2</url>
30+
</pluginRepository>
31+
</pluginRepositories>
32+
<build>
33+
<sourceDirectory>C:\Users\emicu\Desktop\tutorials\maven-modules\maven-pom-types\src\main\java</sourceDirectory>
34+
<scriptSourceDirectory>C:\Users\emicu\Desktop\tutorials\maven-modules\maven-pom-types\src\main\scripts
35+
</scriptSourceDirectory>
36+
<testSourceDirectory>C:\Users\emicu\Desktop\tutorials\maven-modules\maven-pom-types\src\test\java
37+
</testSourceDirectory>
38+
<outputDirectory>C:\Users\emicu\Desktop\tutorials\maven-modules\maven-pom-types\customTarget\classes
39+
</outputDirectory>
40+
<testOutputDirectory>C:\Users\emicu\Desktop\tutorials\maven-modules\maven-pom-types\customTarget\test-classes
41+
</testOutputDirectory>
42+
<resources>
43+
<resource>
44+
<directory>C:\Users\emicu\Desktop\tutorials\maven-modules\maven-pom-types\src\main\resources</directory>
45+
</resource>
46+
</resources>
47+
<testResources>
48+
<testResource>
49+
<directory>C:\Users\emicu\Desktop\tutorials\maven-modules\maven-pom-types\src\test\resources</directory>
50+
</testResource>
51+
</testResources>
52+
<directory>C:\Users\emicu\Desktop\tutorials\maven-modules\maven-pom-types\customTarget</directory>
53+
<finalName>simplestPOM-1.0-SNAPSHOT</finalName>
54+
<pluginManagement>
55+
<plugins>
56+
<plugin>
57+
<artifactId>maven-antrun-plugin</artifactId>
58+
<version>1.3</version>
59+
</plugin>
60+
<plugin>
61+
<artifactId>maven-assembly-plugin</artifactId>
62+
<version>2.2-beta-5</version>
63+
</plugin>
64+
<plugin>
65+
<artifactId>maven-dependency-plugin</artifactId>
66+
<version>2.8</version>
67+
</plugin>
68+
<plugin>
69+
<artifactId>maven-release-plugin</artifactId>
70+
<version>2.5.3</version>
71+
</plugin>
72+
</plugins>
73+
</pluginManagement>
74+
<plugins>
75+
<plugin>
76+
<artifactId>maven-clean-plugin</artifactId>
77+
<version>2.5</version>
78+
<executions>
79+
<execution>
80+
<id>default-clean</id>
81+
<phase>clean</phase>
82+
<goals>
83+
<goal>clean</goal>
84+
</goals>
85+
</execution>
86+
</executions>
87+
</plugin>
88+
<plugin>
89+
<artifactId>maven-resources-plugin</artifactId>
90+
<version>2.6</version>
91+
<executions>
92+
<execution>
93+
<id>default-testResources</id>
94+
<phase>process-test-resources</phase>
95+
<goals>
96+
<goal>testResources</goal>
97+
</goals>
98+
</execution>
99+
<execution>
100+
<id>default-resources</id>
101+
<phase>process-resources</phase>
102+
<goals>
103+
<goal>resources</goal>
104+
</goals>
105+
</execution>
106+
</executions>
107+
</plugin>
108+
<plugin>
109+
<artifactId>maven-jar-plugin</artifactId>
110+
<version>2.4</version>
111+
<executions>
112+
<execution>
113+
<id>default-jar</id>
114+
<phase>package</phase>
115+
<goals>
116+
<goal>jar</goal>
117+
</goals>
118+
</execution>
119+
</executions>
120+
</plugin>
121+
<plugin>
122+
<artifactId>maven-compiler-plugin</artifactId>
123+
<version>3.1</version>
124+
<executions>
125+
<execution>
126+
<id>default-compile</id>
127+
<phase>compile</phase>
128+
<goals>
129+
<goal>compile</goal>
130+
</goals>
131+
</execution>
132+
<execution>
133+
<id>default-testCompile</id>
134+
<phase>test-compile</phase>
135+
<goals>
136+
<goal>testCompile</goal>
137+
</goals>
138+
</execution>
139+
</executions>
140+
</plugin>
141+
<plugin>
142+
<artifactId>maven-surefire-plugin</artifactId>
143+
<version>2.12.4</version>
144+
<executions>
145+
<execution>
146+
<id>default-test</id>
147+
<phase>test</phase>
148+
<goals>
149+
<goal>test</goal>
150+
</goals>
151+
</execution>
152+
</executions>
153+
</plugin>
154+
<plugin>
155+
<artifactId>maven-install-plugin</artifactId>
156+
<version>2.4</version>
157+
<executions>
158+
<execution>
159+
<id>default-install</id>
160+
<phase>install</phase>
161+
<goals>
162+
<goal>install</goal>
163+
</goals>
164+
</execution>
165+
</executions>
166+
</plugin>
167+
<plugin>
168+
<artifactId>maven-deploy-plugin</artifactId>
169+
<version>2.7</version>
170+
<executions>
171+
<execution>
172+
<id>default-deploy</id>
173+
<phase>deploy</phase>
174+
<goals>
175+
<goal>deploy</goal>
176+
</goals>
177+
</execution>
178+
</executions>
179+
</plugin>
180+
<plugin>
181+
<artifactId>maven-site-plugin</artifactId>
182+
<version>3.3</version>
183+
<executions>
184+
<execution>
185+
<id>default-site</id>
186+
<phase>site</phase>
187+
<goals>
188+
<goal>site</goal>
189+
</goals>
190+
<configuration>
191+
<outputDirectory>
192+
C:\Users\emicu\Desktop\tutorials\maven-modules\maven-pom-types\customTarget\site
193+
</outputDirectory>
194+
<reportPlugins>
195+
<reportPlugin>
196+
<groupId>org.apache.maven.plugins</groupId>
197+
<artifactId>maven-project-info-reports-plugin</artifactId>
198+
</reportPlugin>
199+
</reportPlugins>
200+
</configuration>
201+
</execution>
202+
<execution>
203+
<id>default-deploy</id>
204+
<phase>site-deploy</phase>
205+
<goals>
206+
<goal>deploy</goal>
207+
</goals>
208+
<configuration>
209+
<outputDirectory>
210+
C:\Users\emicu\Desktop\tutorials\maven-modules\maven-pom-types\customTarget\site
211+
</outputDirectory>
212+
<reportPlugins>
213+
<reportPlugin>
214+
<groupId>org.apache.maven.plugins</groupId>
215+
<artifactId>maven-project-info-reports-plugin</artifactId>
216+
</reportPlugin>
217+
</reportPlugins>
218+
</configuration>
219+
</execution>
220+
</executions>
221+
<configuration>
222+
<outputDirectory>C:\Users\emicu\Desktop\tutorials\maven-modules\maven-pom-types\customTarget\site
223+
</outputDirectory>
224+
<reportPlugins>
225+
<reportPlugin>
226+
<groupId>org.apache.maven.plugins</groupId>
227+
<artifactId>maven-project-info-reports-plugin</artifactId>
228+
</reportPlugin>
229+
</reportPlugins>
230+
</configuration>
231+
</plugin>
232+
</plugins>
233+
</build>
234+
<reporting>
235+
<outputDirectory>C:\Users\emicu\Desktop\tutorials\maven-modules\maven-pom-types\customTarget\site
236+
</outputDirectory>
237+
</reporting>
238+
</project>
Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
4+
license agreements. See the NOTICE file distributed with this work for additional
5+
information regarding copyright ownership. The ASF licenses this file to
6+
you under the Apache License, Version 2.0 (the "License"); you may not use
7+
this file except in compliance with the License. You may obtain a copy of
8+
the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
9+
by applicable law or agreed to in writing, software distributed under the
10+
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
11+
OF ANY KIND, either express or implied. See the License for the specific
12+
language governing permissions and limitations under the License. -->
13+
14+
<!-- START SNIPPET: superpom -->
15+
<project>
16+
<modelVersion>4.0.0</modelVersion>
17+
18+
<repositories>
19+
<repository>
20+
<id>central</id>
21+
<name>Central Repository</name>
22+
<url>https://repo.maven.apache.org/maven2</url>
23+
<layout>default</layout>
24+
<snapshots>
25+
<enabled>false</enabled>
26+
</snapshots>
27+
</repository>
28+
</repositories>
29+
30+
<pluginRepositories>
31+
<pluginRepository>
32+
<id>central</id>
33+
<name>Central Repository</name>
34+
<url>https://repo.maven.apache.org/maven2</url>
35+
<layout>default</layout>
36+
<snapshots>
37+
<enabled>false</enabled>
38+
</snapshots>
39+
<releases>
40+
<updatePolicy>never</updatePolicy>
41+
</releases>
42+
</pluginRepository>
43+
</pluginRepositories>
44+
45+
<build>
46+
<directory>${project.basedir}/target</directory>
47+
<outputDirectory>${project.build.directory}/classes</outputDirectory>
48+
<finalName>${project.artifactId}-${project.version}</finalName>
49+
<testOutputDirectory>${project.build.directory}/test-classes
50+
</testOutputDirectory>
51+
<sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
52+
<scriptSourceDirectory>${project.basedir}/src/main/scripts
53+
</scriptSourceDirectory>
54+
<testSourceDirectory>${project.basedir}/src/test/java
55+
</testSourceDirectory>
56+
<resources>
57+
<resource>
58+
<directory>${project.basedir}/src/main/resources</directory>
59+
</resource>
60+
</resources>
61+
<testResources>
62+
<testResource>
63+
<directory>${project.basedir}/src/test/resources</directory>
64+
</testResource>
65+
</testResources>
66+
<pluginManagement>
67+
<!-- NOTE: These plugins will be removed from future versions of the super
68+
POM -->
69+
<!-- They are kept for the moment as they are very unlikely to conflict
70+
with lifecycle mappings (MNG-4453) -->
71+
<plugins>
72+
<plugin>
73+
<artifactId>maven-antrun-plugin</artifactId>
74+
<version>1.3</version>
75+
</plugin>
76+
<plugin>
77+
<artifactId>maven-assembly-plugin</artifactId>
78+
<version>2.2-beta-5</version>
79+
</plugin>
80+
<plugin>
81+
<artifactId>maven-dependency-plugin</artifactId>
82+
<version>2.8</version>
83+
</plugin>
84+
<plugin>
85+
<artifactId>maven-release-plugin</artifactId>
86+
<version>2.5.3</version>
87+
</plugin>
88+
</plugins>
89+
</pluginManagement>
90+
</build>
91+
92+
<reporting>
93+
<outputDirectory>${project.build.directory}/site</outputDirectory>
94+
</reporting>
95+
96+
<profiles>
97+
<!-- NOTE: The release profile will be removed from future versions of
98+
the super POM -->
99+
<profile>
100+
<id>release-profile</id>
101+
102+
<activation>
103+
<property>
104+
<name>performRelease</name>
105+
<value>true</value>
106+
</property>
107+
</activation>
108+
109+
<build>
110+
<plugins>
111+
<plugin>
112+
<inherited>true</inherited>
113+
<artifactId>maven-source-plugin</artifactId>
114+
<executions>
115+
<execution>
116+
<id>attach-sources</id>
117+
<goals>
118+
<goal>jar-no-fork</goal>
119+
</goals>
120+
</execution>
121+
</executions>
122+
</plugin>
123+
<plugin>
124+
<inherited>true</inherited>
125+
<artifactId>maven-javadoc-plugin</artifactId>
126+
<executions>
127+
<execution>
128+
<id>attach-javadocs</id>
129+
<goals>
130+
<goal>jar</goal>
131+
</goals>
132+
</execution>
133+
</executions>
134+
</plugin>
135+
<plugin>
136+
<inherited>true</inherited>
137+
<artifactId>maven-deploy-plugin</artifactId>
138+
<configuration>
139+
<updateReleaseInfo>true</updateReleaseInfo>
140+
</configuration>
141+
</plugin>
142+
</plugins>
143+
</build>
144+
</profile>
145+
</profiles>
146+
147+
</project>
148+
<!-- END SNIPPET: superpom -->
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
<groupId>com.baeldung</groupId>
7+
<artifactId>maven-pom-types</artifactId>
8+
<version>1.0-SNAPSHOT</version>
9+
</project>

0 commit comments

Comments
 (0)