dcapwell commented on code in PR #29:
URL: https://github.com/apache/cassandra-accord/pull/29#discussion_r1094887057


##########
accord-core/build.gradle:
##########
@@ -56,16 +56,39 @@ task testJar(type: Jar, dependsOn: testClasses) {
 publishing {
   publications {
     mavenJava(MavenPublication) {
-      artifactId = 'accord'
+      artifactId = accord_artifactId
       pom {
+        name = 'Apache Cassandra Accord'
+        description = 'General purpose transactions library using a leaderless 
consensus protocol to have highly available transactions'
+        url = 
'https://cwiki.apache.org/confluence/display/CASSANDRA/CEP-15%3A+General+Purpose+Transactions'
         inceptionYear = '2021'
+        licenses {
+          license {
+            name = 'The Apache Software License, Version 2.0'
+            url = 'https://www.apache.org/licenses/LICENSE-2.0.txt'
+          }
+        }
+        scm {
+          connection = 
'scm:https://gitbox.apache.org/repos/asf/cassandra-accord.git'
+          developerConnection = 
'scm:https://gitbox.apache.org/repos/asf/cassandra-accord.git'
+          url = 
'https://gitbox.apache.org/repos/asf?p=cassandra-accord.git;a=tree'
+        }
+      }
+      // This is a hack to remove accord from the dependency list as this 
breaks Apache Cassandra
+      // This is a bug with Gradle that is fixed in 8.0 but not yet released
+      // see 
https://github.com/gradle/gradle/commit/6e596c638dff59dfa06032a7e7a3974275ddb3e1
+      pom.withXml {
+        asNode().dependencies.'*'.findAll() { it.artifactId.text() == 
accord_artifactId }.each() { it.parent().remove(it) }
       }
       from components.java
-    }
-
-    test(MavenPublication) {
-      artifactId = 'accord'
+      // don't need to add javadoc or sources as they were added already in 
the java block
       artifact testJar
+
+      versionMapping {
+        allVariants {
+          fromResolutionOf('testRuntimeClasspath')
+        }
+      }

Review Comment:
   I am testing how to add test dependencies... do we really need to is 
debatable (see it mostly as documentation given the fact we publish a 
-tests.jar)...  This doesn't actually work the way I want (remove and the same 
pom will be published); asked in SO to see if anyone can inform how 
https://stackoverflow.com/questions/75326910/how-to-get-test-dependencies-to-show-up-in-maven-pom-when-they-are-added-via-a-p



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to