[ 
https://issues.apache.org/jira/browse/CASSANDRA-16391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17310656#comment-17310656
 ] 

Michael Semb Wever edited comment on CASSANDRA-16391 at 3/29/21, 4:37 PM:
--------------------------------------------------------------------------

PoC patch ready for earlier review
https://github.com/apache/cassandra/compare/trunk...thelastpickle:mck/16391/trunk
 

Decisions I made in this patch
- a full migration away from maven-ant-tasks cannot be done as it is still used 
for writing the pom files,
- {{resolver-ant-tasks}} is now used for all resolving and downloading of 
dependencies, addressing the primary problem in this ticket,
 - all new {{resolver-ant-tasks}} stuff is put into a new compartmentalised 
build file {{.build/build-resolver.xml}}
 - {{lib/}} is removed completely, and the equivalent is downloaded during the 
build to {{build/dist/lib/}}
 - debian and redhat packaging updated (`ant jar` is not enough, as we need 
`build/dist/lib/` to be created and filled)
 - {{gen-nodetool-docs.py}} needs to run nodetool from the `build/dist/bin/`
 - the license txt files are removed, 
 - where files cannot be downloaded by  {{resolver-ant-tasks}} , they are 
downloaded from either files.pythonhosted.org or our own git repository
 - a number of classpaths are replaced with {{resolver:resolve}} definitions
 - the {{<artifact:mvn …/>}} calls have been replaced with {{<exec dir="." 
executable="sh"><arg line="-c 'mvn …}} calls,
 - the {{build-deps-pom / cassandra-build-deps}} pom file lists only test scope 
dependencies, which all get resolved out to `build/test/lib/jars/`
- the {{all-pom / cassandra-all}} pom lists all compile and provided scope 
dependencies, which all get resolved out to `build/lib/jars/` (and just the 
compile dependencies will get resolved out again to `build/dist/lib/` as 
mentioned above),
- both the  {{build-deps-pom / cassandra-build-deps}} and {{all-pom / 
cassandra-all}} pom need a {{relativePath}} entry to reference the {{parent-pom 
/ cassandra-parent}} pom (that's also generated)
 - the {{parent-pom / cassandra-parent}} pom has dependencies scoped correctly 
as mentioned for its child poms,


was (Author: michaelsembwever):
PoC patch ready for earlier review
https://github.com/apache/cassandra/compare/trunk...thelastpickle:mck/16391/trunk
 

Decisions I made in this patch
- a full migration away from maven-ant-tasks cannot be done as it is still used 
for writing the pom files,
- {{resolver-ant-tasks}} is now used for all resolving and downloading of 
dependencies, addressing the primary problem in this ticket,
 - all new {{resolver-ant-tasks}} stuff is put into a new compartmentalised 
build file {{.build/build-resolver.xml}}
 - {{lib/}} is removed completely, and the equivalent is downloaded during the 
build to {{build/dist/lib/}}
 - debian and redhat packaging updated (`ant jar` is not enough, as we need 
`build/dist/lib/` to be created and filled)
 - {{gen-nodetool-docs.py}} needs to run nodetool from the `build/dist/bin/`
 - the license txt are removed
 - where files cannot be downloaded through  {{resolver-ant-tasks}}   are 
downloaded from either files.pythonhosted.org or our own git repository
 - a number of classpaths are replaced with {{resolver:resolve}} definitions
 - the {{<artifact:mvn …/>}} calls have been replaced with {{<exec dir="." 
executable="sh"><arg line="-c 'mvn …}} calls,
 - the {{build-deps-pom / cassandra-build-deps}} pom file lists only test scope 
dependencies, which all get resolved out to `build/test/lib/jars/`
- the {{all-pom / cassandra-all}} pom lists all compile and provided scope 
dependencies, which all get resolved out to `build/lib/jars/` (and just the 
compile dependencies will get resolved out again to `build/dist/lib/` as 
mentioned above),
- both the  {{build-deps-pom / cassandra-build-deps}} and {{all-pom / 
cassandra-all}} pom need a {{relativePath}} entry to reference the {{parent-pom 
/ cassandra-parent}} pom (that's also generated)
 - the {{parent-pom / cassandra-parent}} pom has dependencies scoped correctly 
as mentioned for its child poms,

> Migrate use of maven-ant-tasks to resolver-ant-tasks
> ----------------------------------------------------
>
>                 Key: CASSANDRA-16391
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-16391
>             Project: Cassandra
>          Issue Type: Task
>          Components: Build, Dependencies
>            Reporter: Michael Semb Wever
>            Priority: High
>              Labels: lhf
>
> Cassandra resolves dependencies and generates maven pom files through the use 
> of [maven-ant-tasks|http://maven.apache.org/ant-tasks/]. This is no longer a 
> supported project.
> The recommended upgrade is to 
> [resolver-ant-tasks|http://maven.apache.org/resolver-ant-tasks/]. It follows 
> similar APIs so shouldn't be too impactful a change.
> The existing maven-ant-tasks has caused [some headaches 
> already|https://issues.apache.org/jira/browse/CASSANDRA-16359] with internal 
> super poms referencing insecure http:// central maven repository URLs that 
> are no longer supported.
> We should also take the opportunity to 
>  - define the "test" scope (classpath) for those dependencies only used for 
> tests (currently we are packaging test dependencies into the release binary 
> artefact),
>  - remove the jar files stored in the git repo under the "lib/" folder.
> These two above points have to happen in tandem, as the jar files under 
> {{lib/}} are those that get bundled into the {{build/dist/lib/}} and hence 
> the binary artefact. That is, all jar files under {{lib/}} are the project's 
> "compile" scope, and all other dependencies defined in build.xml are either 
> "provided" or "test" scope. These different scopes for dependencies are 
> currently configured in different maven-ant-tasks poms. See 
> https://github.com/apache/cassandra/commit/d43b9ce5092f8879a1a66afebab74d86e9e127fb#r45659668



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to