Skip to content

Review feedback from following guide #31

@fritze2

Description

@fritze2

Hi Gilbert and Morgan,

The guide looks great and I think its informative. I did find some minor issues that you may want to follow up on.


Spelling error in units. Could change to ft and in so pluralization doesn't matter.

Height Converter
Height in centimeters: 100 cm
Height in feet and inches: 3 feets 3 inches

->

Height in feet and inches: 3 feet 3 inches

or

Height in feet and inches: 3 ft 3 in


Height Converter
Height in centimeters: 35 cm
Height in feet and inches: 1 feets 1 inches

->

Height in feet and inches: 1 foot 1 inch

or

Height in feet and inches: 1 ft 1 in


As you might have noticed, each module has its own build.gradle file. Each module has its own build.gradle file because each module is treated as an independent project.

->

As you might have noticed, each module has its own build.gradle file because each module is treated as an independent project.


To me, naming the projects jar, war and ear seems like overloading the terms because jar is a task name in Gradle. To someone unfamiliar with Gradle, I think I'd be confused by the project names being the same as the task names:
war.dependsOn ':jar:jar'
I would include the term project in the directory names either dot separated, hyphenated or camel case. Just a suggestion and my preference. Seems like a minor thing, but thought I'd mention it. Its a nitpick though, so I don't think it needs to be changed.


The default artifact ID is {pojectName}-{moduleName}-{version}, like guide-gradle-multimodules-war-1.0-SNAPSHOT.

->

The default artifact ID is {projectName}-{moduleName}-{version}, like guide-gradle-multimodules-war-1.0-SNAPSHOT.


To deploy and run an EAR application on an Open Liberty instance, you need to provide a Liberty’s server.xml configuration file.

->

To deploy and run an EAR application on an Open Liberty instance, you need to provide a Liberty server.xml configuration file.


When you run Open Liberty in dev mode, dev mode listens for file changes and automatically recompiles and deploys your updates whenever you save a new change.

->

When you run Open Liberty in dev mode, the server listens for file changes and automatically recompiles and deploys your updates whenever you save a new change.


Following along up to this point (https://guides-draft-openlibertyio.mqj6zf7jocq.us-south.codeengine.appdomain.cloud/guides/gradle-multimodules.html#running-the-tests), I did not get passing tests that match the guide's expected output. I'm not sure if I made a mistake, or if I followed the guide correctly.

Waiting up to 30 seconds to find the application start up or update message...

CWWKM2010I: Searching for (CWWKZ0001I:|CWWKZ0003I:) in /Users/erfritz/workspace/websphere/docs/guides/draft-guide-gradle-multimodules/start/ear/build/wlp/usr/servers/sampleLibertyServer/logs/messages.log. This search will timeout after 30 seconds.
CWWKM2015I: Match number: 1 is [3/13/25, 16:00:19:358 EDT] 00000037 com.ibm.ws.app.manager.AppMessageHelper                      A CWWKZ0001I: Application guide-gradle-multimodules-ear started in 0.723 seconds..
> Task :ear:cleanTest UP-TO-DATE
> Task :jar:cleanTest UP-TO-DATE
> Task :war:cleanTest UP-TO-DATE
> Task :ear:compileJava NO-SOURCE
> Task :ear:processResources NO-SOURCE
> Task :ear:classes UP-TO-DATE
> Task :ear:compileTestJava UP-TO-DATE
> Task :ear:processTestResources NO-SOURCE
> Task :ear:testClasses UP-TO-DATE

> Task :ear:libertyDev
Running tests...


> Task :ear:test FAILED

IT > testHeightsPage() FAILED
    java.net.MalformedURLException at IT.java:37
        Caused by: java.lang.NumberFormatException at IT.java:37

IT > testIndexPage() FAILED
    java.net.MalformedURLException at IT.java:37
        Caused by: java.lang.NumberFormatException at IT.java:37

2 tests completed, 2 failed

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':ear:test'.
> There were failing tests. See the report at: file:///Users/erfritz/workspace/websphere/docs/guides/draft-guide-gradle-multimodules/start/ear/build/reports/tests/test/index.html

* Try:
> Run with --scan to get full insights.

BUILD FAILED in 2s
5 actionable tasks: 1 executed, 4 up-to-date
> Task :ear:cleanTest
> Task :jar:cleanTest UP-TO-DATE
> Task :war:cleanTest UP-TO-DATE
> Task :ear:compileJava NO-SOURCE
> Task :ear:processResources NO-SOURCE
> Task :ear:classes UP-TO-DATE
> Task :ear:compileTestJava UP-TO-DATE
> Task :ear:processTestResources NO-SOURCE
> Task :ear:testClasses UP-TO-DATE

> Task :ear:libertyDev
Tests finished.
Running tests...


> Task :ear:test FAILED

IT > testHeightsPage() FAILED
    java.net.MalformedURLException at IT.java:37
        Caused by: java.lang.NumberFormatException at IT.java:37

IT > testIndexPage() FAILED
    java.net.MalformedURLException at IT.java:37
        Caused by: java.lang.NumberFormatException at IT.java:37

2 tests completed, 2 failed

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':ear:test'.
> There were failing tests. See the report at: file:///Users/erfritz/workspace/websphere/docs/guides/draft-guide-gradle-multimodules/start/ear/build/reports/tests/test/index.html

* Try:
> Run with --scan to get full insights.

BUILD FAILED in 1s
5 actionable tasks: 2 executed, 3 up-to-date
> Task :ear:cleanTest
> Task :jar:cleanTest UP-TO-DATE
> Task :war:cleanTest UP-TO-DATE
> Task :ear:compileJava NO-SOURCE
> Task :ear:processResources NO-SOURCE
> Task :ear:classes UP-TO-DATE
> Task :ear:compileTestJava UP-TO-DATE
> Task :ear:processTestResources NO-SOURCE
> Task :ear:testClasses UP-TO-DATE

> Task :ear:libertyDev
Tests finished.
Running tests...


> Task :ear:test FAILED

IT > testHeightsPage() FAILED
    java.net.MalformedURLException at IT.java:37
        Caused by: java.lang.NumberFormatException at IT.java:37

IT > testIndexPage() FAILED
    java.net.MalformedURLException at IT.java:37
        Caused by: java.lang.NumberFormatException at IT.java:37

2 tests completed, 2 failed

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':ear:test'.
> There were failing tests. See the report at: file:///Users/erfritz/workspace/websphere/docs/guides/draft-guide-gradle-multimodules/start/ear/build/reports/tests/test/index.html

* Try:
> Run with --scan to get full insights.

BUILD FAILED in 1s
5 actionable tasks: 2 executed, 3 up-to-date

> Task :ear:libertyDev
Tests finished.

There is a .gitkeep file in draft-guide-gradle-multimodules/start/ear/src/test/java/it/io/openliberty/guides/multimodules - should that be removed?


The doc did not tell me to add test task config to ear/build.gradle although I see it in the template file.

test {
    systemProperty 'http.port', liberty.server.var.'http.port'
    enabled = gradle.startParameter.taskNames.contains('test')
}

Hopefully this is helpful! If you need me to follow up, I still have my workspace.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions