Merge pull request #9598 from sampada07/JAVA-49
JAVA-49: Split or move maven module
This commit is contained in:
commit
bb23d56558
|
@ -1,3 +0,0 @@
|
|||
### Relevant Articles:
|
||||
|
||||
- [How to Create a Maven Plugin](https://www.baeldung.com/maven-plugin)
|
|
@ -1,18 +0,0 @@
|
|||
## Apache Maven
|
||||
|
||||
This module contains articles about core Apache Maven. Articles about other Maven plugins (such as the Maven WAR Plugin)
|
||||
have their own dedicated modules.
|
||||
|
||||
### Relevant Articles
|
||||
|
||||
- [Guide to the Core Maven Plugins](https://www.baeldung.com/core-maven-plugins)
|
||||
- [Maven Resources Plugin](https://www.baeldung.com/maven-resources-plugin)
|
||||
- [Quick Guide to the Maven Surefire Plugin](https://www.baeldung.com/maven-surefire-plugin)
|
||||
- [The Maven Failsafe Plugin](https://www.baeldung.com/maven-failsafe-plugin)
|
||||
- [The Maven Verifier Plugin](https://www.baeldung.com/maven-verifier-plugin)
|
||||
- [The Maven Clean Plugin](https://www.baeldung.com/maven-clean-plugin)
|
||||
- [Build a Jar with Maven and Ignore the Test Results](https://www.baeldung.com/maven-ignore-test-results)
|
||||
- [Maven Project with Multiple Source Directories](https://www.baeldung.com/maven-project-multiple-src-directories)
|
||||
- [Integration Testing with Maven](https://www.baeldung.com/maven-integration-test)
|
||||
- [Apache Maven Standard Directory Layout](https://www.baeldung.com/maven-directory-structure)
|
||||
- [Multi-Module Project with Maven](https://www.baeldung.com/maven-multi-module)
|
|
@ -1,3 +0,0 @@
|
|||
### Relevant Articles
|
||||
|
||||
- [Maven Enforcer Plugin](https://www.baeldung.com/maven-enforcer-plugin)
|
|
@ -5,4 +5,5 @@ This module contains articles about Apache Maven. Please refer to its submodules
|
|||
### Relevant Articles
|
||||
|
||||
- [Apache Maven Tutorial](https://www.baeldung.com/maven)
|
||||
- [Find Unused Maven Dependencies](https://www.baeldung.com/maven-unused-dependencies)
|
||||
- [Apache Maven Standard Directory Layout](https://www.baeldung.com/maven-directory-structure)
|
||||
- [Multi-Module Project with Maven](https://www.baeldung.com/maven-multi-module)
|
|
@ -0,0 +1,7 @@
|
|||
## Apache Maven
|
||||
|
||||
This module contains articles about creating a custom plugin in Maven.
|
||||
|
||||
### Relevant Articles
|
||||
|
||||
- [How to Create a Maven Plugin](https://www.baeldung.com/maven-plugin)
|
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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>
|
||||
<artifactId>maven-custom-plugin</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>maven-custom-plugin</name>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<parent>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>maven-modules</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
<module>counter-maven-plugin</module>
|
||||
<module>usage-example</module>
|
||||
</modules>
|
||||
|
||||
</project>
|
|
@ -5,7 +5,7 @@
|
|||
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.baeldung</groupId>
|
||||
<artifactId>example</artifactId>
|
||||
<artifactId>usage-example</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
## Apache Maven
|
||||
|
||||
This module contains articles about Integration Testing with Maven and related plugins.
|
||||
|
||||
### Relevant Articles
|
||||
|
||||
- [Integration Testing with Maven](https://www.baeldung.com/maven-integration-test)
|
||||
- [Build a Jar with Maven and Ignore the Test Results](https://www.baeldung.com/maven-ignore-test-results)
|
||||
- [Quick Guide to the Maven Surefire Plugin](https://www.baeldung.com/maven-surefire-plugin)
|
||||
- [The Maven Failsafe Plugin](https://www.baeldung.com/maven-failsafe-plugin)
|
|
@ -2,10 +2,9 @@
|
|||
<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>
|
||||
<artifactId>maven</artifactId>
|
||||
<artifactId>maven-integration-test</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>maven</name>
|
||||
<packaging>pom</packaging>
|
||||
<name>maven-integration-test</name>
|
||||
|
||||
<parent>
|
||||
<groupId>com.baeldung</groupId>
|
||||
|
@ -14,11 +13,6 @@
|
|||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
<module>custom-rule</module>
|
||||
<module>maven-enforcer</module>
|
||||
</modules>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jersey.containers</groupId>
|
||||
|
@ -126,20 +120,6 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-verifier-plugin</artifactId>
|
||||
<version>${maven.verifier.version}</version>
|
||||
<configuration>
|
||||
<verificationFile>input-resources/verifications.xml</verificationFile>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>verify</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-clean-plugin</artifactId>
|
||||
<version>${maven.clean.version}</version>
|
||||
|
@ -156,17 +136,6 @@
|
|||
<artifactId>build-helper-maven-plugin</artifactId>
|
||||
<version>${maven.build.helper.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>generate-sources</phase>
|
||||
<goals>
|
||||
<goal>add-source</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<sources>
|
||||
<source>src/main/another-src</source>
|
||||
</sources>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>add-integration-test-source</id>
|
||||
<phase>generate-test-sources</phase>
|
|
@ -0,0 +1,2 @@
|
|||
/output-resources
|
||||
/.idea/
|
|
@ -0,0 +1,7 @@
|
|||
## Apache Maven - Multiple Source Directories
|
||||
|
||||
This module contains articles about how to use multiple source directories with Maven.
|
||||
|
||||
### Relevant Articles
|
||||
|
||||
- [Maven Project with Multiple Source Directories](https://www.baeldung.com/maven-project-multiple-src-directories)
|
|
@ -0,0 +1,92 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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>
|
||||
<artifactId>maven-multi-source</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>maven-multi-source</name>
|
||||
|
||||
<parent>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>parent-modules</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>${maven.compiler.version}</version>
|
||||
<configuration>
|
||||
<source>${java.version}</source>
|
||||
<target>${java.version}</target>
|
||||
<compilerArgs>
|
||||
<arg>-Xlint:unchecked</arg>
|
||||
</compilerArgs>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>build-helper-maven-plugin</artifactId>
|
||||
<version>${maven.build.helper.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>generate-sources</phase>
|
||||
<goals>
|
||||
<goal>add-source</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<sources>
|
||||
<source>src/main/another-src</source>
|
||||
</sources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>surefire</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>${maven.surefire.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>integration-test</phase>
|
||||
<goals>
|
||||
<goal>test</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<exclude>none</exclude>
|
||||
</excludes>
|
||||
<includes>
|
||||
<include>**/*IntegrationTest</include>
|
||||
</includes>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
<properties>
|
||||
<maven.resources.version>3.0.2</maven.resources.version>
|
||||
<maven.compiler.version>3.8.0</maven.compiler.version>
|
||||
<maven.surefire.version>2.22.0</maven.surefire.version>
|
||||
<maven.failsafe.version>2.22.0</maven.failsafe.version>
|
||||
<maven.verifier.version>1.1</maven.verifier.version>
|
||||
<maven.clean.version>3.0.0</maven.clean.version>
|
||||
<maven.build.helper.version>3.0.0</maven.build.helper.version>
|
||||
<jetty.version>9.4.11.v20180605</jetty.version>
|
||||
<jersey.version>2.27</jersey.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
|
||||
</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<root level="INFO">
|
||||
<appender-ref ref="STDOUT" />
|
||||
</root>
|
||||
</configuration>
|
|
@ -0,0 +1,2 @@
|
|||
/output-resources
|
||||
/.idea/
|
|
@ -0,0 +1,11 @@
|
|||
## Apache Maven
|
||||
|
||||
This module contains articles about the core Maven plugins. Other Maven plugins (such as the Maven WAR Plugin) have their own dedicated modules.
|
||||
|
||||
### Relevant Articles
|
||||
|
||||
- [Guide to the Core Maven Plugins](https://www.baeldung.com/core-maven-plugins)
|
||||
- [Maven Resources Plugin](https://www.baeldung.com/maven-resources-plugin)
|
||||
- [The Maven Verifier Plugin](https://www.baeldung.com/maven-verifier-plugin)
|
||||
- [The Maven Clean Plugin](https://www.baeldung.com/maven-clean-plugin)
|
||||
- [Maven Enforcer Plugin](https://www.baeldung.com/maven-enforcer-plugin)
|
|
@ -1,19 +1,18 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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">
|
||||
<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>
|
||||
<artifactId>custom-rule</artifactId>
|
||||
<name>custom-rule</name>
|
||||
|
||||
<parent>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>maven</artifactId>
|
||||
<artifactId>maven-plugins</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<!-- dependencies for maven plugin-->
|
||||
<!-- dependencies for maven plugin -->
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.enforcer</groupId>
|
||||
<artifactId>enforcer-api</artifactId>
|
||||
|
@ -46,19 +45,6 @@
|
|||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-verifier-plugin</artifactId>
|
||||
<version>${maven.verifier.version}</version>
|
||||
<configuration>
|
||||
<verificationFile>../input-resources/verifications.xml</verificationFile>
|
||||
<failOnError>false</failOnError>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<properties>
|
||||
<api.version>3.0.0-M2</api.version>
|
||||
<maven.version>2.0.9</maven.version>
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
|
@ -8,7 +8,7 @@
|
|||
|
||||
<parent>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>maven</artifactId>
|
||||
<artifactId>maven-plugins</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
|
@ -0,0 +1,135 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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>
|
||||
<artifactId>maven-plugins</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>maven-plugins</name>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<parent>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>parent-modules</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>${maven.resources.version}</version>
|
||||
<configuration>
|
||||
<outputDirectory>output-resources</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>input-resources</directory>
|
||||
<excludes>
|
||||
<exclude>*.png</exclude>
|
||||
</excludes>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>${maven.compiler.version}</version>
|
||||
<configuration>
|
||||
<source>${java.version}</source>
|
||||
<target>${java.version}</target>
|
||||
<compilerArgs>
|
||||
<arg>-Xlint:unchecked</arg>
|
||||
</compilerArgs>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-verifier-plugin</artifactId>
|
||||
<version>${maven.verifier.version}</version>
|
||||
<configuration>
|
||||
<verificationFile>input-resources/verifications.xml</verificationFile>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>verify</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-clean-plugin</artifactId>
|
||||
<version>${maven.clean.version}</version>
|
||||
<configuration>
|
||||
<filesets>
|
||||
<fileset>
|
||||
<directory>output-resources</directory>
|
||||
</fileset>
|
||||
</filesets>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>default</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>${maven.surefire.version}</version>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<exclude>DataTest.java</exclude>
|
||||
</excludes>
|
||||
<includes>
|
||||
<include>TestFail.java</include>
|
||||
<include>DataCheck.java</include>
|
||||
</includes>
|
||||
<testFailureIgnore>true</testFailureIgnore>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>surefire</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>${maven.surefire.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>integration-test</phase>
|
||||
<goals>
|
||||
<goal>test</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<exclude>none</exclude>
|
||||
</excludes>
|
||||
<includes>
|
||||
<include>**/*IntegrationTest</include>
|
||||
</includes>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
<properties>
|
||||
<maven.resources.version>3.0.2</maven.resources.version>
|
||||
<maven.compiler.version>3.8.0</maven.compiler.version>
|
||||
<maven.surefire.version>2.22.0</maven.surefire.version>
|
||||
<maven.failsafe.version>2.22.0</maven.failsafe.version>
|
||||
<maven.verifier.version>1.1</maven.verifier.version>
|
||||
<maven.clean.version>3.0.0</maven.clean.version>
|
||||
<maven.build.helper.version>3.0.0</maven.build.helper.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
|
@ -4,9 +4,9 @@
|
|||
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.baeldung</groupId>
|
||||
<artifactId>profiles</artifactId>
|
||||
<artifactId>maven-profiles</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>profiles</name>
|
||||
<name>maven-profiles</name>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
|
@ -0,0 +1,7 @@
|
|||
## Apache Maven
|
||||
|
||||
This module contains articles about Unused Maven Dependencies.
|
||||
|
||||
### Relevant Articles
|
||||
|
||||
- [Find Unused Maven Dependencies](https://www.baeldung.com/maven-unused-dependencies)
|
|
@ -2,9 +2,9 @@
|
|||
<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>
|
||||
<artifactId>maven-all</artifactId>
|
||||
<artifactId>maven-modules</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>maven-all</name>
|
||||
<name>maven-modules</name>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<parent>
|
||||
|
@ -15,10 +15,13 @@
|
|||
|
||||
<modules>
|
||||
<!-- <module>compiler-plugin-java-9</module> --> <!-- We haven't upgraded to java 9. -->
|
||||
<module>maven</module>
|
||||
<module>maven-custom-plugin/counter-maven-plugin</module>
|
||||
<module>maven-custom-plugin</module>
|
||||
<module>maven-integration-test</module>
|
||||
<module>maven-multi-source</module>
|
||||
<module>maven-plugins</module>
|
||||
<module>maven-unused-dependencies</module>
|
||||
<module>maven-war-plugin</module>
|
||||
<module>profiles</module>
|
||||
<module>maven-profiles</module>
|
||||
<module>versions-maven-plugin</module>
|
||||
</modules>
|
||||
|
4
pom.xml
4
pom.xml
|
@ -509,7 +509,7 @@
|
|||
<module>machine-learning</module>
|
||||
<module>mapstruct</module>
|
||||
|
||||
<module>maven-all</module>
|
||||
<module>maven-modules</module>
|
||||
<module>maven-archetype</module>
|
||||
<!-- <module>maven-java-11</module> --> <!-- we haven't upgraded to Java 11 -->
|
||||
<module>maven-polyglot</module>
|
||||
|
@ -1020,7 +1020,7 @@
|
|||
<module>machine-learning</module>
|
||||
<module>mapstruct</module>
|
||||
|
||||
<module>maven-all</module>
|
||||
<module>maven-modules</module>
|
||||
<module>maven-archetype</module>
|
||||
<!-- <module>maven-java-11</module> --> <!-- we haven't upgraded to Java 11 -->
|
||||
<module>maven-polyglot</module>
|
||||
|
|
Loading…
Reference in New Issue