Re: maven-assembly-plugin, bin example is giving me trouble
On 11.11.23 04:54, Alexander Kriegisch wrote: Tried making my top-level module dependent on all the others Don't! That does not make any logical sense. Checked in on xalan-java branch xalan-java-mvn-refactored Please always provide a link. I have no idea where to find your project. To you, that might be obvious. to others, it is not. Don't do that because the parent runs first ... if you need some dependency order define the appropriate dependencies in your modules which automatically orders the build reactor accordingly. If you have other issue please show a real example what exactly the problem is... Kind regards Karl Heinz Marbaise - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven-assembly-plugin, bin example is giving me trouble
Duh. Just noticed that the FAQ explicitly mentions creating a child module just to achieve this sequencing in multi-module projects. Mea culpa, mea maxima culpa... I'd have hoped something could be done with phase and target, but if not, not. On 11/11/2023 11:44 AM, Joseph Kessselman wrote: Sorry: https://github.com/apache/xalan-java/tree/xalan-java-mvn-refactored (which currently has the binary assembly commented out). Dependency order... Well, I'm currently running the assembly at the top level, which would presumably mean it has to run after packaging of the contained modules. I suppose I could try moving it down to the module at the farthest end of the current dependency chain, or even into a new module which exists just to depend on everything else, but that feels like I'm solving the wrong problem; "give me an assembly for the whole project" is conceptually a top-level operation and I'd expect to invoke it from the root module. On 11/10/2023 10:54 PM, Alexander Kriegisch wrote: Tried making my top-level module dependent on all the others Don't! That does not make any logical sense. Checked in on xalan-java branch xalan-java-mvn-refactored Please always provide a link. I have no idea where to find your project. To you, that might be obvious. to others, it is not. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven-assembly-plugin, bin example is giving me trouble
Sorry: https://github.com/apache/xalan-java/tree/xalan-java-mvn-refactored (which currently has the binary assembly commented out). Dependency order... Well, I'm currently running the assembly at the top level, which would presumably mean it has to run after packaging of the contained modules. I suppose I could try moving it down to the module at the farthest end of the current dependency chain, or even into a new module which exists just to depend on everything else, but that feels like I'm solving the wrong problem; "give me an assembly for the whole project" is conceptually a top-level operation and I'd expect to invoke it from the root module. On 11/10/2023 10:54 PM, Alexander Kriegisch wrote: Tried making my top-level module dependent on all the others Don't! That does not make any logical sense. Checked in on xalan-java branch xalan-java-mvn-refactored Please always provide a link. I have no idea where to find your project. To you, that might be obvious. to others, it is not. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven-assembly-plugin, bin example is giving me trouble
> Tried making my top-level module dependent on all the others Don't! That does not make any logical sense. > Checked in on xalan-java branch xalan-java-mvn-refactored Please always provide a link. I have no idea where to find your project. To you, that might be obvious. to others, it is not. -- Alexander Kriegisch Joseph Kessselman schrieb am 11.11.2023 09:51 (GMT +07:00): > Tried making my top-level module dependent on all the others so the > assembly invoked there would run last. Unfortunately, it seems the > dependencies are inherited to all the children, and Maven complains > about dependencies upon self. > > I presume there's an obvious idiom that I just haven't yet beaten into > my head. > > Checked in on xalan-java branch xalan-java-mvn-refactored with bin > assembly commented out, if anyone wants to see it in context. > > > On 11/10/2023 9:37 PM, Joseph Kessselman wrote: >> Oh. I probably forgot to set dependencies. Checking. >> >> >> On 11/10/2023 9:35 PM, Joseph Kessselman wrote: >>> I'm trying to adapt the examples given at >>> https://maven.apache.org/plugins/maven-assembly-plugin to work with my >>> multi-module project. >>> >>> Source was mostly easy -- I copied the into a file, >>> tweaked its excludes (still wish it picked up the .gitinclude >>> automagically), and it worked. I'd still like to change which >>> directory the resulting archive files were written to, but that's a >>> nitpick; maybe I can copy 'em to the "ant simulation" build/ directory >>> afterward. >>> >>> >>> But binary is giving me a bit more trouble. This is working for >>> others, so I presume it's another case of my just not understanding >>> the idiom well enough. >>> >>> >>> All I did was add one more to reference >>> src/assembly/bin.xml, and dropped there a copy of the >>> taken from the page, modified to output to tar.gz and zip. I changed the >>> s to reference my artifacts, and ran mvn package again. >>> >>> Maven objects to my first child module: >>> >>> > [ERROR] Failed to execute goal >>> org.apache.maven.plugins:maven-assembly-plugin:3.6.0:single >>> (make-assembly) on project xalan-project: Failed to create assembly: >>> Artifact: xalan:serializer:jar:2.7.3 (included by module) does not >>> have an artifact with a file. Please ensure the package phase is run >>> before the assembly is generated. -> [Help 1] >>> >>> >>> This confuses me. There is indeed a file there, >>> serializer/target/serializer-2.7.3.jar, which xalan:xalan seems to >>> successfully use as the artifact for further compilation. Why isn't >>> maven-assembly-plugin finding and using it? >>> >>> If I take out the section entirely (trying to rely on >>> defaults), I get the same error message. >>> >>> Does a assembly need to be put on a later phase? Or a >>> different execution? >>> >>> >>> Any advice would bemore than welcome...! >>> >>> >>> In my pom.xml, last plugin before : >>> ... >>> >>> maven-assembly-plugin >>> 3.6.0 >>> false >>> >>> >>> src/assembly/src.xml >>> src/assembly/bin.xml >>> >>> >>> >>> >>> make-assembly >>> package >>> >>> single >>> >>> >>> >>> >>> ... >>> >>> And my bin.xml: >>> >>> >>> >>> http://maven.apache.org/ASSEMBLY/2.2.0"; >>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; >>> >>> xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.2.0 >>> http://maven.apache.org/xsd/assembly-2.2.0.xsd";> >>> bin >>> >>> tar.gz >>> zip >>> >>> true >>> >>> >>> >>> true >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> modules/maven-assembly-plugin >>> false >>> >>> >>> >>> > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven-assembly-plugin, bin example is giving me trouble
Tried making my top-level module dependent on all the others so the assembly invoked there would run last. Unfortunately, it seems the dependencies are inherited to all the children, and Maven complains about dependencies upon self. I presume there's an obvious idiom that I just haven't yet beaten into my head. Checked in on xalan-java branch xalan-java-mvn-refactored with bin assembly commented out, if anyone wants to see it in context. On 11/10/2023 9:37 PM, Joseph Kessselman wrote: Oh. I probably forgot to set dependencies. Checking. On 11/10/2023 9:35 PM, Joseph Kessselman wrote: I'm trying to adapt the examples given at https://maven.apache.org/plugins/maven-assembly-plugin to work with my multi-module project. Source was mostly easy -- I copied the into a file, tweaked its excludes (still wish it picked up the .gitinclude automagically), and it worked. I'd still like to change which directory the resulting archive files were written to, but that's a nitpick; maybe I can copy 'em to the "ant simulation" build/ directory afterward. But binary is giving me a bit more trouble. This is working for others, so I presume it's another case of my just not understanding the idiom well enough. All I did was add one more to reference src/assembly/bin.xml, and dropped there a copy of the taken from the page, modified to output to tar.gz and zip. I changed the s to reference my artifacts, and ran mvn package again. Maven objects to my first child module: > [ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:3.6.0:single (make-assembly) on project xalan-project: Failed to create assembly: Artifact: xalan:serializer:jar:2.7.3 (included by module) does not have an artifact with a file. Please ensure the package phase is run before the assembly is generated. -> [Help 1] This confuses me. There is indeed a file there, serializer/target/serializer-2.7.3.jar, which xalan:xalan seems to successfully use as the artifact for further compilation. Why isn't maven-assembly-plugin finding and using it? If I take out the section entirely (trying to rely on defaults), I get the same error message. Does a assembly need to be put on a later phase? Or a different execution? Any advice would bemore than welcome...! In my pom.xml, last plugin before : ... maven-assembly-plugin 3.6.0 false src/assembly/src.xml src/assembly/bin.xml make-assembly package single ... And my bin.xml: http://maven.apache.org/ASSEMBLY/2.2.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.2.0 http://maven.apache.org/xsd/assembly-2.2.0.xsd";> bin tar.gz zip true true modules/maven-assembly-plugin false - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven-assembly-plugin, bin example is giving me trouble
Oh. I probably forgot to set dependencies. Checking. On 11/10/2023 9:35 PM, Joseph Kessselman wrote: I'm trying to adapt the examples given at https://maven.apache.org/plugins/maven-assembly-plugin to work with my multi-module project. Source was mostly easy -- I copied the into a file, tweaked its excludes (still wish it picked up the .gitinclude automagically), and it worked. I'd still like to change which directory the resulting archive files were written to, but that's a nitpick; maybe I can copy 'em to the "ant simulation" build/ directory afterward. But binary is giving me a bit more trouble. This is working for others, so I presume it's another case of my just not understanding the idiom well enough. All I did was add one more to reference src/assembly/bin.xml, and dropped there a copy of the taken from the page, modified to output to tar.gz and zip. I changed the s to reference my artifacts, and ran mvn package again. Maven objects to my first child module: > [ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:3.6.0:single (make-assembly) on project xalan-project: Failed to create assembly: Artifact: xalan:serializer:jar:2.7.3 (included by module) does not have an artifact with a file. Please ensure the package phase is run before the assembly is generated. -> [Help 1] This confuses me. There is indeed a file there, serializer/target/serializer-2.7.3.jar, which xalan:xalan seems to successfully use as the artifact for further compilation. Why isn't maven-assembly-plugin finding and using it? If I take out the section entirely (trying to rely on defaults), I get the same error message. Does a assembly need to be put on a later phase? Or a different execution? Any advice would bemore than welcome...! In my pom.xml, last plugin before : ... maven-assembly-plugin 3.6.0 false src/assembly/src.xml src/assembly/bin.xml make-assembly package single ... And my bin.xml: http://maven.apache.org/ASSEMBLY/2.2.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.2.0 http://maven.apache.org/xsd/assembly-2.2.0.xsd";> bin tar.gz zip true true modules/maven-assembly-plugin false - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
maven-assembly-plugin, bin example is giving me trouble
I'm trying to adapt the examples given at https://maven.apache.org/plugins/maven-assembly-plugin to work with my multi-module project. Source was mostly easy -- I copied the into a file, tweaked its excludes (still wish it picked up the .gitinclude automagically), and it worked. I'd still like to change which directory the resulting archive files were written to, but that's a nitpick; maybe I can copy 'em to the "ant simulation" build/ directory afterward. But binary is giving me a bit more trouble. This is working for others, so I presume it's another case of my just not understanding the idiom well enough. All I did was add one more to reference src/assembly/bin.xml, and dropped there a copy of the taken from the page, modified to output to tar.gz and zip. I changed the s to reference my artifacts, and ran mvn package again. Maven objects to my first child module: > [ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:3.6.0:single (make-assembly) on project xalan-project: Failed to create assembly: Artifact: xalan:serializer:jar:2.7.3 (included by module) does not have an artifact with a file. Please ensure the package phase is run before the assembly is generated. -> [Help 1] This confuses me. There is indeed a file there, serializer/target/serializer-2.7.3.jar, which xalan:xalan seems to successfully use as the artifact for further compilation. Why isn't maven-assembly-plugin finding and using it? If I take out the section entirely (trying to rely on defaults), I get the same error message. Does a assembly need to be put on a later phase? Or a different execution? Any advice would bemore than welcome...! In my pom.xml, last plugin before : ... maven-assembly-plugin 3.6.0 false src/assembly/src.xml src/assembly/bin.xml make-assembly package single ... And my bin.xml: http://maven.apache.org/ASSEMBLY/2.2.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.2.0 http://maven.apache.org/xsd/assembly-2.2.0.xsd";> bin tar.gz zip true true modules/maven-assembly-plugin false - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org