diff --git a/core-java-arrays/.gitignore b/core-java-arrays/.gitignore new file mode 100644 index 0000000000..374c8bf907 --- /dev/null +++ b/core-java-arrays/.gitignore @@ -0,0 +1,25 @@ +*.class + +0.* + +#folders# +/target +/neoDb* +/data +/src/main/webapp/WEB-INF/classes +*/META-INF/* +.resourceCache + +# Packaged files # +*.jar +*.war +*.ear + +# Files generated by integration tests +backup-pom.xml +/bin/ +/temp + +#IntelliJ specific +.idea/ +*.iml \ No newline at end of file diff --git a/core-java-arrays/pom.xml b/core-java-arrays/pom.xml new file mode 100644 index 0000000000..36dcc09341 --- /dev/null +++ b/core-java-arrays/pom.xml @@ -0,0 +1,547 @@ + + 4.0.0 + com.baeldung + core-java-arrays + 0.1.0-SNAPSHOT + jar + core-java-arrays + + + com.baeldung + parent-java + 0.0.1-SNAPSHOT + ../parent-java + + + + + commons-io + commons-io + ${commons-io.version} + + + org.apache.commons + commons-lang3 + ${commons-lang3.version} + + + org.bouncycastle + bcprov-jdk15on + ${bouncycastle.version} + + + org.unix4j + unix4j-command + ${unix4j.version} + + + com.googlecode.grep4j + grep4j + ${grep4j.version} + + + + + com.fasterxml.jackson.core + jackson-databind + ${jackson.version} + + + com.google.code.gson + gson + ${gson.version} + + + + log4j + log4j + ${log4j.version} + + + org.slf4j + log4j-over-slf4j + ${org.slf4j.version} + + + org.projectlombok + lombok + ${lombok.version} + provided + + + + org.assertj + assertj-core + ${assertj-core.version} + test + + + + commons-codec + commons-codec + ${commons-codec.version} + + + org.javamoney + moneta + ${javamoney.moneta.version} + + + org.owasp.esapi + esapi + ${esapi.version} + + + com.sun.messaging.mq + fscontext + ${fscontext.version} + + + com.codepoetics + protonpack + ${protonpack.version} + + + one.util + streamex + ${streamex.version} + + + io.vavr + vavr + ${vavr.version} + + + org.openjdk.jmh + jmh-core + ${jmh-core.version} + + + org.openjdk.jmh + jmh-generator-annprocess + ${jmh-generator-annprocess.version} + + + org.springframework + spring-web + ${springframework.spring-web.version} + + + com.h2database + h2 + ${h2database.version} + + + javax.mail + mail + ${javax.mail.version} + + + + org.apache.tika + tika-core + ${tika.version} + + + net.sf.jmimemagic + jmimemagic + ${jmime-magic.version} + + + + org.javassist + javassist + ${javaassist.version} + + + com.sun + tools + 1.8.0 + system + ${java.home}/../lib/tools.jar + + + + + core-java-arrays + + + src/main/resources + true + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + **/*LiveTest.java + **/*IntegrationTest.java + **/*IntTest.java + **/*LongRunningUnitTest.java + **/*ManualTest.java + + true + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + copy-dependencies + prepare-package + + copy-dependencies + + + ${project.build.directory}/libs + + + + + + + org.apache.maven.plugins + maven-jar-plugin + ${maven-jar-plugin.version} + + + + true + libs/ + org.baeldung.executable.ExecutableMavenJar + + + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + package + + single + + + ${project.basedir} + + + org.baeldung.executable.ExecutableMavenJar + + + + jar-with-dependencies + + + + + + + + org.apache.maven.plugins + maven-shade-plugin + ${maven-shade-plugin.version} + + + + shade + + + true + + + org.baeldung.executable.ExecutableMavenJar + + + + + + + + + com.jolira + onejar-maven-plugin + ${onejar-maven-plugin.version} + + + + org.baeldung.executable.ExecutableMavenJar + true + ${project.build.finalName}-onejar.${project.packaging} + + + one-jar + + + + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring-boot-maven-plugin.version} + + + + repackage + + + spring-boot + org.baeldung.executable.ExecutableMavenJar + + + + + + + org.codehaus.mojo + exec-maven-plugin + ${exec-maven-plugin.version} + + java + com.baeldung.outofmemoryerror.OutOfMemoryGCLimitExceed + + -Xmx300m + -XX:+UseParallelGC + -classpath + + com.baeldung.outofmemoryerror.OutOfMemoryGCLimitExceed + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + ${maven-javadoc-plugin.version} + + 1.8 + 1.8 + + + + + + + + integration + + + + org.apache.maven.plugins + maven-surefire-plugin + + + integration-test + + test + + + + **/*ManualTest.java + + + **/*IntegrationTest.java + **/*IntTest.java + + + + + + + json + + + + + org.codehaus.mojo + exec-maven-plugin + ${exec-maven-plugin.version} + + + run-benchmarks + + none + + exec + + + test + java + + -classpath + + org.openjdk.jmh.Main + .* + + + + + + + + + + + + buildAgentLoader + + + + org.apache.maven.plugins + maven-jar-plugin + + + package + + jar + + + agentLoader + target/classes + + + true + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + com/baeldung/instrumentation/application/AgentLoader.class + com/baeldung/instrumentation/application/Launcher.class + + + + + + + + + + buildApplication + + + + org.apache.maven.plugins + maven-jar-plugin + + + package + + jar + + + application + target/classes + + + true + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + com/baeldung/instrumentation/application/MyAtm.class + com/baeldung/instrumentation/application/MyAtmApplication.class + com/baeldung/instrumentation/application/Launcher.class + + + + + + + + + + buildAgent + + + + org.apache.maven.plugins + maven-jar-plugin + + + package + + jar + + + agent + target/classes + + + true + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + + com/baeldung/instrumentation/agent/AtmTransformer.class + com/baeldung/instrumentation/agent/MyInstrumentationAgent.class + + + + + + + + + + + + + + 2.8.5 + 2.8.2 + + + 3.8.1 + 1.55 + 1.10 + 2.5 + 3.6.1 + 1.0.3 + 0.4 + 1.8.7 + 1.16.12 + 4.6-b01 + 1.13 + 0.6.5 + 0.9.0 + + + 3.10.0 + + + 2.21.0 + 4.3.4.RELEASE + + 1.1 + 1.4.197 + 2.1.0.1 + 1.19 + + 1.19 + 3.0.0-M1 + 1.5.0-b01 + 3.0.2 + 1.4.4 + 3.1.1 + 2.0.3.RELEASE + 1.6.0 + 61.1 + + 1.18 + 0.1.5 + + 3.21.0-GA + + + diff --git a/core-java/src/main/java/com/baeldung/array/ArrayBenchmarkRunner.java b/core-java-arrays/src/main/java/com/baeldung/array/ArrayBenchmarkRunner.java similarity index 100% rename from core-java/src/main/java/com/baeldung/array/ArrayBenchmarkRunner.java rename to core-java-arrays/src/main/java/com/baeldung/array/ArrayBenchmarkRunner.java diff --git a/core-java/src/main/java/com/baeldung/array/ArrayInitializer.java b/core-java-arrays/src/main/java/com/baeldung/array/ArrayInitializer.java similarity index 100% rename from core-java/src/main/java/com/baeldung/array/ArrayInitializer.java rename to core-java-arrays/src/main/java/com/baeldung/array/ArrayInitializer.java diff --git a/core-java/src/main/java/com/baeldung/array/ArrayInverter.java b/core-java-arrays/src/main/java/com/baeldung/array/ArrayInverter.java similarity index 100% rename from core-java/src/main/java/com/baeldung/array/ArrayInverter.java rename to core-java-arrays/src/main/java/com/baeldung/array/ArrayInverter.java diff --git a/core-java/src/main/java/com/baeldung/array/ArrayReferenceGuide.java b/core-java-arrays/src/main/java/com/baeldung/array/ArrayReferenceGuide.java similarity index 100% rename from core-java/src/main/java/com/baeldung/array/ArrayReferenceGuide.java rename to core-java-arrays/src/main/java/com/baeldung/array/ArrayReferenceGuide.java diff --git a/core-java/src/main/java/com/baeldung/array/Find2ndLargestInArray.java b/core-java-arrays/src/main/java/com/baeldung/array/Find2ndLargestInArray.java similarity index 100% rename from core-java/src/main/java/com/baeldung/array/Find2ndLargestInArray.java rename to core-java-arrays/src/main/java/com/baeldung/array/Find2ndLargestInArray.java diff --git a/core-java/src/main/java/com/baeldung/array/FindElementInArray.java b/core-java-arrays/src/main/java/com/baeldung/array/FindElementInArray.java similarity index 100% rename from core-java/src/main/java/com/baeldung/array/FindElementInArray.java rename to core-java-arrays/src/main/java/com/baeldung/array/FindElementInArray.java diff --git a/core-java/src/main/java/com/baeldung/array/JaggedArray.java b/core-java-arrays/src/main/java/com/baeldung/array/JaggedArray.java similarity index 100% rename from core-java/src/main/java/com/baeldung/array/JaggedArray.java rename to core-java-arrays/src/main/java/com/baeldung/array/JaggedArray.java diff --git a/core-java/src/main/java/com/baeldung/array/SearchArrayUnitTest.java b/core-java-arrays/src/main/java/com/baeldung/array/SearchArrayUnitTest.java similarity index 100% rename from core-java/src/main/java/com/baeldung/array/SearchArrayUnitTest.java rename to core-java-arrays/src/main/java/com/baeldung/array/SearchArrayUnitTest.java diff --git a/core-java/src/main/java/com/baeldung/array/SumAndAverageInArray.java b/core-java-arrays/src/main/java/com/baeldung/array/SumAndAverageInArray.java similarity index 100% rename from core-java/src/main/java/com/baeldung/array/SumAndAverageInArray.java rename to core-java-arrays/src/main/java/com/baeldung/array/SumAndAverageInArray.java diff --git a/core-java-collections/src/main/java/com/baeldung/array/operations/ArrayOperations.java b/core-java-arrays/src/main/java/com/baeldung/array/operations/ArrayOperations.java similarity index 100% rename from core-java-collections/src/main/java/com/baeldung/array/operations/ArrayOperations.java rename to core-java-arrays/src/main/java/com/baeldung/array/operations/ArrayOperations.java diff --git a/core-java/src/main/java/com/baeldung/arraycopy/model/Address.java b/core-java-arrays/src/main/java/com/baeldung/arraycopy/model/Address.java similarity index 100% rename from core-java/src/main/java/com/baeldung/arraycopy/model/Address.java rename to core-java-arrays/src/main/java/com/baeldung/arraycopy/model/Address.java diff --git a/core-java/src/main/java/com/baeldung/arraycopy/model/Employee.java b/core-java-arrays/src/main/java/com/baeldung/arraycopy/model/Employee.java similarity index 100% rename from core-java/src/main/java/com/baeldung/arraycopy/model/Employee.java rename to core-java-arrays/src/main/java/com/baeldung/arraycopy/model/Employee.java diff --git a/core-java/src/test/java/com/baeldung/array/ArrayInitializerUnitTest.java b/core-java-arrays/src/test/java/com/baeldung/array/ArrayInitializerUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/array/ArrayInitializerUnitTest.java rename to core-java-arrays/src/test/java/com/baeldung/array/ArrayInitializerUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/array/ArrayInverterUnitTest.java b/core-java-arrays/src/test/java/com/baeldung/array/ArrayInverterUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/array/ArrayInverterUnitTest.java rename to core-java-arrays/src/test/java/com/baeldung/array/ArrayInverterUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/array/Find2ndLargestInArrayUnitTest.java b/core-java-arrays/src/test/java/com/baeldung/array/Find2ndLargestInArrayUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/array/Find2ndLargestInArrayUnitTest.java rename to core-java-arrays/src/test/java/com/baeldung/array/Find2ndLargestInArrayUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/array/FindElementInArrayUnitTest.java b/core-java-arrays/src/test/java/com/baeldung/array/FindElementInArrayUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/array/FindElementInArrayUnitTest.java rename to core-java-arrays/src/test/java/com/baeldung/array/FindElementInArrayUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/array/JaggedArrayUnitTest.java b/core-java-arrays/src/test/java/com/baeldung/array/JaggedArrayUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/array/JaggedArrayUnitTest.java rename to core-java-arrays/src/test/java/com/baeldung/array/JaggedArrayUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/array/SumAndAverageInArrayUnitTest.java b/core-java-arrays/src/test/java/com/baeldung/array/SumAndAverageInArrayUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/array/SumAndAverageInArrayUnitTest.java rename to core-java-arrays/src/test/java/com/baeldung/array/SumAndAverageInArrayUnitTest.java diff --git a/core-java-collections/src/test/java/com/baeldung/array/operations/ArrayOperationsUnitTest.java b/core-java-arrays/src/test/java/com/baeldung/array/operations/ArrayOperationsUnitTest.java similarity index 100% rename from core-java-collections/src/test/java/com/baeldung/array/operations/ArrayOperationsUnitTest.java rename to core-java-arrays/src/test/java/com/baeldung/array/operations/ArrayOperationsUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/arraycopy/ArrayCopyUtilUnitTest.java b/core-java-arrays/src/test/java/com/baeldung/arraycopy/ArrayCopyUtilUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/arraycopy/ArrayCopyUtilUnitTest.java rename to core-java-arrays/src/test/java/com/baeldung/arraycopy/ArrayCopyUtilUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/arrays/ArraysUnitTest.java b/core-java-arrays/src/test/java/com/baeldung/arrays/ArraysUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/arrays/ArraysUnitTest.java rename to core-java-arrays/src/test/java/com/baeldung/arrays/ArraysUnitTest.java diff --git a/core-java/src/main/java/com/baeldung/doubles/SplitFloatingPointNumbers.java b/core-java-lang/src/main/java/com/baeldung/doubles/SplitFloatingPointNumbers.java similarity index 100% rename from core-java/src/main/java/com/baeldung/doubles/SplitFloatingPointNumbers.java rename to core-java-lang/src/main/java/com/baeldung/doubles/SplitFloatingPointNumbers.java diff --git a/core-java/src/main/java/com/baeldung/inheritancecomposition/application/Application.java b/core-java-lang/src/main/java/com/baeldung/inheritancecomposition/application/Application.java similarity index 100% rename from core-java/src/main/java/com/baeldung/inheritancecomposition/application/Application.java rename to core-java-lang/src/main/java/com/baeldung/inheritancecomposition/application/Application.java diff --git a/core-java/src/main/java/com/baeldung/inheritancecomposition/model/Actress.java b/core-java-lang/src/main/java/com/baeldung/inheritancecomposition/model/Actress.java similarity index 100% rename from core-java/src/main/java/com/baeldung/inheritancecomposition/model/Actress.java rename to core-java-lang/src/main/java/com/baeldung/inheritancecomposition/model/Actress.java diff --git a/core-java/src/main/java/com/baeldung/inheritancecomposition/model/Computer.java b/core-java-lang/src/main/java/com/baeldung/inheritancecomposition/model/Computer.java similarity index 100% rename from core-java/src/main/java/com/baeldung/inheritancecomposition/model/Computer.java rename to core-java-lang/src/main/java/com/baeldung/inheritancecomposition/model/Computer.java diff --git a/core-java/src/main/java/com/baeldung/inheritancecomposition/model/Memory.java b/core-java-lang/src/main/java/com/baeldung/inheritancecomposition/model/Memory.java similarity index 100% rename from core-java/src/main/java/com/baeldung/inheritancecomposition/model/Memory.java rename to core-java-lang/src/main/java/com/baeldung/inheritancecomposition/model/Memory.java diff --git a/core-java/src/main/java/com/baeldung/inheritancecomposition/model/Person.java b/core-java-lang/src/main/java/com/baeldung/inheritancecomposition/model/Person.java similarity index 100% rename from core-java/src/main/java/com/baeldung/inheritancecomposition/model/Person.java rename to core-java-lang/src/main/java/com/baeldung/inheritancecomposition/model/Person.java diff --git a/core-java/src/main/java/com/baeldung/inheritancecomposition/model/Processor.java b/core-java-lang/src/main/java/com/baeldung/inheritancecomposition/model/Processor.java similarity index 100% rename from core-java/src/main/java/com/baeldung/inheritancecomposition/model/Processor.java rename to core-java-lang/src/main/java/com/baeldung/inheritancecomposition/model/Processor.java diff --git a/core-java/src/main/java/com/baeldung/inheritancecomposition/model/SoundCard.java b/core-java-lang/src/main/java/com/baeldung/inheritancecomposition/model/SoundCard.java similarity index 100% rename from core-java/src/main/java/com/baeldung/inheritancecomposition/model/SoundCard.java rename to core-java-lang/src/main/java/com/baeldung/inheritancecomposition/model/SoundCard.java diff --git a/core-java/src/main/java/com/baeldung/inheritancecomposition/model/StandardMemory.java b/core-java-lang/src/main/java/com/baeldung/inheritancecomposition/model/StandardMemory.java similarity index 100% rename from core-java/src/main/java/com/baeldung/inheritancecomposition/model/StandardMemory.java rename to core-java-lang/src/main/java/com/baeldung/inheritancecomposition/model/StandardMemory.java diff --git a/core-java/src/main/java/com/baeldung/inheritancecomposition/model/StandardProcessor.java b/core-java-lang/src/main/java/com/baeldung/inheritancecomposition/model/StandardProcessor.java similarity index 100% rename from core-java/src/main/java/com/baeldung/inheritancecomposition/model/StandardProcessor.java rename to core-java-lang/src/main/java/com/baeldung/inheritancecomposition/model/StandardProcessor.java diff --git a/core-java/src/main/java/com/baeldung/inheritancecomposition/model/StandardSoundCard.java b/core-java-lang/src/main/java/com/baeldung/inheritancecomposition/model/StandardSoundCard.java similarity index 100% rename from core-java/src/main/java/com/baeldung/inheritancecomposition/model/StandardSoundCard.java rename to core-java-lang/src/main/java/com/baeldung/inheritancecomposition/model/StandardSoundCard.java diff --git a/core-java/src/main/java/com/baeldung/inheritancecomposition/model/Waitress.java b/core-java-lang/src/main/java/com/baeldung/inheritancecomposition/model/Waitress.java similarity index 100% rename from core-java/src/main/java/com/baeldung/inheritancecomposition/model/Waitress.java rename to core-java-lang/src/main/java/com/baeldung/inheritancecomposition/model/Waitress.java diff --git a/core-java/src/main/java/com/baeldung/sneakythrows/SneakyRunnable.java b/core-java-lang/src/main/java/com/baeldung/sneakythrows/SneakyRunnable.java similarity index 100% rename from core-java/src/main/java/com/baeldung/sneakythrows/SneakyRunnable.java rename to core-java-lang/src/main/java/com/baeldung/sneakythrows/SneakyRunnable.java diff --git a/core-java/src/main/java/com/baeldung/sneakythrows/SneakyThrows.java b/core-java-lang/src/main/java/com/baeldung/sneakythrows/SneakyThrows.java similarity index 100% rename from core-java/src/main/java/com/baeldung/sneakythrows/SneakyThrows.java rename to core-java-lang/src/main/java/com/baeldung/sneakythrows/SneakyThrows.java diff --git a/core-java/src/test/java/com/baeldung/inheritancecomposition/test/ActressUnitTest.java b/core-java-lang/src/test/java/com/baeldung/inheritancecomposition/test/ActressUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/inheritancecomposition/test/ActressUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/inheritancecomposition/test/ActressUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/inheritancecomposition/test/CompositionUnitTest.java b/core-java-lang/src/test/java/com/baeldung/inheritancecomposition/test/CompositionUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/inheritancecomposition/test/CompositionUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/inheritancecomposition/test/CompositionUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/inheritancecomposition/test/InheritanceUnitTest.java b/core-java-lang/src/test/java/com/baeldung/inheritancecomposition/test/InheritanceUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/inheritancecomposition/test/InheritanceUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/inheritancecomposition/test/InheritanceUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/inheritancecomposition/test/PersonUnitTest.java b/core-java-lang/src/test/java/com/baeldung/inheritancecomposition/test/PersonUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/inheritancecomposition/test/PersonUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/inheritancecomposition/test/PersonUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/inheritancecomposition/test/WaitressUnitTest.java b/core-java-lang/src/test/java/com/baeldung/inheritancecomposition/test/WaitressUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/inheritancecomposition/test/WaitressUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/inheritancecomposition/test/WaitressUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/sneakythrows/SneakyRunnableUnitTest.java b/core-java-lang/src/test/java/com/baeldung/sneakythrows/SneakyRunnableUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/sneakythrows/SneakyRunnableUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/sneakythrows/SneakyRunnableUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/sneakythrows/SneakyThrowsUnitTest.java b/core-java-lang/src/test/java/com/baeldung/sneakythrows/SneakyThrowsUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/sneakythrows/SneakyThrowsUnitTest.java rename to core-java-lang/src/test/java/com/baeldung/sneakythrows/SneakyThrowsUnitTest.java