Skip to content

Commit 4cb0781

Browse files
author
mikr
committed
JAVA-1749 Move modules language interop and console
1 parent 76dbb91 commit 4cb0781

17 files changed

Lines changed: 214 additions & 9 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#Core Java Console
2+
3+
[Read and Write User Input in Java](http://www.baeldung.com/java-console-input-output)
4+
[Formatting with printf() in Java](https://www.baeldung.com/java-printstream-printf)
5+
[ASCII Art in Java](http://www.baeldung.com/ascii-art-in-java)
Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project
3+
xmlns="http://maven.apache.org/POM/4.0.0"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
6+
<modelVersion>4.0.0</modelVersion>
7+
<artifactId>core-java-console</artifactId>
8+
<version>0.1.0-SNAPSHOT</version>
9+
<name>core-java-console</name>
10+
<packaging>jar</packaging>
11+
<parent>
12+
<groupId>com.baeldung.core-java-modules</groupId>
13+
<artifactId>core-java-modules</artifactId>
14+
<version>0.0.1-SNAPSHOT</version>
15+
<relativePath>../</relativePath>
16+
</parent>
17+
18+
<build>
19+
<finalName>core-java-console</finalName>
20+
<resources>
21+
<resource>
22+
<directory>src/main/resources</directory>
23+
<filtering>true</filtering>
24+
</resource>
25+
</resources>
26+
27+
<plugins>
28+
<plugin>
29+
<groupId>org.apache.maven.plugins</groupId>
30+
<artifactId>maven-dependency-plugin</artifactId>
31+
<executions>
32+
<execution>
33+
<id>copy-dependencies</id>
34+
<phase>prepare-package</phase>
35+
<goals>
36+
<goal>copy-dependencies</goal>
37+
</goals>
38+
<configuration>
39+
<outputDirectory>${project.build.directory}/libs</outputDirectory>
40+
</configuration>
41+
</execution>
42+
</executions>
43+
</plugin>
44+
45+
<plugin>
46+
<groupId>org.codehaus.mojo</groupId>
47+
<artifactId>exec-maven-plugin</artifactId>
48+
<version>${exec-maven-plugin.version}</version>
49+
<configuration>
50+
<executable>java</executable>
51+
<mainClass>com.baeldung.outofmemoryerror.OutOfMemoryGCLimitExceed</mainClass>
52+
<arguments>
53+
<argument>-Xmx300m</argument>
54+
<argument>-XX:+UseParallelGC</argument>
55+
<argument>-classpath</argument>
56+
<classpath />
57+
<argument>com.baeldung.outofmemoryerror.OutOfMemoryGCLimitExceed</argument>
58+
</arguments>
59+
</configuration>
60+
</plugin>
61+
62+
<plugin>
63+
<groupId>org.apache.maven.plugins</groupId>
64+
<artifactId>maven-javadoc-plugin</artifactId>
65+
<version>${maven-javadoc-plugin.version}</version>
66+
<configuration>
67+
<source>${source.version}</source>
68+
<target>${target.version}</target>
69+
</configuration>
70+
</plugin>
71+
</plugins>
72+
</build>
73+
74+
<profiles>
75+
<profile>
76+
<id>integration</id>
77+
<build>
78+
<plugins>
79+
<plugin>
80+
<groupId>org.apache.maven.plugins</groupId>
81+
<artifactId>maven-surefire-plugin</artifactId>
82+
<executions>
83+
<execution>
84+
<phase>integration-test</phase>
85+
<goals>
86+
<goal>test</goal>
87+
</goals>
88+
<configuration>
89+
<excludes>
90+
<exclude>**/*ManualTest.java</exclude>
91+
</excludes>
92+
<includes>
93+
<include>**/*IntegrationTest.java</include>
94+
<include>**/*IntTest.java</include>
95+
</includes>
96+
</configuration>
97+
</execution>
98+
</executions>
99+
<configuration>
100+
<systemPropertyVariables>
101+
<test.mime>json</test.mime>
102+
</systemPropertyVariables>
103+
</configuration>
104+
</plugin>
105+
<plugin>
106+
<groupId>org.codehaus.mojo</groupId>
107+
<artifactId>exec-maven-plugin</artifactId>
108+
<version>${exec-maven-plugin.version}</version>
109+
<executions>
110+
<execution>
111+
<id>run-benchmarks</id>
112+
<!-- <phase>integration-test</phase> -->
113+
<phase>none</phase>
114+
<goals>
115+
<goal>exec</goal>
116+
</goals>
117+
<configuration>
118+
<classpathScope>test</classpathScope>
119+
<executable>java</executable>
120+
<arguments>
121+
<argument>-classpath</argument>
122+
<classpath />
123+
<argument>org.openjdk.jmh.Main</argument>
124+
<argument>.*</argument>
125+
</arguments>
126+
</configuration>
127+
</execution>
128+
</executions>
129+
</plugin>
130+
</plugins>
131+
</build>
132+
</profile>
133+
</profiles>
134+
135+
<properties>
136+
<maven-javadoc-plugin.version>3.0.0-M1</maven-javadoc-plugin.version>
137+
<exec-maven-plugin.version>1.6.0</exec-maven-plugin.version>
138+
<source.version>1.8</source.version>
139+
<target.version>1.8</target.version>
140+
</properties>
141+
142+
</project>

core-java-modules/core-java/src/main/java/com/baeldung/asciiart/AsciiArt.java renamed to core-java-modules/core-java-console/src/main/java/com/baeldung/asciiart/AsciiArt.java

File renamed without changes.

core-java-modules/core-java/src/main/java/com/baeldung/console/ConsoleConsoleClass.java renamed to core-java-modules/core-java-console/src/main/java/com/baeldung/console/ConsoleConsoleClass.java

File renamed without changes.

core-java-modules/core-java/src/main/java/com/baeldung/console/ConsoleScannerClass.java renamed to core-java-modules/core-java-console/src/main/java/com/baeldung/console/ConsoleScannerClass.java

File renamed without changes.

core-java-modules/core-java/src/main/java/com/baeldung/printf/PrintfExamples.java renamed to core-java-modules/core-java-console/src/main/java/com/baeldung/printf/PrintfExamples.java

File renamed without changes.

core-java-modules/core-java/src/test/java/com/baeldung/asciiart/AsciiArtIntegrationTest.java renamed to core-java-modules/core-java-console/src/test/java/com/baeldung/asciiart/AsciiArtIntegrationTest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
package com.baeldung.asciiart;
22

3-
import java.awt.Font;
4-
3+
import com.baeldung.asciiart.AsciiArt.Settings;
54
import org.junit.Test;
65

7-
import com.baeldung.asciiart.AsciiArt.Settings;
6+
import java.awt.*;
87

98
public class AsciiArtIntegrationTest {
109

@@ -15,6 +14,8 @@ public void givenTextWithAsciiCharacterAndSettings_shouldPrintAsciiArt() {
1514
Settings settings = asciiArt.new Settings(new Font("SansSerif", Font.BOLD, 24), text.length() * 30, 30); // 30 pixel width per character
1615

1716
asciiArt.drawString(text, "*", settings);
17+
18+
throw new NullPointerException();
1819
}
1920

2021
}

core-java-modules/core-java/README.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,63 @@
3333
- [Making a JSON POST Request With HttpURLConnection](https://www.baeldung.com/httpurlconnection-post)
3434
- [How to Find an Exception’s Root Cause in Java](https://www.baeldung.com/java-exception-root-cause)
3535
- [Convert Hex to ASCII in Java](https://www.baeldung.com/java-convert-hex-to-ascii)
36+
37+
38+
#New module structure
39+
###########################
40+
41+
#Leave in core-java:
42+
[Getting Started with Java Properties](http://www.baeldung.com/java-properties)
43+
[Java Money and the Currency API](http://www.baeldung.com/java-money-and-currency)
44+
[Introduction to Java Serialization](http://www.baeldung.com/java-serialization)
45+
[Guide to UUID in Java](http://www.baeldung.com/java-uuid)
46+
[Compiling Java *.class Files with javac](http://www.baeldung.com/javac)
47+
[Introduction to Javadoc](http://www.baeldung.com/javadoc)
48+
[Guide to the Externalizable Interface in Java](http://www.baeldung.com/java-externalizable)
49+
[What is the serialVersionUID?](http://www.baeldung.com/java-serial-version-uid)
50+
[A Guide to the ResourceBundle](http://www.baeldung.com/java-resourcebundle)
51+
[Merging java.util.Properties Objects](https://www.baeldung.com/java-merging-properties)
52+
53+
#Move to language interop (Done)
54+
[Introduction to Nashorn](http://www.baeldung.com/java-nashorn)
55+
56+
#Move to new new package: core-java-console (Done)
57+
[Read and Write User Input in Java](http://www.baeldung.com/java-console-input-output)
58+
[Formatting with printf() in Java](https://www.baeldung.com/java-printstream-printf)
59+
[ASCII Art in Java](http://www.baeldung.com/ascii-art-in-java)
60+
61+
#Move to core-java-string-operations-2
62+
[Guide to Character Encoding](https://www.baeldung.com/java-char-encoding)
63+
[Convert Hex to ASCII in Java](https://www.baeldung.com/java-convert-hex-to-ascii) #remove additional readme file
64+
65+
#Move to core-javadatetime-operations-2
66+
[Finding Leap Years in Java](https://www.baeldung.com/java-leap-year)
67+
68+
#Move to core-java-time-measurements
69+
[Java Timer](http://www.baeldung.com/java-timer-and-timertask)
70+
71+
#Move to core-java-reflection
72+
[How to Get a Name of a Method Being Executed?](http://www.baeldung.com/java-name-of-executing-method)
73+
74+
#Move to core-java-streams
75+
[How to Find all Getters Returning Null](http://www.baeldung.com/java-getters-returning-null)
76+
77+
#Move to core-java-jvm
78+
[How to Get the Size of an Object in Java](http://www.baeldung.com/java-size-of-object)
79+
80+
#Move to data-structures module
81+
[Graphs in Java](https://www.baeldung.com/java-graphs)
82+
83+
#Move to core-java-collections-3
84+
[Quick Guide to the Java Stack](https://www.baeldung.com/java-stack)
85+
86+
#These are already in another module
87+
[Using Curl in Java](https://www.baeldung.com/java-curl) #Core Java Networking (Part 2)
88+
[Creating a Java Compiler Plugin](http://www.baeldung.com/java-build-compiler-plugin) # Core Java Sun
89+
[Java Global Exception Handler](http://www.baeldung.com/java-global-exception-handler) #Core Java Exceptions
90+
[Java – Try with Resources](https://www.baeldung.com/java-try-with-resources) #Core Java Exceptions
91+
[How to Find an Exception’s Root Cause in Java](https://www.baeldung.com/java-exception-root-cause) #Core Java Exceptions
92+
[JVM Log Forging](http://www.baeldung.com/jvm-log-forging) #Core Java JVM
93+
[Making a JSON POST Request With HttpURLConnection](https://www.baeldung.com/httpurlconnection-post) #Core Java Networking (Part 2)
94+
[Common Java Exceptions](http://www.baeldung.com/java-common-exceptions) #Core Java Exceptions
95+
[Retrieve Fields from a Java Class Using Reflection](https://www.baeldung.com/java-reflection-class-fields) #Core Java Reflection

language-interop/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ This module contains articles about Java interop with other language integration
55
### Relevant Articles:
66

77
- [How to Call Python From Java](https://www.baeldung.com/java-working-with-python)
8+
- [Introduction to Nashorn](http://www.baeldung.com/java-nashorn)
File renamed without changes.

0 commit comments

Comments
 (0)