I am trying to build my mule application and deploy it to cloudhub with Gradle (The Gradle version I'm using is: Gradle 4.10.2) . For this I have added the build.gradle file in my project as shown below:
When I give the Gradle build command it is successful as shown below:
But when I execute Gradle deploy (gradle deploy --info) command, it fails with following error:
Any help to resolve the above issue would be appreciated.
That Gradle has been abandoned for some years and seems to be trying to use a CloudHub REST API endpoint that is no longer valid. If you want to use Gradle you will need a newer Gradle plugin that uses the current CloudHub API. Note that MulesSoft only supports Maven.
You can try running with --stacktrace as the error message suggests to find out more details about the error.
Related
I release my org's gradle plugin go the gradle repository using the Gradle Publish Plugin Repo. https://plugins.gradle.org/.
I created an account, created an API Key/Secret combo, and configured these properties in our gradle.properties file. I then call a ./gradlew publishPlugins
This was working fine until sometime between January and May where we tried to release again. We now get the ``Execution failed for task ':signArchives'.``` Error. we have never needed to configure a signatory, but for some reason it's throwing this error now.
We've tried configuring the gradle.properties file in both our GRADLE_HOME and in the root project directory. We have also tried passing our properties as command line properties as such: $ ./gradlew publishPlugins -Pgradle.publish.key=<key> -Pgradle.publish.secret=<secret>. Our attempts have been to no avail.
I downloaded the gradle plugin test project from their github here:
https://github.com/gradle/gradle/tree/master/subprojects/docs/src/samples/customPlugin
I also updated gradle to latest (4.7).
When I gradle build the consumer project, I get the following build error:
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'consumer'.
Could not resolve all artifacts for configuration ':classpath'.
Could not find org.gradle:customPlugin:1.0-SNAPSHOT.
Searched in the following locations:
file:/C:/Code/gradle/subprojects/docs/src/samples/customPlugin/repo/org/gradle/customPlugin/1.0-SNAPSHOT/maven-
metadata.xml
file:/C:/Code/gradle/subprojects/docs/src/samples/customPlugin/repo/org/gradle/customPlugin/1.0-SNAPSHOT/custom
Plugin-1.0-SNAPSHOT.pom
file:/C:/Code/gradle/subprojects/docs/src/samples/customPlugin/repo/org/gradle/customPlugin/1.0-SNAPSHOT/custom
Plugin-1.0-SNAPSHOT.jar
Required by:
project :
What's the issue here? I guess I don't understand gradle plugins enough. Does the plugin need to be built somehow? I have no 1.0-SNAPSHOT pat or anything of the sort, which seems to be where its looking.
Does the plugin need to be built somehow ?
Yes, at first, otherwise the consumer project won't find it.
Inside the plugin project, just run gradle uploadArchive
And then retry a gradle build inside the consumer project
I am using a Bamboo CICD pipeline to build and deploy spring boot jar using maven release. Build is working fine and a spring boot jar is created. Since maven release updates the jar version after every run, I am unable to use this jar in the next stages of bamboo pipeline.
I have gone through bamboo documentation and discussion forums in Atlassian and Stackoverflow but unable to get the required solution. I tried to get the artifact in the next stages using "Artifact Download" task but unable to use it since jar version always varies.
I tried to fetch the shared artifact file using regular expression such as target/*.war in the deploy step (Command task - Argument field) but guess bamboo is not able to execute the regex. It is giving the following error message.
Incorrect Usage: The specified path 'target/*.war' does not exist.
If I give the correct name such as target/appname-0.0.1-snapshot.war bamboo is able to find the war file and deploying it successfully.
Is there any way that the exact war or jar name can be obtained in further stages without the need of manual update after every run? Any help on this would be greatly appreciated.
Regular expression is not working in the command task but I was able to resolve this issue by using the bamboo script task. Regular expression is working fine and target/*.war has been resolved correctly.
You can also try Maven POM Value Extractor plugin. This plugin provides a build task that extracts values from Maven POMs and sets build variables using those values. This allows you to keep you Bamboo variables in sync with your Maven POM.
You can automatically extract your artifact's GAV (GroupId, Artifact, Version).
I am trying to write buildscript in gradle for a simple golang web application.
Can someone please tell me how to use golang commands for build and install in gradle build?
I do not see any clear documentation for the usage of gradle for a go lang application.
Try Gogradle https://github.com/blindpirate/gogradle, a full-featured Golang build plugin.
What you need to do is creating a build.gradle as documented, and run ./gradlew build or ./gradlew test.
gradle supports maven plugins and you can just call the mvn-golang maven plugin as usual maven plugin published in the maven central
I get the following message from gradle when I run a 'gradle build' with Artifactory configured.
[buildinfo] Properties file path was not found! (Relevant only for builds running on a CI Server)
It starts appearing when I include the following line in my build.gradle:
apply plugin: 'com.jfrog.artifactory'
I would like to know what it exactly means and what to do about it, but I cannot find anything anywhere about it.
Gradle integration with Artifactory can be achieved by using the Gradle Artifactory Plugin or alternatively from a CI server (Jenkims, Bamboo or TeamCity), by using the relevant Artifactory Plugin for the CI server.
All Artifactory Plugins for the CI servers share the same code with the Gradle Artifactory Plugin to integrate with Artifactory.
The warning message you're getting is relevant only in case the build is running on a CI server. If it is not, this message is not an indication of a problem and it should be ignored. To avoid confusion, in the next release this message type will be changed to info instead of warning.
As for the actual meaning of this message, here's a short description:
The Artifactory Plugins for CI servers use a property file to pass
information to the build tool process (Gradle for example). The Gradle
Artifactory Plugin code (running as part of the Gradle process) uses
the data of in the file for artifact resolution and deployment from/to
Artifactory, as well as deployment for the build information to
Artifactory.
Using the Gradle Artifactory Plugin directly from your build script does not use or require this properties file and that's why you're seeing this message.