I’ve been struggling with the following challenge:
My top level project (Tapestry) uploads aggregate source and JavaDoc ZIP archives as part of a generateRelease build.
Now, with Luke’s help in the class, I got the .md5 checksums for each archive file generated and uploaded along with the archive itself.
The next challenge is the signing of the archives with PGP.
configurations {
archives
uploads.extendsFrom archives, signatures
}
task generateMD5Checksums(type: GenMD5) {
group "Release artifact"
description "Creates MD5 checksums for archives of source and JavaDoc"
source configurations.archives
outputDir "$buildDir/md5"
}
dependencies {
archives files(zippedJavadoc, zippedSources)
uploads files(generateMD5Checksums)
}
signing {
sign configurations.archives
}
task uploadSourcesAndJavadocs(type: Scp) {
group "Release artifact"
description "Uploads source and JavaDoc Zips and MD5 checksums and PGP signatures to people.apache.org"
dependsOn signArchives
source files(configurations.uploads)
host "people.apache.org"
userName deployUsername()
password deployPassword()
// The destination folder needs to already exist.
destination "public_html/tapestry-releases"
verbose true
doFirst {
logger.info "Uploads files: ${source.files}"
}
}
This works for the archives and the .md5s, but not the .asc (PGP key signatures) which don’t even get generated:
Executing task ':aggregateJavadoc' due to:
No history is available for task ':aggregateJavadoc'.
/Users/hlship/workspaces/tapestry/tapestry5/tapestry-core/src/main/java/org/apache/tapestry5/services/MarkupRendererFilter.java:29: warning - Tag @see: can't find contributeMarkupRenderer(org.apache.tapestry5.ioc.OrderedConfiguration,
org.apache.tapestry5.Asset, boolean, String, boolean, org.apache.tapestry5.ioc.services.SymbolSource,
AssetSource, org.apache.tapestry5.services.javascript.JavaScriptStackSource,
org.apache.tapestry5.internal.services.javascript.JavaScriptStackPathConstructor, org.apache.tapestry5.Asset) in org.apache.tapestry5.services.TapestryModule
/Users/hlship/workspaces/tapestry/tapestry5/tapestry-core/src/main/java/org/apache/tapestry5/services/PartialMarkupRendererFilter.java:31: warning - Tag @see: can't find contributePartialMarkupRenderer(org.apache.tapestry5.ioc.OrderedConfiguration,
org.apache.tapestry5.Asset, org.apache.tapestry5.services.javascript.JavaScriptStackSource,
org.apache.tapestry5.internal.services.javascript.JavaScriptStackPathConstructor,
org.apache.tapestry5.ioc.services.SymbolSource, AssetSource) in org.apache.tapestry5.services.TapestryModule
/Users/hlship/workspaces/tapestry/tapestry5/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java:1336: warning - Tag @link: reference not found: InjectionProvider
3 warnings
:zippedJavadoc
Executing task ':zippedJavadoc' due to:
No history is available for task ':zippedJavadoc'.
:zippedSources
Executing task ':zippedSources' due to:
No history is available for task ':zippedSources'.
:generateMD5Checksums
Executing task ':generateMD5Checksums' due to:
No history is available for task ':generateMD5Checksums'.
:signArchives
Executing task ':signArchives' due to:
No history is available for task ':signArchives'.
:uploadSourcesAndJavadocs
Task ':uploadSourcesAndJavadocs' has not declared any outputs, assuming that it is out-of-date.
Uploads files: [/Users/hlship/workspaces/tapestry/tapestry5/build/md5, /Users/hlship/workspaces/tapestry/tapestry5/build/apache-tapestry-5.4-alpha-1-javadocs.zip, /Users/hlship/workspaces/tapestry/tapestry5/build/apache-tapestry-5.4-alpha-1-sources.zip]
Trying to override old definition of datatype scp
Trying to override old definition of datatype sshexec
[ant:scp] Connecting to people.apache.org:22
If I then re-run it (without clean):
:aggregateJavadoc
Skipping task ':aggregateJavadoc' as it is up-to-date.
Skipping task ':aggregateJavadoc' as it is up-to-date
:aggregateJavadoc UP-TO-DATE
:zippedJavadoc
Skipping task ':zippedJavadoc' as it is up-to-date.
Skipping task ':zippedJavadoc' as it is up-to-date
:zippedJavadoc UP-TO-DATE
:zippedSources
Skipping task ':zippedSources' as it is up-to-date.
Skipping task ':zippedSources' as it is up-to-date
:zippedSources UP-TO-DATE
:generateMD5Checksums
Skipping task ':generateMD5Checksums' as it is up-to-date.
Skipping task ':generateMD5Checksums' as it is up-to-date
:generateMD5Checksums UP-TO-DATE
:signArchives
Skipping task ':signArchives' as it is up-to-date.
Skipping task ':signArchives' as it is up-to-date
:signArchives UP-TO-DATE
:uploadSourcesAndJavadocs
Task ':uploadSourcesAndJavadocs' has not declared any outputs, assuming that it is out-of-date.
Uploads files: [/Users/hlship/workspaces/tapestry/tapestry5/build/md5, /Users/hlship/workspaces/tapestry/tapestry5/build/apache-tapestry-5.4-alpha-1-javadocs.zip, /Users/hlship/workspaces/tapestry/tapestry5/build/apache-tapestry-5.4-alpha-1-sources.zip]
Trying to override old definition of datatype scp
Trying to override old definition of datatype sshexec
[ant:scp] Connecting to people.apache.org:22
I wish there was a way, short of --debug, to squeeze more information out of the build about task interdependencies.
Is there some hidden dependency between the “java” plugin and the “signing” plugin? Signing appears to work correctly for the signing of artifacts uploaded to the Nexus repository.