Comments (11)
Found a workaround:
allProjects {
afterEvaluate {
signing {
project.gradle.taskGraph.whenReady {
def uploadTasks = project.tasks.withType(Upload).matching { it.path.endsWith(":uploadArchives") }
uploadTasks.each { task ->
task.repositories.mavenDeployer() {
beforeDeployment { MavenDeployment deployment ->
project.signing.signPom(deployment)
}
}
}
}
}
}
}
from gradle-nexus-plugin.
Would you might sending a pull request that reproduces this issue as integration test (see tests under src/integTest/groovy
)?
from gradle-nexus-plugin.
Hmmm... difficult... I don't know that much Groovy. I'll give it a try, but it'll take some time, because I don't have that much time right now.
from gradle-nexus-plugin.
What version of the plugin did you use? Not sure when I'll get to it but feel free to send me a pull request.
from gradle-nexus-plugin.
org.gradle.api.plugins:gradle-nexus-plugin:0.6.1
from gradle-nexus-plugin.
OK, thanks. How do you apply/configure the plugin at the moment? In a subprojects
or allprojects
in your root project?
from gradle-nexus-plugin.
allprojects
only contains:
allprojects {
apply plugin: 'maven'
apply plugin: 'signing'
}
Then I have a closure to configure all subprojects with a src/main/java folder:
configure(subprojects.findAll { new File(it.projectDir, 'src/main/java').directory }) {
apply plugin: 'java'
compileJava.options.encoding = 'utf-8'
compileJava.sourceCompatibility = JavaVersion.VERSION_1_6
compileJava.targetCompatibility = JavaVersion.VERSION_1_6
...
apply plugin: 'nexus'
nexus {
attachTests = true
sign = true
}
...
}
All subprojects are in a common folder called "projects", ie.:
projects/subprojectA
projects/subprojectB/subprojectB1
projects/subprojectB/subprojectB2
etc.
The subprojects don't have any gradle build files; everything is in the monolithic build.gradle in the root dir.
from gradle-nexus-plugin.
Alright. Sounds like I will need to set up a test case to see what's going on.
BTW: The Maven and Signing plugins are applied internally by the Nexus plugin so you don't need to do that. To figure out the Java projects you might also rather check if the Java plugin is applied.
from gradle-nexus-plugin.
I got errors when I omitted the maven
and signing
plugin, but I cannot recall whether it boiled down to the Nexus plugin or any other instruction I have in my build file.
How do I check if the Java plugin is applied? Note: I don't want to apply the Java plugin in allprojects
, and I don't want to add it to every subproject manually.
Btw. you can see our project here, it's actually on GitHub, too:
https://github.com/copper-engine/copper-engine
from gradle-nexus-plugin.
That makes sense. That would be project.plugins.hasPlugin('java')
. I will have a look at your project when I get the time.
from gradle-nexus-plugin.
Verified, works. Many thanks!
from gradle-nexus-plugin.
Related Issues (20)
- Multiple GPG key passphase questions in multi-project builds HOT 2
- uploadArchives task fails with Gradle 2.3+ when distZip and distTar are not enabled HOT 4
- How to set classifier for archives HOT 4
- how to add additional archives to publish HOT 3
- "Must specify a repository for deployment" error HOT 4
- Cycle detected HOT 2
- Encrypt credentials in properties file HOT 1
- Make authorization error more user-friendly HOT 3
- gradle
- uploadArchives logging needed HOT 1
- ShadowJar + GradleNexusPlugin : Could not publish configuration 'archives' HOT 4
- How can I manually say upload to snapshot or stable repository ? HOT 6
- How force project version on Nexus HOT 2
- BOM support HOT 2
- Gradle 4.10.1 breaks modifyPom HOT 4
- uploadArchives fails with "Cannot invoke method readPassword() on null object" HOT 1
- Gradle Kotli-Dsl example HOT 3
- MavenPlugin is deprecated and scheduled to be removed in Gradle 7.0 HOT 2
- How to use in Multi-module project?
- Publish to Gradle Plugins repo HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gradle-nexus-plugin.