Skip to content

Commit b448702

Browse files
authored
[JAVA-41968] Moving some article links on Github - core-groovy-modules (#18149)
1 parent 6854099 commit b448702

38 files changed

+96
-34
lines changed

core-groovy-modules/core-groovy-2/README.md

+1-4
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,12 @@ This module contains articles about core Groovy concepts
44

55
## Relevant articles:
66

7-
- [Template Engines in Groovy](https://www.baeldung.com/groovy-template-engines)
87
- [Groovy def Keyword](https://www.baeldung.com/groovy-def-keyword)
98
- [Integrating Groovy into Java Applications](https://www.baeldung.com/groovy-java-applications)
109
- [Concatenate Strings with Groovy](https://www.baeldung.com/groovy-concatenate-strings)
11-
- [Metaprogramming in Groovy](https://www.baeldung.com/groovy-metaprogramming)
1210
- [A Quick Guide to Working with Web Services in Groovy](https://www.baeldung.com/groovy-web-services)
13-
- [Categories in Groovy](https://www.baeldung.com/groovy-categories)
1411
- [How to Determine the Data Type in Groovy](https://www.baeldung.com/groovy-determine-data-type)
1512
- [Converting a String to a Date in Groovy](https://www.baeldung.com/groovy-string-to-date)
1613
- [Convert String to Integer in Groovy](https://www.baeldung.com/groovy-convert-string-to-integer)
1714
- [Groovy Variable Scope](https://www.baeldung.com/groovy/variable-scope)
18-
- [[<-- Prev]](/core-groovy-modules/core-groovy)
15+
- More articles: [[<-- prev]](../core-groovy) [[next -->]](../core-groovy-3)

core-groovy-modules/core-groovy-2/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
<version>${commons-lang3.version}</version>
2828
</dependency>
2929
<dependency>
30-
<groupId>org.codehaus.groovy</groupId>
30+
<groupId>org.apache.groovy</groupId>
3131
<artifactId>groovy-all</artifactId>
32-
<version>${groovy.version}</version>
32+
<version>${groovy-all.version}</version>
3333
<type>pom</type>
3434
</dependency>
3535
<dependency>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Core Groovy
2+
3+
This module contains articles about core Groovy concepts
4+
5+
## Relevant articles:
6+
7+
- [An Introduction to Traits in Groovy](https://www.baeldung.com/groovy-traits)
8+
- [JDBC with Groovy](https://www.baeldung.com/jdbc-groovy)
9+
- [Guide to I/O in Groovy](https://www.baeldung.com/groovy-io)
10+
- [Metaprogramming in Groovy](https://www.baeldung.com/groovy-metaprogramming)
11+
- [Template Engines in Groovy](https://www.baeldung.com/groovy-template-engines)
12+
- [Categories in Groovy](https://www.baeldung.com/groovy-categories)
13+
- More articles: [[<-- prev]](../core-groovy-2)
14+
+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
<artifactId>core-groovy-3</artifactId>
7+
<name>core-groovy-3</name>
8+
<packaging>jar</packaging>
9+
10+
<parent>
11+
<groupId>com.baeldung</groupId>
12+
<artifactId>core-groovy-modules</artifactId>
13+
<version>1.0.0-SNAPSHOT</version>
14+
</parent>
15+
16+
<dependencies>
17+
<dependency>
18+
<groupId>org.apache.groovy</groupId>
19+
<artifactId>groovy</artifactId>
20+
<version>${groovy.version}</version>
21+
</dependency>
22+
<dependency>
23+
<groupId>org.apache.groovy</groupId>
24+
<artifactId>groovy-all</artifactId>
25+
<version>${groovy-all.version}</version>
26+
<type>pom</type>
27+
</dependency>
28+
<dependency>
29+
<groupId>org.spockframework</groupId>
30+
<artifactId>spock-core</artifactId>
31+
<version>${spock-core.version}</version>
32+
<scope>test</scope>
33+
</dependency>
34+
</dependencies>
35+
36+
<build>
37+
<plugins>
38+
<plugin>
39+
<groupId>org.codehaus.gmavenplus</groupId>
40+
<artifactId>gmavenplus-plugin</artifactId>
41+
<version>${gmavenplus-plugin.version}</version>
42+
<executions>
43+
<execution>
44+
<goals>
45+
<goal>addSources</goal>
46+
<goal>addTestSources</goal>
47+
<goal>compile</goal>
48+
<goal>compileTests</goal>
49+
</goals>
50+
</execution>
51+
</executions>
52+
</plugin>
53+
</plugins>
54+
</build>
55+
56+
</project>
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
package com.baeldung
1+
package com.baeldung.traits
22

33
class Car implements VehicleTrait {}

core-groovy-modules/core-groovy/src/main/groovy/com/baeldung/traits/VehicleTrait.groovy renamed to core-groovy-modules/core-groovy-3/src/main/groovy/com/baeldung/traits/VehicleTrait.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.baeldung
1+
package com.baeldung.traits
22

33
trait VehicleTrait extends WheelTrait {
44

core-groovy-modules/core-groovy/src/main/groovy/com/baeldung/traits/WheelTrait.groovy renamed to core-groovy-modules/core-groovy-3/src/main/groovy/com/baeldung/traits/WheelTrait.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.baeldung
1+
package com.baeldung.traits
22

33
trait WheelTrait {
44

Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
moduleName=core-groovy-2
1+
moduleName=core-groovy-3
22
moduleVersion=1.0-SNAPSHOT
33
extensionClasses=com.baeldung.metaprogramming.extension.BasicExtensions
44
staticExtensionClasses=com.baeldung.metaprogramming.extension.StaticEmployeeExtension

core-groovy-modules/core-groovy-2/src/test/groovy/com/baeldung/category/CategoryUnitTest.groovy renamed to core-groovy-modules/core-groovy-3/src/test/groovy/com/baeldung/category/CategoryUnitTest.groovy

+9-3
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@ package com.baeldung.category
22

33
import groovy.time.TimeCategory
44
import groovy.xml.DOMBuilder
5-
import groovy.xml.QName
65
import groovy.xml.dom.DOMCategory
6+
import org.junit.Test
77

88
import java.text.SimpleDateFormat
99

10-
class CategoryUnitTest extends GroovyTestCase {
10+
class CategoryUnitTest {
1111

12+
@Test
1213
void test_whenUsingTimeCategory_thenOperationOnDate() {
1314
def jan_1_2019 = new Date("01/01/2019")
1415
use(TimeCategory) {
@@ -28,6 +29,7 @@ class CategoryUnitTest extends GroovyTestCase {
2829
}
2930
}
3031

32+
@Test
3133
void test_whenUsingTimeCategory_thenOperationOnNumber() {
3234
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy")
3335
use(TimeCategory) {
@@ -39,6 +41,7 @@ class CategoryUnitTest extends GroovyTestCase {
3941
}
4042
}
4143

44+
@Test
4245
void test_whenUsingDOMCategory_thenOperationOnXML() {
4346

4447
def baeldungArticlesText = """
@@ -65,7 +68,7 @@ class CategoryUnitTest extends GroovyTestCase {
6568
assert articles[0].title.text() == "An Intro to the Java Debug Interface (JDI)"
6669
assert articles[1].desc.text() == "Learn how to work with Web Services in Groovy."
6770

68-
def articleNode3 = root.appendNode(new QName("article"), ["core-java": "false"])
71+
def articleNode3 = root.appendNode(new groovy.namespace.QName("article"), ["core-java": "false"])
6972

7073
articleNode3.appendNode("title", "Metaprogramming in Groovy")
7174
articleNode3.appendNode("desc", "Explore the concept of runtime and compile-time metaprogramming in Groovy")
@@ -76,19 +79,22 @@ class CategoryUnitTest extends GroovyTestCase {
7679
}
7780
}
7881

82+
@Test
7983
void test_whenUsingBaeldungCategory_thenCapitalizeString() {
8084
use(BaeldungCategory) {
8185
assert "norman".capitalize() == "Norman"
8286
}
8387
}
8488

89+
@Test
8590
void test_whenUsingBaeldungCategory_thenOperationsOnNumber() {
8691
use(BaeldungCategory) {
8792
assert 50.toThePower(2) == 2500
8893
assert 2.4.toThePower(4) == 33.1776
8994
}
9095
}
9196

97+
@Test
9298
void test_whenUsingNumberCategory_thenOperationsOnNumber() {
9399
use(NumberCategory) {
94100
assert 3.cube() == 27

core-groovy-modules/core-groovy/src/test/groovy/com/baeldung/io/DataAndObjectsUnitTest.groovy renamed to core-groovy-modules/core-groovy-3/src/test/groovy/com/baeldung/io/DataAndObjectsUnitTest.groovy

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
package com.baeldung.io
22

3-
import static org.junit.Assert.*
4-
53
import org.junit.Test
64

5+
import static org.junit.Assert.assertEquals
6+
77
class DataAndObjectsUnitTest {
88
@Test
99
void whenUsingWithDataOutputStream_thenDataIsSerializedToAFile() {

core-groovy-modules/core-groovy/src/test/groovy/com/baeldung/io/ReadExampleUnitTest.groovy renamed to core-groovy-modules/core-groovy-3/src/test/groovy/com/baeldung/io/ReadExampleUnitTest.groovy

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
package com.baeldung.io
22

3-
import static org.junit.Assert.*
43
import org.junit.Test
54

5+
import static org.junit.Assert.*
6+
67
class ReadExampleUnitTest {
78

89
@Test

core-groovy-modules/core-groovy/src/test/groovy/com/baeldung/io/WriteExampleUnitTest.groovy renamed to core-groovy-modules/core-groovy-3/src/test/groovy/com/baeldung/io/WriteExampleUnitTest.groovy

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
package com.baeldung.io
22

3-
import static org.junit.Assert.*
4-
53
import org.junit.Before
64
import org.junit.Test
75

6+
import static org.junit.Assert.assertEquals
7+
88
class WriteExampleUnitTest {
99
@Before
1010
void clearOutputFile() {

core-groovy-modules/core-groovy/src/test/groovy/com/baeldung/groovy/sql/SqlTest.groovy renamed to core-groovy-modules/core-groovy-3/src/test/groovy/com/baeldung/sql/SqlTest.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.baeldung.groovy.sql
1+
package com.baeldung.sql
22

33
import groovy.sql.GroovyResultSet
44
import groovy.sql.Sql

core-groovy-modules/core-groovy-collections/pom.xml

-5
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,6 @@
3030
<artifactId>groovy-dateutil</artifactId>
3131
<version>${groovy.version}</version>
3232
</dependency>
33-
<dependency>
34-
<groupId>org.apache.groovy</groupId>
35-
<artifactId>groovy-sql</artifactId>
36-
<version>${groovy-sql.version}</version>
37-
</dependency>
3833
<dependency>
3934
<groupId>org.junit.platform</groupId>
4035
<artifactId>junit-platform-runner</artifactId>

core-groovy-modules/core-groovy/README.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@ This module contains articles about core Groovy concepts
44

55
## Relevant articles:
66

7-
- [JDBC with Groovy](https://www.baeldung.com/jdbc-groovy)
87
- [Working with JSON in Groovy](https://www.baeldung.com/groovy-json)
98
- [Reading a File in Groovy](https://www.baeldung.com/groovy-file-read)
109
- [Types of Strings in Groovy](https://www.baeldung.com/groovy-strings)
11-
- [An Introduction to Traits in Groovy](https://www.baeldung.com/groovy-traits)
1210
- [Closures in Groovy](https://www.baeldung.com/groovy-closures)
13-
- [Guide to I/O in Groovy](https://www.baeldung.com/groovy-io)
1411
- [Pattern Matching in Strings in Groovy](https://www.baeldung.com/groovy-pattern-matching)
1512
- [Working with XML in Groovy](https://www.baeldung.com/groovy-xml)
16-
- [[More -->]](/core-groovy-2)
13+
- More articles: [[next -->]](../core-groovy-2)
14+

core-groovy-modules/core-groovy/pom.xml

-5
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,6 @@
3030
<artifactId>groovy-dateutil</artifactId>
3131
<version>${groovy.version}</version>
3232
</dependency>
33-
<dependency>
34-
<groupId>org.apache.groovy</groupId>
35-
<artifactId>groovy-sql</artifactId>
36-
<version>${groovy-sql.version}</version>
37-
</dependency>
3833
<dependency>
3934
<groupId>org.junit.platform</groupId>
4035
<artifactId>junit-platform-runner</artifactId>

core-groovy-modules/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616
<modules>
1717
<module>core-groovy</module>
1818
<module>core-groovy-2</module> <!-- We cannot upgrade this module to the JDK 21 since groovy-wslite and other dependencies are not updated for a while. JAVA-37702-->
19+
<module>core-groovy-3</module>
1920
<module>core-groovy-collections</module>
2021
<module>core-groovy-strings</module>
2122
</modules>
2223

2324
<properties>
2425
<groovy.version>4.0.21</groovy.version>
2526
<groovy-all.version>4.0.21</groovy-all.version>
26-
<groovy-sql.version>4.0.21</groovy-sql.version>
2727
<hsqldb.version>2.7.1</hsqldb.version>
2828
<spock-core.version>2.4-M4-groovy-4.0</spock-core.version>
2929
<gmavenplus-plugin.version>3.0.0</gmavenplus-plugin.version>

0 commit comments

Comments
 (0)