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: Attaching dependency-reduced POM to build using Maven Assembly or Shade

2021-04-25 Thread Jim N
there's nothing that really painlessly replaced the first maven fatjar since it became outmoded. that said, i use dependency plugin to dump a lib/ dir even for reactor builds, and then a shell script that uses that classpath syntax to load a directory at a time. this happens with maven exec

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

2021-04-25 Thread Thomas Broyer
Well, maven-shade-plugin does "attach" the dependency-reduced POM: https://github.com/apache/maven-shade-plugin/blob/768092f38b0b1650217642cf10b7b0c381cbf707/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java#L1191 At least when you install or deployed, that POM gets

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

2021-04-25 Thread Alexander Kriegisch
Last time I checked, Maven Shade did *not* attach the dependency-reduced POM, but that was a while ago and the project I am contributing to uses Maven Assembly. I am certainly going to try again later today or tomorrow when I back at my desk and have access to my computer. I shall report back

Re: Scratching my head over repositories ...

2021-04-25 Thread Tommy Svensson
Oh damn it! I should have figured that out! It now works. Thanks Anders! /Tommy   Från: Anders Hammar Svara: Maven Users List Datum: 24 april 2021 at 19:43:58 Till: Maven Users List Ämne:  Re: Scratching my head over repositories ... Ok, the problem is that you've declared a repository but

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

2021-04-25 Thread Mark Eggers
For executable JARs I do this as well. Sometimes for simpler projects, I'll add: true lib/ to the JAR plugin. I use the assembly plugin to place everything in its proper place. That way I can just ship a tar.gz or zip file with all of the bits. Unzip / untar

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

2021-04-25 Thread Alexander Kriegisch
Those artifacts go to Maven Central in case of a release. Even for snapshots I need to "fret over" them, because if another Maven project depends on such an artifact, it gets unnecessary transitive dependencies. You can trust that I am not raising a non-issue here, but thanks for the comment. --

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 Alexander Kriegisch
With all due respect, this is horrible. It is not just a scripted build and like Ant through the back door, but also shell- and platform-specific (unless you happen to have Git Bash or so installe on Windows). Furthermore, it does not even relate to my question. -- Alexander Kriegisch

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

2021-04-25 Thread Alexander Kriegisch
> I doubt that uberjars should be used as dependencies at all I disagree. There are tons of valid usage scenarios. Look at AspectJ runtime, AspectJ tools (compiler), AspectJ weaver, dozens of Java agents which might contain relocated classes from ASM and/or Byte Buddy etc. You want to use those,

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

2021-04-25 Thread Alexander Kriegisch
As promised, some more feedback: Thomas is right, I was wrong. Maven Shade does attach the DRP, I just did not use it because it is created by default in the base directory, not in the build directory, which causes extra hoops to jump through concerning Maven Clean and .gitignore. The output