diff --git a/maven-all/README.md b/maven-all/README.md deleted file mode 100644 index b448be2cd0..0000000000 --- a/maven-all/README.md +++ /dev/null @@ -1,8 +0,0 @@ -## Apache Maven - -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) diff --git a/maven-all/compiler-plugin-java-9/README.md b/maven-all/compiler-plugin-java-9/README.md deleted file mode 100644 index 0e02d56946..0000000000 --- a/maven-all/compiler-plugin-java-9/README.md +++ /dev/null @@ -1,3 +0,0 @@ -### Relevant Articles - -- [Maven Compiler Plugin](https://www.baeldung.com/maven-compiler-plugin) diff --git a/maven-all/compiler-plugin-java-9/pom.xml b/maven-all/compiler-plugin-java-9/pom.xml deleted file mode 100644 index 6baadb451c..0000000000 --- a/maven-all/compiler-plugin-java-9/pom.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - 4.0.0 - com.baeldung - compiler-plugin-java-9 - 0.0.1-SNAPSHOT - - - - - org.apache.maven.plugins - maven-compiler-plugin - ${compiler.plugin.version} - - ${source.version} - ${target.version} - - - - - - - 3.8.0 - 9 - 9 - - - \ No newline at end of file diff --git a/maven-all/compiler-plugin-java-9/src/main/java/com/baeldung/maven/java9/MavenCompilerPlugin.java b/maven-all/compiler-plugin-java-9/src/main/java/com/baeldung/maven/java9/MavenCompilerPlugin.java deleted file mode 100644 index b460d6e38c..0000000000 --- a/maven-all/compiler-plugin-java-9/src/main/java/com/baeldung/maven/java9/MavenCompilerPlugin.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.baeldung.maven.java9; - -import static javax.xml.XMLConstants.XML_NS_PREFIX; - -public class MavenCompilerPlugin { - public static void main(String[] args) { - System.out.println("The XML namespace prefix is: " + XML_NS_PREFIX); - } -} diff --git a/maven-all/compiler-plugin-java-9/src/main/java/module-info.java b/maven-all/compiler-plugin-java-9/src/main/java/module-info.java deleted file mode 100644 index afc1d45e71..0000000000 --- a/maven-all/compiler-plugin-java-9/src/main/java/module-info.java +++ /dev/null @@ -1,3 +0,0 @@ -module com.baeldung.maven.java9 { - requires java.xml; -} \ No newline at end of file diff --git a/maven-all/maven-custom-plugin/README.md b/maven-all/maven-custom-plugin/README.md deleted file mode 100644 index 55d147c337..0000000000 --- a/maven-all/maven-custom-plugin/README.md +++ /dev/null @@ -1,3 +0,0 @@ -### Relevant Articles: - -- [How to Create a Maven Plugin](https://www.baeldung.com/maven-plugin) diff --git a/maven-all/maven-custom-plugin/counter-maven-plugin/pom.xml b/maven-all/maven-custom-plugin/counter-maven-plugin/pom.xml deleted file mode 100644 index 7ddf5b739c..0000000000 --- a/maven-all/maven-custom-plugin/counter-maven-plugin/pom.xml +++ /dev/null @@ -1,80 +0,0 @@ - - - 4.0.0 - com.baeldung - counter-maven-plugin - 0.0.1-SNAPSHOT - counter-maven-plugin Maven Mojo - maven-plugin - http://maven.apache.org - - - Baeldung - https://www.baeldung.com/ - - - - - org.apache.maven - maven-plugin-api - ${maven-plugin-api.version} - - - org.apache.maven.plugin-tools - maven-plugin-annotations - ${maven-plugin-annotations.version} - provided - - - org.apache.maven - maven-project - ${maven-project.version} - - - - - - - - org.apache.maven.plugins - maven-plugin-plugin - ${maven-plugin-plugin.version} - - - org.apache.maven.plugins - maven-site-plugin - ${maven-site-plugin.version} - - - - - - - - - org.apache.maven.plugins - maven-plugin-plugin - - - - report - - - - - - - - - 1.8 - 1.8 - 3.6.2 - 3.6.0 - 2.2.1 - 3.6.0 - 3.8.2 - - - \ No newline at end of file diff --git a/maven-all/maven-custom-plugin/counter-maven-plugin/src/main/java/com/baeldung/maven/plugin/validator/DependencyCounterMojo.java b/maven-all/maven-custom-plugin/counter-maven-plugin/src/main/java/com/baeldung/maven/plugin/validator/DependencyCounterMojo.java deleted file mode 100644 index 4bb53b20cf..0000000000 --- a/maven-all/maven-custom-plugin/counter-maven-plugin/src/main/java/com/baeldung/maven/plugin/validator/DependencyCounterMojo.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.baeldung.maven.plugin.validator; - -import java.util.List; - -import org.apache.maven.model.Dependency; -import org.apache.maven.plugin.AbstractMojo; -import org.apache.maven.plugin.MojoExecutionException; -import org.apache.maven.plugin.MojoFailureException; -import org.apache.maven.plugins.annotations.LifecyclePhase; -import org.apache.maven.plugins.annotations.Mojo; -import org.apache.maven.plugins.annotations.Parameter; -import org.apache.maven.project.MavenProject; - -/** - * Counts the number of maven dependencies of a project. - * - * It can be filtered by scope. - * - */ -@Mojo(name = "dependency-counter", defaultPhase = LifecyclePhase.COMPILE) -public class DependencyCounterMojo extends AbstractMojo { - - /** - * Scope to filter the dependencies. - */ - @Parameter(property = "scope") - String scope; - - /** - * Gives access to the Maven project information. - */ - @Parameter(defaultValue = "${project}", required = true, readonly = true) - MavenProject project; - - public void execute() throws MojoExecutionException, MojoFailureException { - List dependencies = project.getDependencies(); - - long numDependencies = dependencies.stream() - .filter(d -> (scope == null || scope.isEmpty()) || scope.equals(d.getScope())) - .count(); - - getLog().info("Number of dependencies: " + numDependencies); - } - -} diff --git a/maven-all/maven-custom-plugin/usage-example/pom.xml b/maven-all/maven-custom-plugin/usage-example/pom.xml deleted file mode 100644 index ef6f08a3fb..0000000000 --- a/maven-all/maven-custom-plugin/usage-example/pom.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - 4.0.0 - com.baeldung - example - 0.0.1-SNAPSHOT - pom - - - - org.apache.commons - commons-lang3 - ${commons.lang3.version} - - - junit - junit - ${junit.version} - test - - - - - - - com.baeldung - counter-maven-plugin - 0.0.1-SNAPSHOT - - - - dependency-counter - - - - - test - - - - - - - 3.9 - 4.12 - - - diff --git a/maven-all/maven-unused-dependencies/pom.xml b/maven-all/maven-unused-dependencies/pom.xml deleted file mode 100644 index 825858e481..0000000000 --- a/maven-all/maven-unused-dependencies/pom.xml +++ /dev/null @@ -1,47 +0,0 @@ - - 4.0.0 - com.baeldung - maven-unused-dependencies - 0.0.1-SNAPSHOT - - - 3.2.2 - 1.7.25 - 3.1.2 - 3.1 - - - - - commons-collections - commons-collections - ${commons-collections.version} - - - org.slf4j - slf4j-api - ${slf4j-api.version} - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - ${maven-compiler-plugin.version} - - 1.8 - 1.8 - - - - maven-dependency-plugin - ${maven-dependency-plugin.version} - - - - - \ No newline at end of file diff --git a/maven-all/maven-unused-dependencies/src/main/java/com/baeldung/mavendependencyplugin/UnusedDependenciesExample.java b/maven-all/maven-unused-dependencies/src/main/java/com/baeldung/mavendependencyplugin/UnusedDependenciesExample.java deleted file mode 100644 index c9390880ed..0000000000 --- a/maven-all/maven-unused-dependencies/src/main/java/com/baeldung/mavendependencyplugin/UnusedDependenciesExample.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.baeldung.mavendependencyplugin; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class UnusedDependenciesExample { - - /** - * When the Maven dependency analyzer analyzes the code, it will see that the slf4j dependency is being used in this method. - * - * @return the slf4j {@link Logger}. - */ - public Logger getLogger() { - return LoggerFactory.getLogger(UnusedDependenciesExample.class); - } - -} diff --git a/maven-all/maven-war-plugin/README.md b/maven-all/maven-war-plugin/README.md deleted file mode 100644 index 09d33772f0..0000000000 --- a/maven-all/maven-war-plugin/README.md +++ /dev/null @@ -1,7 +0,0 @@ -## Maven WAR Plugin - -This module contains articles about the Maven WAR Plugin. - -### Relevant Articles - -- [Eclipse Error: web.xml is missing and failOnMissingWebXml is set to true](https://www.baeldung.com/eclipse-error-web-xml-missing) diff --git a/maven-all/maven-war-plugin/pom.xml b/maven-all/maven-war-plugin/pom.xml deleted file mode 100644 index 915be306ca..0000000000 --- a/maven-all/maven-war-plugin/pom.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - 4.0.0 - com.baeldung - maven-war-plugin - 0.0.1-SNAPSHOT - maven-war-plugin - war - - - - - maven-war-plugin - - ${war.plugin.version} - - - false - - - - - - - - false - 3.1.0 - - - \ No newline at end of file diff --git a/maven-all/maven/.gitignore b/maven-all/maven/.gitignore deleted file mode 100644 index bae0b0d7ce..0000000000 --- a/maven-all/maven/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/output-resources -/.idea/ diff --git a/maven-all/maven/README.md b/maven-all/maven/README.md deleted file mode 100644 index c5f46ca184..0000000000 --- a/maven-all/maven/README.md +++ /dev/null @@ -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) diff --git a/maven-all/maven/custom-rule/pom.xml b/maven-all/maven/custom-rule/pom.xml deleted file mode 100644 index 6ff984cb85..0000000000 --- a/maven-all/maven/custom-rule/pom.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - 4.0.0 - custom-rule - custom-rule - - - com.baeldung - maven - 0.0.1-SNAPSHOT - - - - - - org.apache.maven.enforcer - enforcer-api - ${api.version} - - - org.apache.maven - maven-project - ${maven.version} - - - org.apache.maven - maven-core - ${maven.version} - - - org.apache.maven - maven-artifact - ${maven.version} - - - org.apache.maven - maven-plugin-api - ${maven.version} - - - org.codehaus.plexus - plexus-container-default - ${plexus-container-default.version} - - - - - - - maven-verifier-plugin - ${maven.verifier.version} - - ../input-resources/verifications.xml - false - - - - - - - 3.0.0-M2 - 2.0.9 - 1.0-alpha-9 - - - diff --git a/maven-all/maven/custom-rule/src/main/java/com/baeldung/enforcer/MyCustomRule.java b/maven-all/maven/custom-rule/src/main/java/com/baeldung/enforcer/MyCustomRule.java deleted file mode 100644 index db636c2308..0000000000 --- a/maven-all/maven/custom-rule/src/main/java/com/baeldung/enforcer/MyCustomRule.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2019 PloyRef - * Created by Seun Matt - * on 19 - 2 - 2019 - */ - -package com.baeldung.enforcer; - -import org.apache.maven.enforcer.rule.api.EnforcerRule; -import org.apache.maven.enforcer.rule.api.EnforcerRuleException; -import org.apache.maven.enforcer.rule.api.EnforcerRuleHelper; -import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluationException; - -public class MyCustomRule implements EnforcerRule { - - public void execute(EnforcerRuleHelper enforcerRuleHelper) throws EnforcerRuleException { - - try { - - String groupId = (String) enforcerRuleHelper.evaluate("${project.groupId}"); - - if (groupId == null || !groupId.startsWith("com.baeldung")) { - throw new EnforcerRuleException("Project group id does not start with com.baeldung"); - } - - } - catch (ExpressionEvaluationException ex ) { - throw new EnforcerRuleException( "Unable to lookup an expression " + ex.getLocalizedMessage(), ex ); - } - } - - public boolean isCacheable() { - return false; - } - - public boolean isResultValid(EnforcerRule enforcerRule) { - return false; - } - - public String getCacheId() { - return null; - } -} diff --git a/maven-all/maven/input-resources/baeldung.png b/maven-all/maven/input-resources/baeldung.png deleted file mode 100644 index 488f52e56e..0000000000 Binary files a/maven-all/maven/input-resources/baeldung.png and /dev/null differ diff --git a/maven-all/maven/input-resources/baeldung.txt b/maven-all/maven/input-resources/baeldung.txt deleted file mode 100644 index 6006764753..0000000000 --- a/maven-all/maven/input-resources/baeldung.txt +++ /dev/null @@ -1 +0,0 @@ -Welcome to ${resources.name}! \ No newline at end of file diff --git a/maven-all/maven/input-resources/verifications.xml b/maven-all/maven/input-resources/verifications.xml deleted file mode 100644 index c59b5086f6..0000000000 --- a/maven-all/maven/input-resources/verifications.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - input-resources/baeldung.txt - Welcome - - - \ No newline at end of file diff --git a/maven-all/maven/maven-enforcer/README.md b/maven-all/maven/maven-enforcer/README.md deleted file mode 100644 index 7515647a3d..0000000000 --- a/maven-all/maven/maven-enforcer/README.md +++ /dev/null @@ -1,3 +0,0 @@ -### Relevant Articles - -- [Maven Enforcer Plugin](https://www.baeldung.com/maven-enforcer-plugin) \ No newline at end of file diff --git a/maven-all/maven/maven-enforcer/pom.xml b/maven-all/maven/maven-enforcer/pom.xml deleted file mode 100644 index cde37eabd1..0000000000 --- a/maven-all/maven/maven-enforcer/pom.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - 4.0.0 - maven-enforcer - maven-enforcer - - - com.baeldung - maven - 0.0.1-SNAPSHOT - - - - - - org.apache.maven.plugins - maven-enforcer-plugin - 3.0.0-M2 - - - - - - - - - - enforce - - enforce - - - - - - 3.0 - Invalid Maven version. It should, at least, be 3.0 - - - 1.8 - - - ui - WARN - - - cook - WARN - - - local,base - Missing active profiles - WARN - - - - - - - - - - maven-verifier-plugin - ${maven.verifier.version} - - ../input-resources/verifications.xml - false - - - - - - \ No newline at end of file diff --git a/maven-all/maven/pom.xml b/maven-all/maven/pom.xml deleted file mode 100644 index 0220cf8dfc..0000000000 --- a/maven-all/maven/pom.xml +++ /dev/null @@ -1,314 +0,0 @@ - - - 4.0.0 - maven - 0.0.1-SNAPSHOT - maven - pom - - - com.baeldung - parent-modules - 1.0.0-SNAPSHOT - ../.. - - - - custom-rule - maven-enforcer - - - - - org.glassfish.jersey.containers - jersey-container-servlet-core - ${jersey.version} - - - org.glassfish.jersey.inject - jersey-hk2 - ${jersey.version} - - - junit - junit - ${junit.version} - test - - - - - - - org.eclipse.jetty - jetty-maven-plugin - ${jetty.version} - - - 8999 - - quit - 9000 - - - - start-jetty - pre-integration-test - - start - - - - stop-jetty - post-integration-test - - stop - - - - - - maven-resources-plugin - ${maven.resources.version} - - output-resources - - - input-resources - - *.png - - true - - - - - - maven-compiler-plugin - ${maven.compiler.version} - - ${java.version} - ${java.version} - - -Xlint:unchecked - - - - - maven-surefire-plugin - ${maven.surefire.version} - - - DataTest.java - **/*IntegrationTest - - com.baeldung.maven.it.Integration - - TestFail.java - DataCheck.java - - true - - - - 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 - - - - - - org.codehaus.mojo - build-helper-maven-plugin - ${maven.build.helper.version} - - - generate-sources - - add-source - - - - src/main/another-src - - - - - add-integration-test-source - generate-test-sources - - add-test-source - - - - src/integration-test/java - - - - - add-integration-test-resource - generate-test-resources - - add-test-resource - - - - - src/integration-test/resources - - - - - - - - - - - - default - - - - maven-surefire-plugin - ${maven.surefire.version} - - - DataTest.java - - - TestFail.java - DataCheck.java - - true - - - - - - - failsafe - - - - maven-failsafe-plugin - ${maven.failsafe.version} - - - **/*RestIT - **/RestITCase - - - - - - integration-test - verify - - - - - - - - - surefire - - - - maven-surefire-plugin - ${maven.surefire.version} - - - integration-test - - test - - - - none - - - **/*IntegrationTest - - - - - - - - - - category - - - - maven-failsafe-plugin - ${maven.failsafe.version} - - - **/* - - com.baeldung.maven.it.Integration - - - - - integration-test - verify - - - - - - - - - - - 3.0.2 - 3.8.0 - 2.22.0 - 2.22.0 - 1.1 - 3.0.0 - 3.0.0 - 9.4.11.v20180605 - 2.27 - - - \ No newline at end of file diff --git a/maven-all/maven/proxy/README.md b/maven-all/maven/proxy/README.md deleted file mode 100644 index 9ae1fd6ad5..0000000000 --- a/maven-all/maven/proxy/README.md +++ /dev/null @@ -1,3 +0,0 @@ -### Relevant Articles: - -- [Using Maven Behind a Proxy](https://www.baeldung.com/maven-behind-proxy) diff --git a/maven-all/maven/proxy/settings.xml b/maven-all/maven/proxy/settings.xml deleted file mode 100644 index 55a850a6bc..0000000000 --- a/maven-all/maven/proxy/settings.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - BaeldungProxy_Encrypted - true - http - proxy.baeldung.com - 80 - baeldung - {U2iMf+7aJXQHRquuQq6MX+n7GOeh97zB9/4e7kkEQYs=} - internal.baeldung.com|localhost|127.*|[::1] - - - - BaeldungProxy_Authenticated - true - http - proxy.baeldung.com - 80 - baeldung - changeme - internal.baeldung.com|localhost|127.*|[::1] - - - - BaeldungProxy - proxy.baeldung.com - 80 - internal.baeldung.com|localhost|127.*|[::1] - - - - - \ No newline at end of file diff --git a/maven-all/maven/security/redirect/settings-security.xml b/maven-all/maven/security/redirect/settings-security.xml deleted file mode 100644 index 37e91bd1a4..0000000000 --- a/maven-all/maven/security/redirect/settings-security.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - R:\config\settings-security.xml - diff --git a/maven-all/maven/security/settings-security.xml b/maven-all/maven/security/settings-security.xml deleted file mode 100644 index 3ac258e8a5..0000000000 --- a/maven-all/maven/security/settings-security.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - {QFMlh/6WjF8H9po9UD\}0Nv18e527jqWb6mUgIB798n4=} - diff --git a/maven-all/maven/src/integration-test/java/com/baeldung/maven/it/RestITCase.java b/maven-all/maven/src/integration-test/java/com/baeldung/maven/it/RestITCase.java deleted file mode 100644 index aaeeedb661..0000000000 --- a/maven-all/maven/src/integration-test/java/com/baeldung/maven/it/RestITCase.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.baeldung.maven.it; - -import org.junit.Test; - -import java.io.IOException; -import java.io.InputStream; -import java.net.URL; -import java.net.URLConnection; -import java.util.Scanner; - -import static org.junit.Assert.assertEquals; - -public class RestITCase { - @Test - public void whenSendingGet_thenMessageIsReturned() throws IOException { - String url = "http://localhost:8999"; - URLConnection connection = new URL(url).openConnection(); - try (InputStream response = connection.getInputStream(); - Scanner scanner = new Scanner(response)) { - String responseBody = scanner.nextLine(); - assertEquals("Welcome to Baeldung!", responseBody); - } - } -} diff --git a/maven-all/maven/src/main/another-src/com/baeldung/maven/plugins/Foo.java b/maven-all/maven/src/main/another-src/com/baeldung/maven/plugins/Foo.java deleted file mode 100644 index f8a6fe9853..0000000000 --- a/maven-all/maven/src/main/another-src/com/baeldung/maven/plugins/Foo.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.baeldung.maven.plugins; - -public class Foo { - - public static String foo() { - return "foo"; - } - -} - diff --git a/maven-all/maven/src/main/java/com/baeldung/maven/it/EndpointConfig.java b/maven-all/maven/src/main/java/com/baeldung/maven/it/EndpointConfig.java deleted file mode 100644 index 919210ccff..0000000000 --- a/maven-all/maven/src/main/java/com/baeldung/maven/it/EndpointConfig.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.baeldung.maven.it; - -import org.glassfish.jersey.server.ResourceConfig; - -public class EndpointConfig extends ResourceConfig { - public EndpointConfig() { - register(RestEndpoint.class); - } -} diff --git a/maven-all/maven/src/main/java/com/baeldung/maven/it/RestEndpoint.java b/maven-all/maven/src/main/java/com/baeldung/maven/it/RestEndpoint.java deleted file mode 100644 index c234891865..0000000000 --- a/maven-all/maven/src/main/java/com/baeldung/maven/it/RestEndpoint.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.baeldung.maven.it; - -import javax.ws.rs.GET; -import javax.ws.rs.Path; - -@Path("/") -public class RestEndpoint { - @GET - public String hello() { - return "Welcome to Baeldung!"; - } -} diff --git a/maven-all/maven/src/main/java/com/baeldung/maven/plugins/Data.java b/maven-all/maven/src/main/java/com/baeldung/maven/plugins/Data.java deleted file mode 100644 index 6ac6f9ab46..0000000000 --- a/maven-all/maven/src/main/java/com/baeldung/maven/plugins/Data.java +++ /dev/null @@ -1,16 +0,0 @@ -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-all/maven/src/main/java/com/baeldung/maven/plugins/MultipleSrcFolders.java b/maven-all/maven/src/main/java/com/baeldung/maven/plugins/MultipleSrcFolders.java deleted file mode 100644 index d403918dd3..0000000000 --- a/maven-all/maven/src/main/java/com/baeldung/maven/plugins/MultipleSrcFolders.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.baeldung.maven.plugins; - -public class MultipleSrcFolders { - - public static void callFoo() { - Foo.foo(); - } - -} diff --git a/maven-all/maven/src/main/resources/logback.xml b/maven-all/maven/src/main/resources/logback.xml deleted file mode 100644 index 7d900d8ea8..0000000000 --- a/maven-all/maven/src/main/resources/logback.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - - - - - - \ No newline at end of file diff --git a/maven-all/maven/src/main/webapp/WEB-INF/web.xml b/maven-all/maven/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 1751ad17a5..0000000000 --- a/maven-all/maven/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - rest-servlet - org.glassfish.jersey.servlet.ServletContainer - - javax.ws.rs.Application - com.baeldung.maven.it.EndpointConfig - - - - rest-servlet - /* - - \ No newline at end of file diff --git a/maven-all/maven/src/test/java/com/baeldung/maven/it/Integration.java b/maven-all/maven/src/test/java/com/baeldung/maven/it/Integration.java deleted file mode 100644 index 112ce178ce..0000000000 --- a/maven-all/maven/src/test/java/com/baeldung/maven/it/Integration.java +++ /dev/null @@ -1,4 +0,0 @@ -package com.baeldung.maven.it; - -public interface Integration { -} diff --git a/maven-all/maven/src/test/java/com/baeldung/maven/it/RestIT.java b/maven-all/maven/src/test/java/com/baeldung/maven/it/RestIT.java deleted file mode 100644 index 0115d34f1e..0000000000 --- a/maven-all/maven/src/test/java/com/baeldung/maven/it/RestIT.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.baeldung.maven.it; - -import org.junit.Test; - -import java.io.IOException; -import java.io.InputStream; -import java.net.URL; -import java.net.URLConnection; -import java.util.Scanner; - -import static org.junit.Assert.assertEquals; - -public class RestIT { - @Test - public void whenSendingGet_thenMessageIsReturned() throws IOException { - String url = "http://localhost:8999"; - URLConnection connection = new URL(url).openConnection(); - try (InputStream response = connection.getInputStream(); - Scanner scanner = new Scanner(response)) { - String responseBody = scanner.nextLine(); - assertEquals("Welcome to Baeldung!", responseBody); - } - } -} diff --git a/maven-all/maven/src/test/java/com/baeldung/maven/it/RestIntegrationTest.java b/maven-all/maven/src/test/java/com/baeldung/maven/it/RestIntegrationTest.java deleted file mode 100644 index 2f913c8429..0000000000 --- a/maven-all/maven/src/test/java/com/baeldung/maven/it/RestIntegrationTest.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.baeldung.maven.it; - -import org.junit.Test; - -import java.io.IOException; -import java.io.InputStream; -import java.net.URL; -import java.net.URLConnection; -import java.util.Scanner; - -import static org.junit.Assert.assertEquals; - -public class RestIntegrationTest { - @Test - public void whenSendingGet_thenMessageIsReturned() throws IOException { - String url = "http://localhost:8999"; - URLConnection connection = new URL(url).openConnection(); - try (InputStream response = connection.getInputStream(); - Scanner scanner = new Scanner(response)) { - String responseBody = scanner.nextLine(); - assertEquals("Welcome to Baeldung!", responseBody); - } - } -} diff --git a/maven-all/maven/src/test/java/com/baeldung/maven/it/RestJUnitTest.java b/maven-all/maven/src/test/java/com/baeldung/maven/it/RestJUnitTest.java deleted file mode 100644 index 60995d75bd..0000000000 --- a/maven-all/maven/src/test/java/com/baeldung/maven/it/RestJUnitTest.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.baeldung.maven.it; - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import java.io.IOException; -import java.io.InputStream; -import java.net.URL; -import java.net.URLConnection; -import java.util.Scanner; - -import static org.junit.Assert.assertEquals; - -@Category(Integration.class) -public class RestJUnitTest { - @Test - public void whenSendingGet_thenMessageIsReturned() throws IOException { - String url = "http://localhost:8999"; - URLConnection connection = new URL(url).openConnection(); - try (InputStream response = connection.getInputStream(); - Scanner scanner = new Scanner(response)) { - String responseBody = scanner.nextLine(); - assertEquals("Welcome to Baeldung!", responseBody); - } - } -} diff --git a/maven-all/maven/src/test/java/com/baeldung/maven/plugins/DataCheck.java b/maven-all/maven/src/test/java/com/baeldung/maven/plugins/DataCheck.java deleted file mode 100644 index 9aaf0fb071..0000000000 --- a/maven-all/maven/src/test/java/com/baeldung/maven/plugins/DataCheck.java +++ /dev/null @@ -1,15 +0,0 @@ -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-all/maven/src/test/java/com/baeldung/maven/plugins/DataUnitTest.java b/maven-all/maven/src/test/java/com/baeldung/maven/plugins/DataUnitTest.java deleted file mode 100644 index 197f977fec..0000000000 --- a/maven-all/maven/src/test/java/com/baeldung/maven/plugins/DataUnitTest.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.baeldung.maven.plugins; - -import static org.junit.Assert.assertNull; - -import org.junit.Test; - -import com.baeldung.maven.plugins.Data; - -public class DataUnitTest { - @Test - public void whenDataObjectIsNotCreated_thenItIsNull() { - Data data = null; - assertNull(data); - } -} diff --git a/maven-all/maven/src/test/java/testfail/TestFail.java b/maven-all/maven/src/test/java/testfail/TestFail.java deleted file mode 100644 index 3febd21031..0000000000 --- a/maven-all/maven/src/test/java/testfail/TestFail.java +++ /dev/null @@ -1,18 +0,0 @@ -package testfail; - -import org.junit.Test; -import org.junit.Ignore; - -import static org.junit.Assert.assertNotNull; - -public class TestFail { - - @Ignore //ignored so the entire tutorials build passes - @Test - public void whenMessageAssigned_thenItIsNotNull() { - String message = "hello there"; - message = null; - assertNotNull(message); - } - -} diff --git a/maven-all/pom.xml b/maven-all/pom.xml deleted file mode 100644 index 3a79a2a686..0000000000 --- a/maven-all/pom.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - 4.0.0 - maven-all - 0.0.1-SNAPSHOT - maven-all - pom - - - com.baeldung - parent-modules - 1.0.0-SNAPSHOT - - - - - maven - maven-custom-plugin/counter-maven-plugin - maven-war-plugin - profiles - versions-maven-plugin - - - diff --git a/maven-all/profiles/README.md b/maven-all/profiles/README.md deleted file mode 100644 index cfbe5c397f..0000000000 --- a/maven-all/profiles/README.md +++ /dev/null @@ -1,7 +0,0 @@ -## Maven Profiles - -This module contains articles about Maven profiles. - -### Relevant Articles - -- [Guide to Maven Profiles](https://www.baeldung.com/maven-profiles) diff --git a/maven-all/profiles/pom.xml b/maven-all/profiles/pom.xml deleted file mode 100644 index 4ae6d1ee40..0000000000 --- a/maven-all/profiles/pom.xml +++ /dev/null @@ -1,94 +0,0 @@ - - - 4.0.0 - com.baeldung - profiles - 0.0.1-SNAPSHOT - profiles - - - - no-tests - - true - - - - integration-tests - - true - - - - mutation-tests - - - active-on-jdk-11 - - 11 - - - - active-on-windows-10 - - - windows 10 - Windows - amd64 - 10.0 - - - - - active-on-property-environment - - - environment - !test - - - - - active-on-missing-file - - - target/testreport.html - - - - - active-on-present-file - - - target/artifact.jar - - - - - - - - - org.apache.maven.plugins - maven-help-plugin - ${help.plugin.version} - - - show-profiles - compile - - active-profiles - - - - - - - - - 3.2.0 - - - \ No newline at end of file diff --git a/maven-all/versions-maven-plugin/README.md b/maven-all/versions-maven-plugin/README.md deleted file mode 100644 index 19414a2a4b..0000000000 --- a/maven-all/versions-maven-plugin/README.md +++ /dev/null @@ -1,7 +0,0 @@ -## Versions Maven Plugin - -This module contains articles about the Versions Maven Plugin. - -### Relevant Articles - -- [Use the Latest Version of a Dependency in Maven](https://www.baeldung.com/maven-dependency-latest-version) diff --git a/maven-all/versions-maven-plugin/original/pom.xml b/maven-all/versions-maven-plugin/original/pom.xml deleted file mode 100644 index f81596661e..0000000000 --- a/maven-all/versions-maven-plugin/original/pom.xml +++ /dev/null @@ -1,82 +0,0 @@ - - - 4.0.0 - com.baeldung - original - 0.0.1-SNAPSHOT - - - - - commons-io - commons-io - ${commons-io.version} - - - - org.apache.commons - commons-collections4 - ${commons-collections4.version} - - - - org.apache.commons - commons-lang3 - ${commons-lang3.version} - - - - org.apache.commons - commons-compress - ${commons-compress-version} - - - - commons-beanutils - commons-beanutils - ${commons-beanutils.version} - - - - - - - - org.codehaus.mojo - versions-maven-plugin - ${versions.plugin.version} - - - org.apache.commons:commons-collections4 - - - - - - - - - apache.snapshots - Apache Development Snapshot Repository - https://repository.apache.org/content/repositories/snapshots/ - - false - - - true - - - - - - 1.15 - 2.3 - 4.0 - 3.0 - 1.9.1 - 2.7 - - - \ No newline at end of file diff --git a/maven-all/versions-maven-plugin/pom.xml b/maven-all/versions-maven-plugin/pom.xml deleted file mode 100644 index 9793f55b28..0000000000 --- a/maven-all/versions-maven-plugin/pom.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - 4.0.0 - com.baeldung - versions-maven-plugin - 0.0.1-SNAPSHOT - versions-maven-plugin - - - - commons-io - commons-io - ${commons.io.version} - - - - org.apache.commons - commons-collections4 - ${commons.collections4.version} - - - - org.apache.commons - commons-lang3 - ${commons.lang3.version} - - - - org.apache.commons - commons-compress - ${commons-compress-version} - - - - commons-beanutils - commons-beanutils - ${commons.beanutils.version} - - - - - - - org.codehaus.mojo - versions-maven-plugin - ${versions.plugin.version} - - - org.apache.commons:commons-collections4 - - - - - - - - - apache.snapshots - Apache Development Snapshot Repository - https://repository.apache.org/content/repositories/snapshots/ - - false - - - true - - - - - - 1.15 - 2.3 - 2.7 - 1.9.1 - 3.0 - 4.0 - - - \ No newline at end of file diff --git a/maven-all/versions-maven-plugin/run-the-demo.sh b/maven-all/versions-maven-plugin/run-the-demo.sh deleted file mode 100644 index 89ca871e01..0000000000 --- a/maven-all/versions-maven-plugin/run-the-demo.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/bash -#function to display commands -exe() { echo -e "\$ $@\n" ; "$@" ; } - -TEXT_COLOR='\033[1;33m' #Yellow -NO_COLOR='\033[0m' # No Color - -clear - -echo -e "======================================================================================" -echo -e " Showcase for the BAELDUNG tutorial \"Use the latest version of a dependency in Maven\"" -echo -e " Author: Andrea Ligios" -echo -e "======================================================================================" - -echo -e "${TEXT_COLOR}\n--------------------------------------------------------------------------------------" -echo -e " Resetting the demo environment (which will be altered during the run): " -echo -e "--------------------------------------------------------------------------------------${NO_COLOR}" -rm -f pom.xml.versionsBackup -cp original/pom.xml pom.xml -ls -lt pom.* -echo -e "${TEXT_COLOR}\n--------------------------------------------------------------------------------------" -echo -e " Checking for newer versions of the Maven dependencies:" -echo -e "--------------------------------------------------------------------------------------${NO_COLOR}" -exe mvn versions:display-dependency-updates -echo -read -p "Press enter to continue" - -echo -e "${TEXT_COLOR}\n--------------------------------------------------------------------------------------" -echo -e " Updating SNAPSHOT dependencies to their RELEASE version, if any:" -echo -e "--------------------------------------------------------------------------------------${NO_COLOR}" -exe mvn versions:use-releases -echo -e "${TEXT_COLOR}\n--------------------------------------------------------------------------------------" -echo -e " A backup has been created automatically:" -echo -e "--------------------------------------------------------------------------------------${NO_COLOR}" -ls -lt pom.* -echo -read -p "Press enter to continue" - -echo -e "${TEXT_COLOR}\n--------------------------------------------------------------------------------------" -echo -e " Updating RELEASE dependencies to their *next* RELEASE version:" -echo -e "--------------------------------------------------------------------------------------${NO_COLOR}" -exe mvn versions:use-next-releases -echo -read -p "Press enter to continue" - -echo -e "${TEXT_COLOR}\n--------------------------------------------------------------------------------------" -echo -e " Reverting every modification made since the beginning:" -echo -e "--------------------------------------------------------------------------------------${NO_COLOR}" -exe mvn versions:revert -echo -e "${TEXT_COLOR}\n--------------------------------------------------------------------------------------" -echo -e " The backup is gone, and the pom.xml contains the initial dependencies:" -echo -e "--------------------------------------------------------------------------------------${NO_COLOR}" -ls -lt pom.* -echo -read -p "Press enter to continue" - -echo -e "${TEXT_COLOR}\n--------------------------------------------------------------------------------------" -echo -e " Updating RELEASE dependencies to their *latest* RELEASE version:" -echo -e "--------------------------------------------------------------------------------------${NO_COLOR}" -exe mvn versions:use-latest-releases -echo -read -p "Press enter to continue" - -echo -e "${TEXT_COLOR}\n--------------------------------------------------------------------------------------" -echo -e " Committing the modifications to pom.xml:" -echo -e "--------------------------------------------------------------------------------------${NO_COLOR}" -exe mvn versions:commit -echo -e "${TEXT_COLOR}\n--------------------------------------------------------------------------------------" -echo -e " The backup is gone, and the pom.xml contains the latest dependencies:" -echo -e "--------------------------------------------------------------------------------------${NO_COLOR}" -ls -lt pom.* -echo - -echo -e "${TEXT_COLOR}\nThat's all folks!${NO_COLOR}\n"