dweiss commented on pull request #156:
URL: https://github.com/apache/lucene/pull/156#issuecomment-850298459


   bq. I don't know how this works
   
   It's simple but not straightforward. The two entries under "publications" 
(jars and unsignedJars) cause gradle to create a bunch of convention-named 
additional tasks actually connecting these publications to their target. So, 
when you run 'gradlew tasks' you'll see them and figure out the pattern:
   ```
   generateMetadataFileForJarsPublication - Generates the Gradle metadata file 
for publication 'jars'.
   generateMetadataFileForUnsignedJarsPublication - Generates the Gradle 
metadata file for publication 'unsignedJars'.
   generatePomFileForJarsPublication - Generates the Maven POM file for 
publication 'jars'.
   generatePomFileForUnsignedJarsPublication - Generates the Maven POM file for 
publication 'unsignedJars'.
   mavenToApacheSnapshots - Publish Maven JARs and POMs to Apache Snapshots 
repository: https://repository.apache.org/content/repositories/snapshots
   mavenToLocalFolder - Publish Maven JARs and POMs locally to 
C:\Work\apache\lucene\main\build\maven-local
   mavenToLocalRepo - Publish Maven JARs and POMs to current user's local maven 
repository.
   publish - Publishes all publications produced by this project.
   publishAllPublicationsToApacheSnapshotsRepository - Publishes all Maven 
publications produced by this project to the ApacheSnapshots repository.
   publishAllPublicationsToBuildRepository - Publishes all Maven publications 
produced by this project to the build repository.
   publishJarsPublicationToApacheSnapshotsRepository - Publishes Maven 
publication 'jars' to Maven repository 'ApacheSnapshots'.
   publishJarsPublicationToBuildRepository - Publishes Maven publication 'jars' 
to Maven repository 'build'.
   publishJarsPublicationToMavenLocal - Publishes Maven publication 'jars' to 
the local Maven repository.
   publishToMavenLocal - Publishes all Maven publications produced by this 
project to the local Maven cache.
   publishUnsignedJarsPublicationToApacheSnapshotsRepository - Publishes Maven 
publication 'unsignedJars' to Maven repository 'ApacheSnapshots'.
   publishUnsignedJarsPublicationToBuildRepository - Publishes Maven 
publication 'unsignedJars' to Maven repository 'build'.
   publishUnsignedJarsPublicationToMavenLocal - Publishes Maven publication 
'unsignedJars' to the local Maven repository.
   ```
   
   I personally don't like typing so much so the rest of the code adds links 
between shorter aliases (mavenToLocalFolder, mavenToLocalRepo) and the right 
"convention" task. There is also a bit that configures both publications using 
the same closure to avoid some repetition.
   
   I agree this isn't super-clean but it's how gradle works. Perhaps there is a 
way to make it nicer, I'm not sure.


-- 
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.

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