From 480775b0c43b81e0f515a58abd70b454f331d8c7 Mon Sep 17 00:00:00 2001 From: Donato Rimenti Date: Sun, 12 Jul 2020 18:01:22 +0200 Subject: [PATCH] Removed maven-all project since it was moved to maven-modules. --- maven-all/maven-2/.gitignore | 2 - maven-all/maven-2/README.md | 6 --- maven-all/maven-2/pom.xml | 51 ------------------- .../maven/properties/PropertiesReader.java | 41 --------------- .../properties/PropertiesReaderUnitTest.java | 27 ---------- 5 files changed, 127 deletions(-) delete mode 100644 maven-all/maven-2/.gitignore delete mode 100644 maven-all/maven-2/README.md delete mode 100644 maven-all/maven-2/pom.xml delete mode 100644 maven-all/maven-2/src/main/java/com/baeldung/maven/properties/PropertiesReader.java delete mode 100644 maven-all/maven-2/src/test/java/com/baeldung/maven/properties/PropertiesReaderUnitTest.java diff --git a/maven-all/maven-2/.gitignore b/maven-all/maven-2/.gitignore deleted file mode 100644 index bae0b0d7ce..0000000000 --- a/maven-all/maven-2/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/output-resources -/.idea/ diff --git a/maven-all/maven-2/README.md b/maven-all/maven-2/README.md deleted file mode 100644 index 5878a4f732..0000000000 --- a/maven-all/maven-2/README.md +++ /dev/null @@ -1,6 +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 diff --git a/maven-all/maven-2/pom.xml b/maven-all/maven-2/pom.xml deleted file mode 100644 index 74bae61f03..0000000000 --- a/maven-all/maven-2/pom.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - 4.0.0 - maven-2 - 0.0.1-SNAPSHOT - maven-2 - - - com.baeldung - parent-modules - 1.0.0-SNAPSHOT - ../.. - - - - - junit - junit - 4.13 - - - - - - - org.codehaus.mojo - properties-maven-plugin - 1.0.0 - - - generate-resources - - write-project-properties - - - ${project.build.outputDirectory}/properties-from-pom.properties - - - - - - - - - ${project.name} - property-from-pom - - - \ No newline at end of file diff --git a/maven-all/maven-2/src/main/java/com/baeldung/maven/properties/PropertiesReader.java b/maven-all/maven-2/src/main/java/com/baeldung/maven/properties/PropertiesReader.java deleted file mode 100644 index e7000ec2ce..0000000000 --- a/maven-all/maven-2/src/main/java/com/baeldung/maven/properties/PropertiesReader.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.baeldung.maven.properties; - -import java.io.IOException; -import java.io.InputStream; -import java.util.Properties; - -/** - * Reads properties from one file. - * - * @author Donato Rimenti - */ -public class PropertiesReader { - - /** - * Properties managed by this reader. - */ - private Properties properties; - - /** - * Reads the property file with the given name. - * - * @param propertyFileName the name of the property file to read - * @throws IOException if the file is not found or there's a problem reading it - */ - public PropertiesReader(String propertyFileName) throws IOException { - InputStream is = getClass().getClassLoader() - .getResourceAsStream(propertyFileName); - this.properties = new Properties(); - this.properties.load(is); - } - - /** - * Gets the property with the given name from the property file. - * @param propertyName the name of the property to read - * @return the property with the given name - */ - public String getProperty(String propertyName) { - return this.properties.getProperty(propertyName); - } - -} \ No newline at end of file diff --git a/maven-all/maven-2/src/test/java/com/baeldung/maven/properties/PropertiesReaderUnitTest.java b/maven-all/maven-2/src/test/java/com/baeldung/maven/properties/PropertiesReaderUnitTest.java deleted file mode 100644 index a1d6e66047..0000000000 --- a/maven-all/maven-2/src/test/java/com/baeldung/maven/properties/PropertiesReaderUnitTest.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.baeldung.maven.properties; - -import java.io.IOException; - -import org.junit.Assert; -import org.junit.Test; - -/** - * Test for {@link PropertiesReader}. - * - * @author Donato Rimenti - */ -public class PropertiesReaderUnitTest { - - /** - * Reads a property and checks that's the one expected. - * - * @throws IOException if anything goes wrong - */ - @Test - public void givenPomProperties_whenPropertyRead_thenPropertyReturned() throws IOException { - PropertiesReader reader = new PropertiesReader("properties-from-pom.properties"); - String property = reader.getProperty("my.awesome.property"); - Assert.assertEquals("property-from-pom", property); - } - -} \ No newline at end of file