Dear Codehaus Cargo enthusiasts
Shortly after our 1.8.0 and 1.8.1 releases, please welcome Codehaus Cargo 1.8.2. This new version comes with many changes under the hood:
We updated our code standards to Java 8 (actually, some were long due since Java 7), including:
Conversion to the easier to read constructs such as switch
over String
s, the beautiful try-with-resources
,
the simplified for-each
loops and compact
multi-catch
statements.
Switching to the better behaving Collection.addAll
(instead of manual population of List
s / Set
s)
and String.join
(instead of manually
created for
loops with booleans checking
if it the first element).
Please note that we didn't go crazy with Lambda expressions: they bring very little benefit in the case of a very procedural process like Codehaus Cargo's (except perhaps for the XML-related parts where we do a lot of filtering), and in case something goes wrong the stack trace is very difficult to read...
While we did these updates, we also revised the Codehaus Cargo CI and enabled Java 6-based container tests. That implied further changes under the hood, for example changes in the version compatibility for the Cargo Samples Test Data modules. These obviously do not have much "visible" impact, yet enabled us to catch some long hidden bugs! See below...
Containers - Resin:
[CARGO-1530]
We fixed the bug where the Resin
3.x container didn't work: ResinRun
was being compiled to work with Java 7 onwards (since
October 2018), yet due to incompatibilities between com.caucho.log.EnvironmentLogger
and the behaviour described in JDK-8015098,
Resin 3.x doesn't run on Java 7 and above! We hence also
build the Codehaus Cargo Resin container with Java 6 as
the minimum version, while Java 8 remains the standard
for all others.
Lesson learnt from this release? Well, if something is not
tested, one should assume it is broken...
To try out this latest version:
Users of the Maven
2 / Maven 3 plugin simply need to use the Codehaus
Cargo plugin version 1.8.2
Users of the Java API can download the new Uberjar from https://repo.maven.apache.org/maven2/org/codehaus/cargo/cargo-core-uberjar/1.8.2/cargo-core-uberjar-1.8.2.jar
Similarly, users of the ANT tasks can download the new ANT tasks from https://repo.maven.apache.org/maven2/org/codehaus/cargo/cargo-ant/1.8.2/cargo-ant-1.8.2.jar
Finally, the ones who want to see the Cargo Daemon can get it from https://repo.maven.apache.org/maven2/org/codehaus/cargo/cargo-daemon-webapp/1.8.2/cargo-daemon-webapp-1.8.2.war and either use the WAR directly as an executable JAR or as a WAR file deployed on another Web container
Enjoy!
-- S. Ali Tokmen http://ali.tokmen.com/ http://contact.ali.tokmen.com/
On 28 Oct 2020, at 06:15, Hantsy Bai <han...@gmail.com> wrote:
Glassfish v6.0 is RC1 now, but unfounfortunately deployment client is not part of GF6, any update to control GF6 in Cargo maven plugin? Thanks.
--
You received this message because you are subscribed to the Google Groups "Codehaus Cargo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codehaus-carg...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/829c6e0c-44a6-4417-86dd-81c958fee7f1n%40googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "Codehaus Cargo" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/codehaus-cargo/cbnKzKgLQdQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to codehaus-carg...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/8423242C-99A9-4B32-92B4-0CD8FE4C510D%40alishomepage.com.
Hi Hantsy
I looked deeper, and indeed the GlassFish remote container will have to be rewritten for Eclipse GlassFish 6: as explained in https://jakarta.ee/specifications/platform/8/platform-spec-8.html, the JSR-88 APIs have been made optional in Java EE 7 and they seem not to be part of Jakarta EE anymore.
That means, the new Codehaus Cargo GlassFish 6.x container will need to have a different remote deployer.
I created https://codehaus-cargo.atlassian.net/browse/CARGO-1532 for this, all contributions are welcome 😁
Regards
S. Ali Tokmen http://ali.tokmen.com/ http://contact.ali.tokmen.com/
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/CAMq3Qk1bKvYtjp-Tp3H6LzKu1Uo6qW1X_hLKh9j%2BoPLqV4w6PA%40mail.gmail.com.
Hi Hantsy
This is much worse than I thought: Eclipse GlassFish 6 seems not
to work with Java 11 😮 I tried both
https://download.eclipse.org/ee4j/glassfish/glassfish-6.0.0-RC2.zip
and
https://download.eclipse.org/ee4j/glassfish/web-6.0.0-RC2.zip... I
remember this was also an issue for pre-Payara GlassFish versions,
and am surprised the Eclipse teams didn't port the associated
fixes.
How did you get Eclipse GlassFish 6 to work? Do you just use the very aging Java 8? Or perhaps some alternative JDK?
Please advise
S. Ali Tokmen http://ali.tokmen.com/ http://contact.ali.tokmen.com/
Hi, as I know originally Jakarta EE 9 added Java 11 as an optional requirement, but it seems it is removed recently.
So in the glassfish plan, Glassfish v6 only supports Java 8, Glassfish v6.1 will add Java 11 support.
Personally, I have switched to use Java 11 as default JDK for a while, the simplest way to make to Glassfish v6 work is using NetBeans to manage it.
But Payara server supports Java 11 since 5.x.
Self-employed consultant, fullstack developer, agile coach
Github: https://github.com/hantsy
Twitter: https://twitter.com/@hantsy
Medium: https://medium.com/@hantsy
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/068cf9b0-7e81-aa73-66ab-0949293fcda0%40alishomepage.com.
Hi Hantsy
All right - Our observations are then matching 👍
As GlassFish 6.0 lacks JSR-88 support and it is unclear whether this will be included in a future release, please follow the remote deployment instructions for GlassFish 6.x, you can even copy/paste directly from https://github.com/codehaus-cargo/cargo/blob/master/extensions/maven2/samples/glassfish6x-remoteDeploy-test/src/test/resources/pom.xml.
We didn't release Codehaus Cargo 1.8.3 yet (which will have the
glassfish6x container), until then
you can follow the instructions above with glassfish5x as container - They should
work also with GlassFish 6.0.
Keep us posted if it works for you as well!
Regards
S. Ali Tokmen http://ali.tokmen.com/ http://contact.ali.tokmen.com/
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/974D6DD4-3772-40B1-842E-E83143ABA7B4%40hxcore.ol.
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/2efd5e47-d5ea-b9a4-e292-1b03ec3ea9ac%40alishomepage.com.
Hi Hantsy
You are correct: the idea is to use a "local" deployer to deploy
to a remote server - Which, is the "only" way to do it (for now)
with GlassFish 6.x. As explained on
https://codehaus-cargo.github.io/cargo/Remote+deployments+to+GlassFish+6.x.html:
All Cargo GlassFish deployers use the GlassFish
asadmin
behind the scenes, and all of them set thecargo.hostname
as the target host.As a result, all GlassFish Installed Local Deployers can actually be used to perform remote deployments, the main "downside" being that this requires the GlassFish container ZIP file to be downloaded (which can be done transparently using an installer).
Does this help?
S. Ali Tokmen http://ali.tokmen.com/ http://contact.ali.tokmen.com/
--
You received this message because you are subscribed to the Google Groups "Codehaus Cargo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codehaus-carg...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/CAMq3Qk1nV_uC-%2BL-9k1-RGebqX-wWfPm3LGimOR8iqONwpDTNQ%40mail.gmail.com.
[INFO] [talledLocalContainer] remote failure: The jdbc resource [ jdbc/__default ] cannot be deleted as it is required to be configured in the system.
[INFO] [talledLocalContainer] Command delete-jdbc-resource failed.
[INFO] [talledLocalContainer] JDBC Connection pool DerbyPool deleted successfully
[INFO] [talledLocalContainer] Command delete-jdbc-connection-pool executed successfully.
You received this message because you are subscribed to a topic in the Google Groups "Codehaus Cargo" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/codehaus-cargo/cbnKzKgLQdQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to codehaus-carg...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/1a1afa76-a4e9-77b8-4903-5db61d91f6ea%40alishomepage.com.
Hi Hantsy
Good catch - You can use the cargo.glassfish.removeDefaultDatasource property to instruct Codehaus Cargo to not even try to remove that default datasource (and hence avoid confusing log messages).
Your guide looks good 👍 The only part which would not work is what you have for the remote deployment: you'll have to use the instructions on https://codehaus-cargo.github.io/cargo/Remote+deployments+to+GlassFish+6.x.html, where:
I'd also suggest you enrich your guide with the cargo.glassfish.admin.port (defaults to 4848), as many people tend to change that (especially for remote containers).
By the way, do you mind if we refer to youe beautiful guide from
the https://codehaus-cargo.github.io/cargo/Articles.html page?
Regards
S. Ali Tokmen http://ali.tokmen.com/ http://contact.ali.tokmen.com/
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/CAMq3Qk0FWfBctsAhtfcp944hxD0yAtxf1Kkg66esJmy%3DjW-j8Q%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/5b352008-8865-a99b-3f45-4c4b23df15f2%40alishomepage.com.
Hi Hantsy
Excellent - Thanks a lot!
I meanwhile noticed that the latest Eclipse GlassFish artifacts made it to Central, which makes the Codehaus Cargo Maven2/Maven3 configuration easier as it enables the usage of the Artifact Installer:
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>${cargo.version}</version>
<configuration>
<container>
<containerId>glassfish6x</containerId>
<artifactInstaller>
<groupId>org.glassfish.main.distributions</groupId>
<artifactId>glassfish</artifactId>
<version>6.0.0-RC2</version>
</artifactInstaller>
</container>
<configuration>
<home>${project.build.directory}/glassfish6x-home</home>
<properties>
<cargo.hostname>${cargo.hostname}</cargo.hostname>
<cargo.servlet.port>${cargo.servlet.port}</cargo.servlet.port>
<cargo.glassfish.admin.port>${cargo.glassfish.admin.port}</cargo.glassfish.admin.port>
</properties>
</configuration>
<deployables>
<deployable>
<groupId>org.codehaus.cargo</groupId>
<artifactId>simple-war</artifactId>
<type>war</type>
</deployable>
</deployables>
</configuration>
</plugin>
Regards
S. Ali Tokmen http://ali.tokmen.com/ http://contact.ali.tokmen.com/
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/CAMq3Qk1pdzCaAxq6Dt6tk2yLW91yMS1LkGseUwsRYyzF6qa7ZQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/b071b36f-ba80-f2cb-8f19-30ad52d43599%40alishomepage.com.
Hi Hantsy
The builds has an error:
Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:3.1.2:unpack (unpack) on project jakartaee9-starter-boilerplate: Unable to find/resolve artifact.: Failed to read artifact descriptor for org.glassfish.main.distributions:glassfish:zip:6.0.0-RC2: Could not find artifact org.glassfish.tyrus:tyrus-bom:pom:2.0.0-RC1 in central (https://repo.maven.apache.org/maven2) -> [Help 1]
That's a problem with Eclipse GlassFish's Maven artifacts: the GlassFish 6.0.0-RC2 distribution depends on Tyrus 2.0.0-RC1, which they forgot to deploy in Central: https://mvnrepository.com/artifact/org.glassfish.tyrus/tyrus-bom. Why the ZIP has extra dependencies is a good question - My guess is that the Eclipse GlassFish package has not been done with the utmost care yet 😕
Hopefully, they get things right when they package and publish the actual 6.0.0 release.
Regards
S. Ali Tokmen http://ali.tokmen.com/ http://contact.ali.tokmen.com/
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/CAMq3Qk33JHVNe0NoLA72U-YxHooz-tBhn9aTb8hqCwNsLTWHhA%40mail.gmail.com.
Hi Hantsy
The excludeTransitive parameter of the maven-dependency-plugin might address your issue.
Regards
S. Ali Tokmen http://ali.tokmen.com/ http://contact.ali.tokmen.com/
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/de643a36-2e8f-4370-0b6b-016a4f9baf81%40alishomepage.com.