Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Thufir's a Harkonnen now.


devel / comp.lang.java.programmer / Re: Get away from dependency hell in maven possible

SubjectAuthor
* Get away from dependency hell in maven possiblemike
+* Re: Get away from dependency hell in maven possibleEric Sosman
|`- Re: Get away from dependency hell in maven possiblemike
+- Re: Get away from dependency hell in maven possiblee.d.pro...@gmail.com
`* Re: Get away from dependency hell in maven possibleArne Vajhøj
 `* Re: Get away from dependency hell in maven possiblee.d.pro...@gmail.com
  `* Re: Get away from dependency hell in maven possibleArne Vajhøj
   `- Re: Get away from dependency hell in maven possiblemike

1
Get away from dependency hell in maven possible

<24661170-8a5b-44a9-9e3e-aff788e65e13n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=9954&group=comp.lang.java.programmer#9954

  copy link   Newsgroups: comp.lang.java.programmer
X-Received: by 2002:a05:6214:21a9:b0:440:ff7f:5364 with SMTP id t9-20020a05621421a900b00440ff7f5364mr4458248qvc.61.1648133197504;
Thu, 24 Mar 2022 07:46:37 -0700 (PDT)
X-Received: by 2002:a05:6870:5a4:b0:da:b3f:2b17 with SMTP id
m36-20020a05687005a400b000da0b3f2b17mr6814050oap.182.1648133197277; Thu, 24
Mar 2022 07:46:37 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.java.programmer
Date: Thu, 24 Mar 2022 07:46:37 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=192.176.1.85; posting-account=1c_fOgoAAADuOXlL0A4-T9PUmVHtMSYd
NNTP-Posting-Host: 192.176.1.85
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <24661170-8a5b-44a9-9e3e-aff788e65e13n@googlegroups.com>
Subject: Get away from dependency hell in maven possible
From: mikaelpe...@hotmail.com (mike)
Injection-Date: Thu, 24 Mar 2022 14:46:37 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 16
 by: mike - Thu, 24 Mar 2022 14:46 UTC

Hi,

Today we have a framework that user make java code calls to a java API.

Project, a monolith,consists of multiple maven modules but also numerous in-house made java libraries.

The problem today is that each module depends on specific versions of libraries. So when using any of the in-house libraries we cannot just upgrade a dependency since the same must be done for other libraries used in the project.

So what we wish for is a separate deplorable java components that can be managed independently.

I have read about micro-services but they only use rest calls (AFAIK) but we need to make java calls between the different components.

Is it possible? Any hints?

br,

//mike

Re: Get away from dependency hell in maven possible

<t1i90l$8ng$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=9955&group=comp.lang.java.programmer#9955

  copy link   Newsgroups: comp.lang.java.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: esos...@comcast-dot-net.invalid (Eric Sosman)
Newsgroups: comp.lang.java.programmer
Subject: Re: Get away from dependency hell in maven possible
Date: Thu, 24 Mar 2022 13:16:05 -0400
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <t1i90l$8ng$1@dont-email.me>
References: <24661170-8a5b-44a9-9e3e-aff788e65e13n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 24 Mar 2022 17:16:05 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="b0bb7e68e04c32df2e6f238b3c8a0361";
logging-data="8944"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/CBzLMz75hgTN7WAGmxCWY"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.7.0
Cancel-Lock: sha1:pBL7Hjx4R3MzEiT6eJqdARHT7vs=
In-Reply-To: <24661170-8a5b-44a9-9e3e-aff788e65e13n@googlegroups.com>
Content-Language: en-US
 by: Eric Sosman - Thu, 24 Mar 2022 17:16 UTC

On 3/24/2022 10:46 AM, mike wrote:
> [...]
>
> So what we wish for is a separate deplorable java components that can be managed independently.

Perhaps I can help: My Java has often been called "deplorable."

:)

--
esosman@comcast-dot-net.invalid
Look on my code, ye Hackers, and guffaw!

Re: Get away from dependency hell in maven possible

<4cf9a1d7-cb3e-4f6c-aed8-5b38e0d82aa1n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=9956&group=comp.lang.java.programmer#9956

  copy link   Newsgroups: comp.lang.java.programmer
X-Received: by 2002:a37:acc:0:b0:67d:320e:7eb with SMTP id 195-20020a370acc000000b0067d320e07ebmr4033696qkk.513.1648143124796;
Thu, 24 Mar 2022 10:32:04 -0700 (PDT)
X-Received: by 2002:a05:6808:2198:b0:2da:10f7:f81b with SMTP id
be24-20020a056808219800b002da10f7f81bmr3129992oib.145.1648143124493; Thu, 24
Mar 2022 10:32:04 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.java.programmer
Date: Thu, 24 Mar 2022 10:32:04 -0700 (PDT)
In-Reply-To: <24661170-8a5b-44a9-9e3e-aff788e65e13n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=98.237.40.232; posting-account=2czF5goAAAD4GBMPIGV4KcD2K4PhoB_H
NNTP-Posting-Host: 98.237.40.232
References: <24661170-8a5b-44a9-9e3e-aff788e65e13n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <4cf9a1d7-cb3e-4f6c-aed8-5b38e0d82aa1n@googlegroups.com>
Subject: Re: Get away from dependency hell in maven possible
From: e.d.prog...@gmail.com (e.d.pro...@gmail.com)
Injection-Date: Thu, 24 Mar 2022 17:32:04 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 44
 by: e.d.pro...@gmail.com - Thu, 24 Mar 2022 17:32 UTC

On Thursday, March 24, 2022 at 10:46:45 AM UTC-4, mike wrote:
> Hi,
>
> Today we have a framework that user make java code calls to a java API.
>
> Project, a monolith,consists of multiple maven modules but also numerous in-house made java libraries.
>
> The problem today is that each module depends on specific versions of libraries. So when using any of the in-house libraries we cannot just upgrade a dependency since the same must be done for other libraries used in the project.
>
> So what we wish for is a separate deplorable java components that can be managed independently.
>
> I have read about micro-services but they only use rest calls (AFAIK) but we need to make java calls between the different components.
>
> Is it possible? Any hints?
>
> br,
>
> //mike

For my work project I put all the code in one project. This project has a pom with dependency management specifying all dependencies and versions. Under that project it's broken up into modules. Each module has it's own pom which can specify type, either war type to be published with it's own url, jar type to be packaged as a dependency of a war module, or pom type which simply executes a pom step. Each of those modules has it's own pom which specifies it's own dependency, with no versions by default. Versions can inherit from the parent, and may be overridden if you need to make an exception..
If you're hosting different versions of in house dependency jar code, you can put those jars into the project in a folder structure, under the main or a separate module. You can use the pom with the maven-install-plugin to install those jars from there into your local maven repository, and reference them from other modules as regular maven dependencies.
While they share a common structure for version management, and can reference each other so common code gets built into one jar which may be copied into multiple wars, each war module may be deployed (deplored?) independently.. Put these wars on the same domain and they should have no problem calling each other.

Re: Get away from dependency hell in maven possible

<623cb629$0$704$14726298@news.sunsite.dk>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=9957&group=comp.lang.java.programmer#9957

  copy link   Newsgroups: comp.lang.java.programmer
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail
Date: Thu, 24 Mar 2022 14:19:15 -0400
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.7.0
Subject: Re: Get away from dependency hell in maven possible
Content-Language: en-US
Newsgroups: comp.lang.java.programmer
References: <24661170-8a5b-44a9-9e3e-aff788e65e13n@googlegroups.com>
From: arn...@vajhoej.dk (Arne Vajhøj)
In-Reply-To: <24661170-8a5b-44a9-9e3e-aff788e65e13n@googlegroups.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 37
Message-ID: <623cb629$0$704$14726298@news.sunsite.dk>
Organization: SunSITE.dk - Supporting Open source
NNTP-Posting-Host: 33d4d580.news.sunsite.dk
X-Trace: 1648145961 news.sunsite.dk 704 arne@vajhoej.dk/68.9.63.232:50328
X-Complaints-To: staff@sunsite.dk
 by: Arne Vajhøj - Thu, 24 Mar 2022 18:19 UTC

On 3/24/2022 10:46 AM, mike wrote:
> Today we have a framework that user make java code calls to a java
> API.
>
> Project, a monolith,consists of multiple maven modules but also
> numerous in-house made java libraries.
>
> The problem today is that each module depends on specific versions of
> libraries. So when using any of the in-house libraries we cannot just
> upgrade a dependency since the same must be done for other libraries
> used in the project.
>
> So what we wish for is a separate deplorable java components that can
> be managed independently.
>
> I have read about micro-services but they only use rest calls (AFAIK)
> but we need to make java calls between the different components.
>
> Is it possible? Any hints?

You can only do what you can do.

You can switch to a model with multiple micro-services
that makes network calls to each other.

Or you can stay with a single application and Java
calls.

If you chose the latter then the way to support different versions
of libraries it to switch to a model where each module is loaded
by separate classloaders from separate classpaths.

There are a few options for that. You can go custom. There is
OSGi. Etc..

Arne

Re: Get away from dependency hell in maven possible

<9345bbbb-3412-49a0-9a95-92cdcb7c034dn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=9958&group=comp.lang.java.programmer#9958

  copy link   Newsgroups: comp.lang.java.programmer
X-Received: by 2002:a05:622a:148e:b0:2e2:2ebd:63d9 with SMTP id t14-20020a05622a148e00b002e22ebd63d9mr5877045qtx.601.1648146252467;
Thu, 24 Mar 2022 11:24:12 -0700 (PDT)
X-Received: by 2002:a05:6808:2104:b0:2da:1ea7:e05b with SMTP id
r4-20020a056808210400b002da1ea7e05bmr3132180oiw.249.1648146252188; Thu, 24
Mar 2022 11:24:12 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.java.programmer
Date: Thu, 24 Mar 2022 11:24:11 -0700 (PDT)
In-Reply-To: <623cb629$0$704$14726298@news.sunsite.dk>
Injection-Info: google-groups.googlegroups.com; posting-host=98.237.40.232; posting-account=2czF5goAAAD4GBMPIGV4KcD2K4PhoB_H
NNTP-Posting-Host: 98.237.40.232
References: <24661170-8a5b-44a9-9e3e-aff788e65e13n@googlegroups.com> <623cb629$0$704$14726298@news.sunsite.dk>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <9345bbbb-3412-49a0-9a95-92cdcb7c034dn@googlegroups.com>
Subject: Re: Get away from dependency hell in maven possible
From: e.d.prog...@gmail.com (e.d.pro...@gmail.com)
Injection-Date: Thu, 24 Mar 2022 18:24:12 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 17
 by: e.d.pro...@gmail.com - Thu, 24 Mar 2022 18:24 UTC

> You can only do what you can do.
>
> You can switch to a model with multiple micro-services
> that makes network calls to each other.
>
> Or you can stay with a single application and Java
> calls.
>
> If you chose the latter then the way to support different versions
> of libraries it to switch to a model where each module is loaded
> by separate classloaders from separate classpaths.
>
> There are a few options for that. You can go custom. There is
> OSGi. Etc..
>
> Arne

Deploy an app as multiple war files, each gets it's own classpath. They can share code from a common module which packages a copy of a jar into each war. If they need to share each other's code, it's http calls, which is normal in the front end code.

Re: Get away from dependency hell in maven possible

<623cbd23$0$696$14726298@news.sunsite.dk>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=9959&group=comp.lang.java.programmer#9959

  copy link   Newsgroups: comp.lang.java.programmer
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail
Date: Thu, 24 Mar 2022 14:49:05 -0400
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.7.0
Subject: Re: Get away from dependency hell in maven possible
Content-Language: en-US
Newsgroups: comp.lang.java.programmer
References: <24661170-8a5b-44a9-9e3e-aff788e65e13n@googlegroups.com>
<623cb629$0$704$14726298@news.sunsite.dk>
<9345bbbb-3412-49a0-9a95-92cdcb7c034dn@googlegroups.com>
From: arn...@vajhoej.dk (Arne Vajhøj)
In-Reply-To: <9345bbbb-3412-49a0-9a95-92cdcb7c034dn@googlegroups.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 26
Message-ID: <623cbd23$0$696$14726298@news.sunsite.dk>
Organization: SunSITE.dk - Supporting Open source
NNTP-Posting-Host: 33d4d580.news.sunsite.dk
X-Trace: 1648147747 news.sunsite.dk 696 arne@vajhoej.dk/68.9.63.232:51415
X-Complaints-To: staff@sunsite.dk
 by: Arne Vajhøj - Thu, 24 Mar 2022 18:49 UTC

On 3/24/2022 2:24 PM, e.d.pro...@gmail.com wrote:
>> You can only do what you can do.
>>
>> You can switch to a model with multiple micro-services that makes
>> network calls to each other.
>>
>> Or you can stay with a single application and Java calls.
>>
>> If you chose the latter then the way to support different versions
>> of libraries it to switch to a model where each module is loaded by
>> separate classloaders from separate classpaths.
>>
>> There are a few options for that. You can go custom. There is OSGi.
>> Etc..
>
> Deploy an app as multiple war files, each gets it's own classpath.
> They can share code from a common module which packages a copy of a
> jar into each war. If they need to share each other's code, it's http
> calls, which is normal in the front end code.

A servlet engine also provide the different classloaders, but if
a switch from Java calls to HTTP calls is warranted then SpringBoot
micro-services is a bit more modern.

Arne

Re: Get away from dependency hell in maven possible

<7e363bc2-e804-47cc-b908-d97cff4b2d09n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=9960&group=comp.lang.java.programmer#9960

  copy link   Newsgroups: comp.lang.java.programmer
X-Received: by 2002:ac8:7e87:0:b0:2e0:5e20:5fe9 with SMTP id w7-20020ac87e87000000b002e05e205fe9mr7779777qtj.382.1648189891313;
Thu, 24 Mar 2022 23:31:31 -0700 (PDT)
X-Received: by 2002:a4a:d28b:0:b0:324:7eb6:c6f5 with SMTP id
h11-20020a4ad28b000000b003247eb6c6f5mr3230669oos.35.1648189891026; Thu, 24
Mar 2022 23:31:31 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.java.programmer
Date: Thu, 24 Mar 2022 23:31:30 -0700 (PDT)
In-Reply-To: <t1i90l$8ng$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=83.253.144.66; posting-account=1c_fOgoAAADuOXlL0A4-T9PUmVHtMSYd
NNTP-Posting-Host: 83.253.144.66
References: <24661170-8a5b-44a9-9e3e-aff788e65e13n@googlegroups.com> <t1i90l$8ng$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <7e363bc2-e804-47cc-b908-d97cff4b2d09n@googlegroups.com>
Subject: Re: Get away from dependency hell in maven possible
From: mikaelpe...@hotmail.com (mike)
Injection-Date: Fri, 25 Mar 2022 06:31:31 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 17
 by: mike - Fri, 25 Mar 2022 06:31 UTC

torsdag 24 mars 2022 kl. 18:16:19 UTC+1 skrev Eric Sosman:
> On 3/24/2022 10:46 AM, mike wrote:
> > [...]
> >
> > So what we wish for is a separate deplorable java components that can be managed independently.
> Perhaps I can help: My Java has often been called "deplorable."
>
> :)
>
>
> --
> eso...@comcast-dot-net.invalid
> Look on my code, ye Hackers, and guffaw!
Hi Eric,

Yes it should read "deployable". Sorry about the confusion :-)

//mike

Re: Get away from dependency hell in maven possible

<ed117164-53d2-4412-9fac-7fcdbc455d3fn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=9961&group=comp.lang.java.programmer#9961

  copy link   Newsgroups: comp.lang.java.programmer
X-Received: by 2002:ad4:5949:0:b0:441:8296:a12d with SMTP id eo9-20020ad45949000000b004418296a12dmr1110502qvb.4.1648191974366;
Fri, 25 Mar 2022 00:06:14 -0700 (PDT)
X-Received: by 2002:a05:6808:2019:b0:2ec:bcde:efe with SMTP id
q25-20020a056808201900b002ecbcde0efemr9504036oiw.266.1648191974072; Fri, 25
Mar 2022 00:06:14 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.java.programmer
Date: Fri, 25 Mar 2022 00:06:13 -0700 (PDT)
In-Reply-To: <623cbd23$0$696$14726298@news.sunsite.dk>
Injection-Info: google-groups.googlegroups.com; posting-host=83.253.144.66; posting-account=1c_fOgoAAADuOXlL0A4-T9PUmVHtMSYd
NNTP-Posting-Host: 83.253.144.66
References: <24661170-8a5b-44a9-9e3e-aff788e65e13n@googlegroups.com>
<623cb629$0$704$14726298@news.sunsite.dk> <9345bbbb-3412-49a0-9a95-92cdcb7c034dn@googlegroups.com>
<623cbd23$0$696$14726298@news.sunsite.dk>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ed117164-53d2-4412-9fac-7fcdbc455d3fn@googlegroups.com>
Subject: Re: Get away from dependency hell in maven possible
From: mikaelpe...@hotmail.com (mike)
Injection-Date: Fri, 25 Mar 2022 07:06:14 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 57
 by: mike - Fri, 25 Mar 2022 07:06 UTC

torsdag 24 mars 2022 kl. 19:49:21 UTC+1 skrev Arne Vajhøj:
> On 3/24/2022 2:24 PM, e.d.pro...@gmail.com wrote:
> >> You can only do what you can do.
> >>
> >> You can switch to a model with multiple micro-services that makes
> >> network calls to each other.
> >>
> >> Or you can stay with a single application and Java calls.
> >>
> >> If you chose the latter then the way to support different versions
> >> of libraries it to switch to a model where each module is loaded by
> >> separate classloaders from separate classpaths.
> >>
> >> There are a few options for that. You can go custom. There is OSGi.
> >> Etc..
> >
> > Deploy an app as multiple war files, each gets it's own classpath.
> > They can share code from a common module which packages a copy of a
> > jar into each war. If they need to share each other's code, it's http
> > calls, which is normal in the front end code.
> A servlet engine also provide the different classloaders, but if
> a switch from Java calls to HTTP calls is warranted then SpringBoot
> micro-services is a bit more modern.
>
> Arne

Thanks for all the hints!

Current project is maven modules. Then modules has dependencies to inner-source libraries that can in turn use open source libraries :-)

Users write test code like:

XX myXXResource = Resource.getXXResource();

myXXResource.connect();
myXXResource.upgrade();
//helpers to poll for a ready state on the resource before we can continue.

So end-users have their own repo (git) and creates a dependency to our framework and then write testcases using similar code as above.
The problem as I see it is that we deploy one large jar (monolith) but only a portion is really needed by each test repo.

And besides, as mentioned in the heading of this message, we have the same dependency in multiple places which makes it hard to upgrade.
OSGI seems interesting...

In an ideal world when test code is running in a user repo we should only load components that are actually used and not more.

I appreciate all your thoughts and ideas and experienced input for an open discussion.

//mike

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor