Re: Maven & Github codespaces

2024-03-27 Thread Mantas Gridinas
Are you sure jdk21 is default on codespaces? An hour ago i cloned a java repository only to find that codespaces comes with 11 by default. Whats your output of java -version? Regardless, you can download your needed jdk from adoptium, and setup both $PATH and $JAVA_HOME to point to the downloaded

Re: Offloading projects cli flag into profile

2024-03-21 Thread Mantas Gridinas
> repackage > > repackage > > > ${skipRepackage} > > > > > > > F

Re: [DISCUSS] Maven Dependency Plugin

2024-03-21 Thread Mantas Gridinas
Most of the time I use copy-dependencies goal to build non fat jar deployments. Meanwhile tree goal helps figure out multimodule dependency clashes by showing resolved ransitive dependencies. As for the rest, i can see where and what could use them, but I haven't used them directly. On Thu, Mar

Offloading projects cli flag into profile

2024-03-21 Thread Mantas Gridinas
I have several spring boot applications in my reactor that need to be repackaged before deployment. Only those spring boot modules have reference to the spring boot plugin. My current approach is to build the entire reactor (via install goal), and later run repackaging goal only on particular

Re: Executing verify goal even if previous goal failed

2024-03-06 Thread Mantas Gridinas
Yep. That does the trick. Cheers On Wed, Mar 6, 2024, 12:33 Martin Höller wrote: > Hi! > > Am 06. Mär. 2024 schrieb Mantas Gridinas: > > > (Maven 3.9.4) > > > > Suppose I have failing unit tests configured via surefire plugin but I > > still want to run

Executing verify goal even if previous goal failed

2024-03-06 Thread Mantas Gridinas
(Maven 3.9.4) Suppose I have failing unit tests configured via surefire plugin but I still want to run the integration tests configured via failsafe plugin. In default case maven stops running the lifecycle/goals when one of the previous ones fails. How do I prevent that? The fail at end flag

Re: [VOTE] Require Java 17 for Maven 4

2024-02-27 Thread Mantas Gridinas
+1 On Wed, Feb 28, 2024, 09:31 Benjamin Marwell wrote: > Hi Maven Devs/Users/Committers and PMC members! > > After several discussions on the mailing lists, I would like to > start a vote in favour of setting the minimal Java bytecode target > of Maven-Core 4 to 17 and hence require Java 17 for

Configuring plugins by composition rather than inheritance

2023-12-05 Thread Mantas Gridinas
In my current project i'm working we already have a parent POM that I should be inheriting from, but when trying to integrate the spring boot I come into an issue that I should inherit their super pom instead of using our own. For dependencies its pretty simple - you use the import scope, but what

Re: deploying java app

2023-10-31 Thread Mantas Gridinas
Install phase isn't all that necessary. Iirc it's the last one in the process. So you can use either verify (which is the integration test phase) or package (which is jar generation phase and runs after unit tests) On Tue, Oct 31, 2023, 19:04 Peter Carlson wrote: > This works well, except I

Re: Maven Clean plugin's "fast" clean does not seem to do what it promises

2023-10-18 Thread Mantas Gridinas
Looks like you're on windows. Moving files is an expensive operation as far as I remember. If you have a *nix machine you can try your setup on it, for example by copying the project into virtual box or similar. On Wed, Oct 18, 2023, 14:16 Václav Haisman wrote: > Hi. > > I have tried to make

Re: elegant way to disable Nexus staging/deployment in child POMs

2023-07-30 Thread Mantas Gridinas
Sounds like a job for profiles, but I do not remember if you can load modules via profiles. The idea is your default profile/pom would not include the modules block, while your "development" or some other profile would have such block. Caveat here is intellij and/or others will break once you

Re: Maven slow

2023-04-06 Thread Mantas Gridinas
Well maven still has to go through all the lifecycle, which involves generating resources, compiling, packaging, running tests, checking snapshots, etc. So depending on your plugin, repository configuration you could get faster/slower subsequent builds. Unlike gradle, maven doesn't cache steps so

Re: How to add a library to the classpath

2023-01-06 Thread Mantas Gridinas
I'm confused. Why would your users write additional entries intk your pom? On Fri, Jan 6, 2023, 10:33 Delany wrote: > Could this help? > > https://maven.apache.org/plugins/maven-dependency-plugin/build-classpath-mojo.html > Delany > > On Fri, 6 Jan 2023 at 05:30, Siddharth Jain wrote: > > >

Re: Surefire plain text reports

2022-11-18 Thread Mantas Gridinas
I doubt anyone will update the surefire plugin in their existing projects regardless. On Fri, Nov 18, 2022, 10:23 Slawomir Jaranowski wrote: > Hi, > > By default Surefire generate plain text reports which is stored in > target/surefire-reports/yourTestName.txt > > It can be disabled by using

Re: jar aggregator projects

2022-11-08 Thread Mantas Gridinas
I think the reasoning makes sense. I would rather have a strong primitive using which I could build my own process, rather than fight an exact implementation. Current structure of an aggregator being its own packaging type is that primitive. Why do you consider having "glue boilerplate" bad,

Re: Maven Wrapper: Using it with override settings.xml

2022-09-13 Thread Mantas Gridinas
You can override which settings file is used with --settings flag. On Tue, Sep 13, 2022, 11:08 Sverre Moe wrote: > I have been looking into the Maven Wrapper. We have mostly been using > Gradle for new projects, but I was thinking of taking the Maven Wrapper in > use for our legacy projects

Re: Class defined on module path not found when running integration tests

2022-07-31 Thread Mantas Gridinas
I remember encountering something similar when I started out using modules. Basically the error message claiming that class is not found is a bit misleading because what it really means is "class failed to load". One of the causes of such failures is improper configuration of one of that class

Re: require dependency declaration

2022-07-13 Thread Mantas Gridinas
I circumvented that by setting custom repository directory every time via maven.repo.local Seems that you can configure your repository in settings.xml to use update policy "always" for releases to make sure that its always downloaded. I cannot comment on how that would work if artifact is

Re: How to retrieve target folder or jar paths from multi-module Maven project

2022-06-10 Thread Mantas Gridinas
Wouldn't the help plugin get executed for every module in the reactor and in turn output multiple build directories? On Fri, Jun 10, 2022, 09:04 Delany wrote: > Building on this, you could try this bash script. It is very slow > > while read -r pom; do mvn help:evaluate >

Re: Determine Maven Dependencies after a build

2022-04-14 Thread Mantas Gridinas
I suspect you could use dependency plugin and copy dependencies goal to pin them for now and store the produced archive somewhere for now. On Thu, Apr 14, 2022, 17:24 Creager, Greg wrote: > Thanks for all the quick responses, greatly appreciate it. I’ll have to > work with our architects and

Re: Remove SNAPSHOT from all sub-modules, but honor version

2022-04-02 Thread Mantas Gridinas
>From what I gather you want versions plugin by mojohaus. "Set" goal has flag for removing snapshot declarations as -DremoveSnapshot. https://www.mojohaus.org/versions-maven-plugin/ On Sat, Apr 2, 2022, 11:32 Mike Deitrick wrote: > Any guidance on this matter? > > On Fri, Mar 4, 2022, 7:53 AM

Re: Standarded "meta" commands language

2022-03-04 Thread Mantas Gridinas
I remember solving similar issue by binding build goals into the reactor per profile, as well as changing the scanned modules per profile. ex. -Posgi would build the project for osgi, -Pjavase would build it for regular java. In addition, you can run multiple profiles at the same time. Even right

Re: zip file is empty

2022-02-18 Thread Mantas Gridinas
I can confirm. I've encountered this on windows machines where downloads from overloaded nexuses would time out. On Sat, Feb 19, 2022, 09:04 Nils Breunese wrote: > Tushar Kapila wrote: > > > Just out of curiosity which os are you using? > > I run macOS myself, but I’ve also seen it happen on

Re: zip file is empty

2022-02-18 Thread Mantas Gridinas
Even empty jars that were produced by maven would contain META-INF/maven.{groupid}.{artifactid}/pom.* files, wouldn't they? Looking at ZipFile.java such error is thrown when the file is truly empty, and doesnt contain the zip metadata (ZipFile.java:1409 as per adopt openjdk sources). On Fri, Feb

Re: Run all tests (also in dependent modules), fail build at end

2022-02-06 Thread Mantas Gridinas
Ah, I missed the rest of the thread. Nevermind. On Sun, Feb 6, 2022 at 8:25 AM Alexander Kriegisch wrote: > Mantas Gridinas schrieb am 06.02.2022 15:11 (GMT +07:00): > > > Doesnt vrrify goal precede the install goal? > > Yes. So? What does your question imply? > > > &

Re: Run all tests (also in dependent modules), fail build at end

2022-02-06 Thread Mantas Gridinas
Doesnt vrrify goal precede the install goal? On Sun, Feb 6, 2022, 08:46 Alexander Kriegisch wrote: > Actually, I am not sure I want to compare with Install and Deploy > plugin, but because you were mentioning them: 'installAtEnd' and > 'deployAtEnd' are blessings IMO, and they are cornerstones

Re: aggregator project types

2022-01-31 Thread Mantas Gridinas
Seems reasonable to be honest. I would make a guess that aggregators with their own sources would need to decide what to do with their children: should they be treated as additional dependencies, what should be the build order of such module. But if you treat children as dependencies then you

Re: Maven Book recommendation

2022-01-29 Thread Mantas Gridinas
Looking at github's advanced search you can come up with the following list of repositories that use maven as its build tool https://github.com/search?q=extension%3Axml+filename%3Apom=Code But it seems that if you include filtering repositories by star count, the search breaks and instead

Re: resume from

2021-11-25 Thread Mantas Gridinas
If you're working with maven 3 you can check the miniguide "Guide to Woeking with multiple modules". Reactor should sort out your modules in such way that dependency modules are built earlier in the reactor but in my experience they would get skipped if you use resume flag. The guide suggests that

Re: WSDL @XmlRootElement annotation from jaxws-maven-plugin

2021-10-23 Thread Mantas Gridinas
As far as I remember, the element must only ever appear as root element to qualify as root element. If it ever appears as child to some other element it can no longer get such annotation. I think I found that while reading Kohsuke's posts in the archive.

Re: Alter configuration of another mojo

2021-09-24 Thread Mantas Gridinas
gt;>> to > >>>> configure anything: it just works and nobody complained that it was > >>>> "magic": it just did what it was supposed to do. The fact that I > cannot > >>>> configure properly the JUnit engine and that as a workarou

Re: Alter configuration of another mojo

2021-09-23 Thread Mantas Gridinas
> This means, in practice, that IF the native maven plugin is applied, THEN > the surefire mojo needs to be configured to set this property. It's an > implementation detail that users shouldn't have to worry about. For Gradle > this was trivial to implement because we can just react to the

Re: Dumb question: How to deploy a command line app?

2021-09-23 Thread Mantas Gridinas
Use dependencies plugin and copy-dependencies goal. This will copy over all of your dependencies into target/dependency folder. .m2 catalog already contains your dependencies but in reapective subfolders. Ex. foo.bar:parser would be under .m2/repository/foo/bar/parser On Thu, Sep 23, 2021, 09:00

Re: Best practice to update dependency versions for *many* projects to the current version

2021-09-03 Thread Mantas Gridinas
t some plugins > don't pick up artifact versions from dependencyManagement, breaking the > uniformity that depmng supposedly offers. Properties ensure a single source > of truth. > Delany > > On Thu, 2 Sept 2021 at 17:35, Mantas Gridinas wrote: > > > You might be

Re: Best practice to update dependency versions for *many* projects to the current version

2021-09-02 Thread Mantas Gridinas
You might be interested in running the POM per application rather than some global singular POM, since you should retain the ability to update a single application's dependencies without breaking other applications' behavior. I agree that this approach is the more time consuming than having some

Re: maven-surefire-plugin jdkToolchain meets forkCount

2021-08-26 Thread Mantas Gridinas
>From the looks of it, your toolchains plugin might not get executed. Are you sure you've configured execution phase to "validate" in toolchains plugin? Last when I had to use toolchains plugin I don't remember needing to configure particular surefire properties. See java9 with toolchains.xml

Re: OSS Nexus vs GitHub Packages

2021-07-28 Thread Mantas Gridinas
I'll second alexander. You also need to add credentials per repository that would host the package as well as that repository declaration into your pom declaration. In addition Dependabot cannot scan github packages hosts unless you give it the credentials as well. All in all, github packages

Re: Getting logging messages in child process immediately

2021-06-22 Thread Mantas Gridinas
Try flushing or something equivalent On Tue, Jun 22, 2021, 10:44 Alex Orlov wrote: > > Hi all, > > I use JPMS test modules and for debugging I use the following command: > mvn -Dmaven.failsafe.debug="-Xdebug > -Xrunjdwp:transport=dt_socket,server=y,suspe=y,address=8000 -Xnoagent >

Re: dynamic dependency list

2021-05-11 Thread Mantas Gridinas
Err Assembly plugin, not deploy. Disregard last message. On Tue, May 11, 2021 at 10:07 AM Delany wrote: > > Hi, > I can ask Maven to build a partial set of projects, for example > > mvn clean deploy -amd -pl :fortythree > > I have another :zipper project to zip the artefacts of this last command

Re: dynamic dependency list

2021-05-11 Thread Mantas Gridinas
Why not use deploy plugin for this instead? On Tue, May 11, 2021 at 10:07 AM Delany wrote: > > Hi, > I can ask Maven to build a partial set of projects, for example > > mvn clean deploy -amd -pl :fortythree > > I have another :zipper project to zip the artefacts of this last command > and deploy

Re: Parent pom plugin inheritance

2021-05-06 Thread Mantas Gridinas
The plugins you've listed are default plugins included in maven configuration. Whether you declare them or not, they will get included regardless, though not always with the version you'll want. It's not necessary to reference the elements in management blocks in child poms either. You can

Re: Attaching dependency-reduced POM to build using Maven Assembly or Shade

2021-04-25 Thread Mantas Gridinas
I second this approach. It's much more simple, maintainble and you retain the ability to monkeypatch production deployments. You can later chain it into assembly plugin to produce an archive that contains your launch scripts, dependencies, configurations, and perhaps even the JDK itself. If youre

Re: Attaching dependency-reduced POM to build using Maven Assembly or Shade

2021-04-25 Thread Mantas Gridinas
POM is only relevant if you're deploying that archive to a repository. I wouldn't fret myself over it if you're not deploying the uberjars to nexus. On Sun, Apr 25, 2021 at 2:09 AM Alexander Kriegisch wrote: > > I am sorry if I am asking a question the answer to which might be obious > to

Re: Maven internal company component sharing best practices

2021-04-13 Thread Mantas Gridinas
> > > > https://maven.apache.org/maven-release/maven-release-plugin/examples/prepare-release.html > > > > Again just looking for best practices here regarding sharing components and > > how they can be versioned independently. > > > > Thanks, > >

Re: Maven internal company component sharing best practices

2021-04-12 Thread Mantas Gridinas
Being in similar situation myself I strongly suggest against storing the "library" component in the same place as your application is stored, because you will be producing n+1 artifacts every time, where n is the modules actually required to build for your application. Your application will be

Re: Maven plugin for source generating

2021-03-09 Thread Mantas Gridinas
Sounds like you want annotation processing https://docs.oracle.com/javase/8/docs/api/javax/annotation/processing/Processor.html On Tue, Mar 9, 2021 at 4:12 PM Rimvydas Vaidelis wrote: > > Hello, > > I would like to write a maven plugin that transforms a java source code > (adds specified

Re: Maven superpom, JUnit 5 and Spring

2021-03-07 Thread Mantas Gridinas
gt; regardless of how verbose it would be? > because there is a wide diversity of plugins (more than 5,000 in Central > Repository), then nobody can define everything > > We need something extensible > > Regards, > > Hervé > > Le dimanche 7 mars 2021, 12:08:39 CET M

Re: Maven superpom, JUnit 5 and Spring

2021-03-07 Thread Mantas Gridinas
ean by > "produce the implied pom" and "some issues of irreproducability"? > > Le dimanche 7 mars 2021, 10:44:08 CET Mantas Gridinas a écrit : > > Why not provide an ability to produce the implied pom explicitly in > > current project as well? This way you would get

Re: Maven superpom, JUnit 5 and Spring

2021-03-07 Thread Mantas Gridinas
Why not provide an ability to produce the implied pom explicitly in current project as well? This way you would get around some issues of irreproducability. On Sun, Mar 7, 2021 at 9:29 AM Hervé BOUTEMY wrote: > > every existing plugin version can't be defined by Maven itself, given > diversity

Re: Regarding component usage in maven-assembly-plugin

2021-02-22 Thread Mantas Gridinas
1.0.xsd;> > > > -Original Message- > From: Mantas Gridinas > Sent: maandag 22 februari 2021 15:20 > To: users@maven.apache.org > Subject: Regarding component usage in maven-assembly-plugin > > Yo! > > I've recently started using the assembly plugin and noti

Regarding component usage in maven-assembly-plugin

2021-02-22 Thread Mantas Gridinas
Yo! I've recently started using the assembly plugin and noticed that the documentation does not specify the XSD files for component descriptor files. Is there a particular reason for this? Cheers! - To unsubscribe, e-mail: