how to add repository for plugin dependency? how to plugins using private repositories?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

how to add repository for plugin dependency? how to plugins using private repositories?

Eugen Stan
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
Reply | Threaded
Open this post in threaded view
|

Re: how to add repository for plugin dependency? how to plugins using private repositories?

Jacques Le Roux
Administrator
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,

Reply | Threaded
Open this post in threaded view
|

Re: how to add repository for plugin dependency? how to plugins using private repositories?

Eugen Stan
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