logo
down
shadow

Gradle: Make a 3rd party jar available to local gradle repository


Gradle: Make a 3rd party jar available to local gradle repository

By : Rob Little
Date : November 21 2020, 07:01 PM
this one helps. currently, I'm testing Gradle as an alternative to Maven. In my projects, there are some 3rd party jars, which aren't available in any (Maven) repositories. My problem is now, how could I manage it to install these jars into my local .gradle repository. (If it's possible, I don't want to use the local Maven repository, because Gradle should run independently.) At the moment, I get a lot of exceptions because of missing jars. In Maven, it's quite simple by running the install command. However, my Google search for something similar to the Maven install command wasn't successful. Has anybody an idea? , you can include your file system JAR dependencies as:
code :


Share : facebook icon twitter icon
How to make Gradle repository point to local directory

How to make Gradle repository point to local directory


By : user2456731
Date : March 29 2020, 07:55 AM
I wish did fix the issue. If you can't give access to your offshore team, you can copy all dependencies jar that needed to a single directory, and then use flatDir repository.
code :
repositories {
   flatDir {
       dirs 'D:/path/to/local/directory'
   }
}


dependencies {
   compile name: 'name-of-jar'
}
dependencies {
    compile files('/path/to/dir/something_local.jar')
}
How to install a compiled by Gradle jar into the local Gradle Repository files-2.1 instead of the Maven repository?

How to install a compiled by Gradle jar into the local Gradle Repository files-2.1 instead of the Maven repository?


By : Rachel
Date : March 29 2020, 07:55 AM
Hope this helps What worked for me is gradle install -Dmaven.repo.local=the/path/of/the/folder.
I don't know which IDE you are using but in eclipse you can add a new Run Configuration, in Gradle taks add install and in program arguments -Dmaven.repo.local=the/path/of/the/folder.
Could not import third-party class in gradle file other than build.gradle

Could not import third-party class in gradle file other than build.gradle


By : TinD
Date : March 29 2020, 07:55 AM
seems to work fine You need to make the org.ajoberstar.grgit package classes available in the Gradle script where you use it, using buildscript block:
version.gradle:
code :
buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath("org.ajoberstar:grgit:1.5.0")
    }
}
import org.ajoberstar.grgit.Grgit
// .. rest of your build script
gradle.user.home - set in gradle.properties, build.gradle, or settings.gradle to a project-relative location?

gradle.user.home - set in gradle.properties, build.gradle, or settings.gradle to a project-relative location?


By : zampi91
Date : March 29 2020, 07:55 AM
I wish did fix the issue. When Gradle parses gradle.properties file, too much has already happened. So the only way to use a custom Gradle home is through a command line flag, which has the highest precedence, or through a system property.
Note that the documentation indicates that and does not mention the ability to set that value inside a properties file.
Make Gradle use Maven local repository for downloading artifacts

Make Gradle use Maven local repository for downloading artifacts


By : ProgrammingNub
Date : March 29 2020, 07:55 AM
I hope this helps . A solution was given in the gradle forums: https://discuss.gradle.org/t/need-a-gradle-task-to-copy-all-dependencies-to-a-local-maven-repo/13397/2
using this gradle plugin: https://github.com/ysb33r/ivypot-gradle-plugin you can call a new tasg
Related Posts Related Posts :
  • which is the best iPhone and Android Simulator for Kubuntu Linux?
  • Open Microsoft Word in "compare document" mode from command prompt
  • What is a header? Especially, what are POST@GET headers?
  • Tomcat fails to start because of jdbc driver loading
  • Reimplementing data structures in the real world
  • Condition check inside a function or before its call?
  • Is it possible to embed dynamic text into Keynote'09?
  • VS2010 express beta2 - no add reference dialog, no open file/project dialogs
  • Starting Java applet directly from jar file
  • How is other content besides views handled with PortableAreas from the MVCContrib library?
  • Nabaztag alternatives?
  • I've made something that might be useful to the community. Now what?
  • JasperReports multi-page report with different content
  • Clojure agents consuming from a queue
  • Use single static image as map
  • Why does this B+ tree have repeated elements?
  • OpenLayers eraseFeatures doesn't erase features from map screen
  • Can you help me think of problems for my programming language?
  • How to merge/crosslink Javadoc?
  • How do you automate building notes NTF files from lotus script files (lss) file?
  • How to build a programmer's wiki
  • How not to output default T4 generated file?
  • RichTextBox EnableAutoDragDrop=true requires CTRL key pressed when dropping a ListBox item?
  • How can I get Symbolic-Name of an Osgi bundle which is using one of my exported packages?
  • Get network address of a file in AppleScript
  • What is purpose of T4 Generator in T4toolbox
  • How to correctly formalize the command line usage of GNU/Linux commands?
  • What's the difference between a UseCase and a Workflow?
  • How to write a virtual machine
  • NServiceBus FullDuplex sample compiled and debugging against .NET 4.0 framework throws exception
  • Glade: How do I pass more than one argument to a signal handler?
  • Case statements in VHDL
  • New NSData with range of old NSData maintaining bytes
  • How do I convert a column of text URLs into active hyperlinks in Excel?
  • serial port parity
  • @Override fix-code shortcut in NetBeans
  • Import small number of records from a very large CSV file in Biztalk 2006
  • How to clear browser's cache from server side?
  • Execute remote Lua Script
  • Website.com/cpanel access
  • Which LOGO implementation?
  • How to add files to a document library in a site definition in SharePoint 2007?
  • JavaFX layouts question
  • Is it possible to access variable of subclass using object of superclass in polymorphism
  • How can the reliability of Software be checked through analysis?
  • Prototype Multi-Event Observation for Multi-Elements
  • maximum stored proc name in firebird
  • AutoComplete implementation
  • How is it that i am getting two different open ids for the same site for the same user
  • Revision histories and documenting changes
  • How to use Int13H Ext to read /write all sectors on each partition of harddisk (>8GB)
  • Dijit.Dialog 1.4, setting size is limited to 600x400 no matter what size I set it
  • Windows Phone 7 Notifications/Pop/Toasts
  • StructureMap: "No default instance of plugin defined" - even though it is
  • Getting HTTPS working with Traefik and GCE Ingress
  • flask with bootstrap4, not show modal, use CDN works well
  • How to get the formatted view of YQL as result?
  • wsadmin is taking 10 minutes to connect to Application Server
  • TCL array values updation based on command line argument
  • Wordpress: help with posts_nav_link()
  • shadow
    Privacy Policy - Terms - Contact Us © 35dp-dentalpractice.co.uk