Closed tomekl007 closed 4 years ago
General remark: I'm surprised by the general layout.
- Why do we need to inherit from JBoss parent POM?
- Why do we need a build-parent module, couldn't it be merged into the root POM?
- If poms/bom is the runtime BOM, can we name it
bom-runtime
for clarity?- The runtime module is called
cassandra-quarkus-client
, shouldn't we rename itcassandra-quarkus-client-runtime
for symmetry withcassandra-quarkus-client-deployment
?- Why do we need the intermediary
cassandra-quarkus-extensions
POM?- Why is
cassandra-quarkus-integration-tests
a POM module with a child JAR module?- Some properties are declared and only used in one place, I don't find it particularly useful and creates a level of indirection that makes it hard to understand the POMs.
I haven't looked more in detail but it seems that the general structure of the project could be much simpler.
Overall, I wanted to mirror the structure from:
quarkus
and extensions
are inheriting this JBoss
parent so If we want to be compatible I think we should as well.quarkus
project has dedicated build-parent
module (and both extensions)runtime
the suffix is omitted. I think that it is because the deployment "contains" runtime so those dependencies are not only for runtime.quarkus
repo.extensions
module, and inside of it there are extensions (as a separate module, in our case it is cassandra-quarkus-extensions
)So I totally agree that it could be simplified, but If we want to be unified with quarkus
repo, and other extensions, we should follow this structure. Please let me know what do you think.
The runtime module is called
cassandra-quarkus-client
, shouldn't we rename itcassandra-quarkus-client-runtime
for symmetry withcassandra-quarkus-client-deployment
?
Omitting the suffix for the runtime module is a Quarkus naming convention, see the extension guide.
On that note, the Quarkus maven plugin has a create-extension
goal to bootstrap a new extension, @tomekl007 did you use that to initialize the project? If not, we could at least check that the structure we use is consistent with what it would have generated.
EDIT - output of the Maven plugin (but I think it's intended for a project that already has the extensions/
module):
$ mvn io.quarkus:quarkus-maven-plugin:1.3.1.Final:create-extension -N \
-Dquarkus.artifactIdBase=cassandra-client \
-Dquarkus.groupId=com.datastax.oss \
-Dquarkus.nameBase="Cassandra client" \
-Dversion=1.0.0-SNAPSHOT
$ find cassandra-client -type f
cassandra-client/runtime/pom.xml
cassandra-client/pom.xml
cassandra-client/deployment/pom.xml
cassandra-client/deployment/src/main/java/com/datastax/oss/cassandra/client/deployment/CassandraClientProcessor.java
The runtime module is called
cassandra-quarkus-client
, shouldn't we rename itcassandra-quarkus-client-runtime
for symmetry withcassandra-quarkus-client-deployment
?Omitting the suffix for the runtime module is a Quarkus naming convention, see the extension guide.
On that note, the Quarkus maven plugin has a
create-extension
goal to bootstrap a new extension, @tomekl007 did you use that to initialize the project? If not, we could at least check that the structure we use is consistent with what it would have generated.EDIT - output of the Maven plugin (but I think it's intended for a project that already has the
extensions/
module):$ mvn io.quarkus:quarkus-maven-plugin:1.3.1.Final:create-extension -N \ -Dquarkus.artifactIdBase=cassandra-client \ -Dquarkus.groupId=com.datastax.oss \ -Dquarkus.nameBase="Cassandra client" \ -Dversion=1.0.0-SNAPSHOT $ find cassandra-client -type f cassandra-client/runtime/pom.xml cassandra-client/pom.xml cassandra-client/deployment/pom.xml cassandra-client/deployment/src/main/java/com/datastax/oss/cassandra/client/deployment/CassandraClientProcessor.java
Yes, I was using that, but exactly what you wrote " I think it's intended for a project that already has the extensions/ module", also this is intended only for extensions that are in the quarkus repo and rely on the structure that it's in that repo, so we cannot use it for our case.
@adutra
General remark: I'm surprised by the general layout.
- Why do we need to inherit from JBoss parent POM?
- Why do we need a build-parent module, couldn't it be merged into the root POM?
- If poms/bom is the runtime BOM, can we name it
bom-runtime
for clarity?- The runtime module is called
cassandra-quarkus-client
, shouldn't we rename itcassandra-quarkus-client-runtime
for symmetry withcassandra-quarkus-client-deployment
?- Why do we need the intermediary
cassandra-quarkus-extensions
POM?- Why is
cassandra-quarkus-integration-tests
a POM module with a child JAR module?- Some properties are declared and only used in one place, I don't find it particularly useful and creates a level of indirection that makes it hard to understand the POMs.
I haven't looked more in detail but it seems that the general structure of the project could be much simpler.
I've simplified the project structure:
<artifactId>quarkus-parent</artifactId>
because this is recommended on the
https://quarkus.io/guides/writing-extensions#maven-setupbuild-parent
and merged it with the root POM.To reviewers: I pushed a few commits:
mvn clean verify -Dnative
. Make sure you have GRAALVM_HOME
set.All pending comments were addressed as separate JIRA tickets, see: https://datastax-oss.atlassian.net/browse/JAVA-2681
General remark: I'm surprised by the general layout.
bom-runtime
for clarity?cassandra-quarkus-client
, shouldn't we rename itcassandra-quarkus-client-runtime
for symmetry withcassandra-quarkus-client-deployment
?cassandra-quarkus-extensions
POM?cassandra-quarkus-integration-tests
a POM module with a child JAR module?I haven't looked more in detail but it seems that the general structure of the project could be much simpler.