Re: how to add repository for plugin dependency? how to plugins using private repositories?
Hi Stan, I think this should be a change/mod in your custom repository. We should not add custom dependencies to the build file which are not used by the project itself. Best regards, Michael Am 22.06.21 um 10:58 schrieb Eugen Stan: Hello Jacques, I've created an issue and a PR for this https://issues.apache.org/jira/browse/OFBIZ-12263 . https://github.com/apache/ofbiz-framework/pull/304/files I did some research and the current solution for building plugin - that depend on source does not allow us to declare repositories for plugins IMO. Maybe gradle will provide this in future. I would go the route of publishing binaries for OFBiz framework and use those in plugins/apps via a gradle platform (BOM) dependency. This should make plugins more independent of OFBiz - at least buildwise. IMO current way of building plugins requires OFBiz sources - and while it provides advantages, it is also a big dependency to pull in. Regards, Eugen On 17.06.2021 14:34, Eugen Stan wrote: Hi Jacques, Tried and looked but no success unless I add directly to ofbiz-framework/build.gradle . Probably those plugins have all dependenices on maven central or the others repo. I updated my ofbiz-clojure-repl plugin but I can't build it unless I add clojars repo. Without the repository or adding the repo in ofbiz-clojure-repl/build.gradle I get: Build file '/home/ieugen/proiecte/ofbiz/ofbiz-framework/build.gradle' line: 1124 * What went wrong: A problem occurred evaluating root project 'ofbiz'. > Could not resolve all files for configuration ':runtimeClasspath'. > Could not resolve nrepl:nrepl:0.8.3. Required by: project : > project :plugins:ofbiz-clojure-repl > Could not resolve nrepl:nrepl:0.8.3. > Could not get resource 'https://repo.spring.io/plugins-release/nrepl/nrepl/0.8.3/nrepl-0.8.3.pom'. > Could not HEAD 'https://repo.spring.io/plugins-release/nrepl/nrepl/0.8.3/nrepl-0.8.3.pom'. Received status code 401 from server: Unauthorized With this change it works: --- a/build.gradle +++ b/build.gradle @@ -152,6 +152,10 @@ allprojects { // com.springsource.com.sun.syndication url "https://repo.spring.io/plugins-release; } + maven { + url "https://clojars.org/repo; + } } } https://github.com/netdava/ofbiz-clojure-repl On 17.06.2021 12:59, Jacques Le Roux wrote: Hi Eugen, I'm not sure it's what you are looking for but you may have a look at build.gradle files that you can fins in some plugins, eg https://github.com/apache/ofbiz-plugins/blob/trunk/birt/build.gradle HTH
Re: how to add repository for plugin dependency? how to plugins using private repositories?
Hello Jacques, I've created an issue and a PR for this https://issues.apache.org/jira/browse/OFBIZ-12263 . https://github.com/apache/ofbiz-framework/pull/304/files I did some research and the current solution for building plugin - that depend on source does not allow us to declare repositories for plugins IMO. Maybe gradle will provide this in future. I would go the route of publishing binaries for OFBiz framework and use those in plugins/apps via a gradle platform (BOM) dependency. This should make plugins more independent of OFBiz - at least buildwise. IMO current way of building plugins requires OFBiz sources - and while it provides advantages, it is also a big dependency to pull in. Regards, Eugen On 17.06.2021 14:34, Eugen Stan wrote: Hi Jacques, Tried and looked but no success unless I add directly to ofbiz-framework/build.gradle . Probably those plugins have all dependenices on maven central or the others repo. I updated my ofbiz-clojure-repl plugin but I can't build it unless I add clojars repo. Without the repository or adding the repo in ofbiz-clojure-repl/build.gradle I get: Build file '/home/ieugen/proiecte/ofbiz/ofbiz-framework/build.gradle' line: 1124 * What went wrong: A problem occurred evaluating root project 'ofbiz'. > Could not resolve all files for configuration ':runtimeClasspath'. > Could not resolve nrepl:nrepl:0.8.3. Required by: project : > project :plugins:ofbiz-clojure-repl > Could not resolve nrepl:nrepl:0.8.3. > Could not get resource 'https://repo.spring.io/plugins-release/nrepl/nrepl/0.8.3/nrepl-0.8.3.pom'. > Could not HEAD 'https://repo.spring.io/plugins-release/nrepl/nrepl/0.8.3/nrepl-0.8.3.pom'. Received status code 401 from server: Unauthorized With this change it works: --- a/build.gradle +++ b/build.gradle @@ -152,6 +152,10 @@ allprojects { // com.springsource.com.sun.syndication url "https://repo.spring.io/plugins-release; } + maven { + url "https://clojars.org/repo; + } } } https://github.com/netdava/ofbiz-clojure-repl On 17.06.2021 12:59, Jacques Le Roux wrote: Hi Eugen, I'm not sure it's what you are looking for but you may have a look at build.gradle files that you can fins in some plugins, eg https://github.com/apache/ofbiz-plugins/blob/trunk/birt/build.gradle HTH -- Eugen Stan +40720 898 747 / netdava.com
Re: how to add repository for plugin dependency? how to plugins using private repositories?
Hi Jacques, Tried and looked but no success unless I add directly to ofbiz-framework/build.gradle . Probably those plugins have all dependenices on maven central or the others repo. I updated my ofbiz-clojure-repl plugin but I can't build it unless I add clojars repo. Without the repository or adding the repo in ofbiz-clojure-repl/build.gradle I get: Build file '/home/ieugen/proiecte/ofbiz/ofbiz-framework/build.gradle' line: 1124 * What went wrong: A problem occurred evaluating root project 'ofbiz'. > Could not resolve all files for configuration ':runtimeClasspath'. > Could not resolve nrepl:nrepl:0.8.3. Required by: project : > project :plugins:ofbiz-clojure-repl > Could not resolve nrepl:nrepl:0.8.3. > Could not get resource 'https://repo.spring.io/plugins-release/nrepl/nrepl/0.8.3/nrepl-0.8.3.pom'. > Could not HEAD 'https://repo.spring.io/plugins-release/nrepl/nrepl/0.8.3/nrepl-0.8.3.pom'. Received status code 401 from server: Unauthorized With this change it works: --- a/build.gradle +++ b/build.gradle @@ -152,6 +152,10 @@ allprojects { // com.springsource.com.sun.syndication url "https://repo.spring.io/plugins-release; } +maven { +url "https://clojars.org/repo; +} } } https://github.com/netdava/ofbiz-clojure-repl On 17.06.2021 12:59, Jacques Le Roux wrote: Hi Eugen, I'm not sure it's what you are looking for but you may have a look at build.gradle files that you can fins in some plugins, eg https://github.com/apache/ofbiz-plugins/blob/trunk/birt/build.gradle HTH -- Eugen Stan +40720 898 747 / netdava.com
Re: how to add repository for plugin dependency? how to plugins using private repositories?
Hi Eugen, I'm not sure it's what you are looking for but you may have a look at build.gradle files that you can fins in some plugins, eg https://github.com/apache/ofbiz-plugins/blob/trunk/birt/build.gradle HTH Jacques Le 17/06/2021 à 06:58, Eugen Stan a écrit : Hello, How can I add a maven repository for plugin dependencies? My plugin depends on a library that is published on clojars.org . I could add the repo to main ofbiz-frameweork build.gradle but that would work only for me and I don't expect this to work for private dependencies. How does one develop in such cases? Plugin repo is https://github.com/netdava/ofbiz-clojure-repl . I clone the repo in plugins and try to build it. Regards,
how to add repository for plugin dependency? how to plugins using private repositories?
Hello, How can I add a maven repository for plugin dependencies? My plugin depends on a library that is published on clojars.org . I could add the repo to main ofbiz-frameweork build.gradle but that would work only for me and I don't expect this to work for private dependencies. How does one develop in such cases? Plugin repo is https://github.com/netdava/ofbiz-clojure-repl . I clone the repo in plugins and try to build it. Regards, -- Eugen Stan +40720 898 747 / netdava.com