I am using Gradle for my project and yesterday I faced issues while building project since https://plugins.gradle.org was not working. So is there any way to clone dependencies & plugins to AWS S3/Artifactory/Nexus during the build process and if I face an outage issue for public repos like Maven or Gradle I should be able to serve project dependencies & plugin via AWS S3/Artifactory/Nexus
If you are in a maven project you can just go the the .xml file and add it as a dependencie which you'll find in the maven repository :https://mvnrepository.com/
Related
I am trying to convert a maven multi module project to a gradle project using gradle init. I am using a corporate maven repository and am not allowed to download artifacts directly from the internet. I need to route all requests through the corporate maven repo.
I am using Windows 7. I tried adding a init.gradle script in the .gradle folder under my user home directory. However when I try the command gradle init, it detects the pom, asks to convert, but then fails in resolving the dependencies.
Can somone help?
I have several Gradle library projects and main Ant spring web-app project (historically). I'd like to replace Ant with Maven for main project while keeping existing Gradle projects nature.
Is it possible to refer local Gradle projects from pom.xml as local dependencies of Maven project?
Search readily gives me the opposite - "how to refer maven projects from gradle builds", but not my case.
Gradle always builds locally build/libs (or distributions); the only easy way to share the build dependencies between completely different projects is 'as maven repository dependencies'
in your case the options are
Work Local Builds only
add the maven plugin to the gradle builds - do local install
and refer them in the maven build locally.
Build Anywhere
Your Gradle builds publish artefacts to your local nexus
and you refer them properly in your dependencies
--
Gradle by default does not have 'maven install'; it can be added using the maven plugin see - https://docs.gradle.org/current/userguide/maven_plugin.html#header.
I have to 2 git repositories. Lets call them Project A and Project B. Both are java maven apps.
I am trying to setup CI/CD in CircleCi for both projects.
But build/targets from Project A are required as dependency in Project B.
How should I configure Project B in circleci so that is uses build from Project A.
In other words how can both Projects in circleci have same .m2 folder ?
There is no way to share maven builds across different projects in circleci.
What I did for my problem here is that I configured my GitHub Java maven project to build
and deploy as a GitHub Packages
GitHub packages allow you to deploy your maven builds under the same GitHub Repository as a GitHub Package.
Later I configured my circleci's maven settings.xml to fetch builds from maven central and GitHub Packages.
This way my maven builds remain private and the packages/builds are shareable across different projects in circleci build.
I'm trying to include "org.jetbrains.intellij" plugin to my project for using JetBrains annotation #NotNull in JUnit tests while testing project with Gradle. But Gradle try to download this plugin from cache-redirector.jetbrains.com.
Company, where I try to do that, uses inner Artifactory for keeping dependencies. And I've already set my settings.gradle.kts pluginManagement for using Artifactory. Other plugins successfully downloaded and installed except JetBrains one.
What and where should I modify to force Gradle download plugin from company's Artifactory, not from cache-redirector.jetbrains.com?
I have git clone the corda core project and Tutorial project based on master M13. I just changed some content in a kt file of Corda core project. And run gradlew build to publish in the jar into local. I want to use this modify jar into my Tutorial project. Seem it's not ok for now. could you have some suggestion and doc help to me?
You need to run gradlew install from Corda to publish your modified version of Corda to your local Maven repository.
The bigger issue is that the CorDapp tutorial will default to pulling down the milestones from online repositories, instead of your local maven. Go to the build.gradle, java-source/build.gradle and kotlin-source/build.gradle files, and delete any references to jcenter() or mavenCentral().