RE: Maven-Assembly-Plugin v3.4.1 not correctly processing assembly descriptors?
Unfortunately, I already tried it but v3.3.1 of the maven-common-artifact-filters is for the moment in no maven repository available, so dependency resolution fails. I don't know where to download the artifact otherwise (github page doesn't include references to builds). Kind Regards, J.P. -Original Message- From: Karl Heinz Marbaise Sent: dinsdag 19 juli 2022 13:42 To: Maven Users List Subject: Re: Maven-Assembly-Plugin v3.4.1 not correctly processing assembly descriptors? Hi, You can verify that if you simply add the maven-common-artifact-filters version in the dependencies part of the plugin configuration where you defined the dvtm.base Assembly Kind regards Karl Heinz Marbaise On 19.07.22 12:55, Jean Pierre URKENS wrote: > Looks like the issue is already reported: > https://issues.apache.org/jira/projects/MASSEMBLY/issues/MASSEMBLY-969 > ?filter=allopenissues > and solved by > https://github.com/apache/maven-common-artifact-filters/pull/29. > > Maven-Assembly-Plugin v3.4.1 uses maven-common-artifact-filters v3.3.0 > -> fails Maven-Assembly-Plugin v3.3.0 uses > maven-common-artifact-filters v3.1.0 -> works > > I will need maven-common-artifact-filters v3.3.1 released on 16/07/2022. > > > > -Original Message- > From: Karl Heinz Marbaise > Sent: dinsdag 19 juli 2022 12:39 > To: Maven Users List > Subject: Re: Maven-Assembly-Plugin v3.4.1 not correctly processing > assembly descriptors? > > Hi, > > > can you make an example project on github or alike... > > > Kind regards > Karl Heinz Marbaise > > On 19.07.22 12:07, Jean Pierre URKENS wrote: >> I am trying to re-zip some deliverables into one packaging using the >> maven-assembly-plugin. >> >> My plugin configuration looks like: >> >> >> >>org.apache.maven.plugins >> >> >> *maven-assembly-plugin* >> >> 3.4.1 >> >> >> >> >> >>dvtm.base >> >> Assembly >> >> >> ${dvtm.base.assembly.version}> version> >> >> >> >> >> >> >> >> >> >> >> unziprezip >> >> >> >> >> >> >> >> >> >> I.e. the descriptor unziprezip is located in the artifact >> dvtm.base.Assembly and contains a dependencySet as follows: >> >> >> >> >> >> provided >> >> / >> >> false >> >> true >> >> >> >> ** >> >> dvtm*:*:zip:deliverables >> >> >> >> >> >> >> >> >> >> Now if I try to execute ‘mvn assembly:single’ I get the error: Error >> creating assembly archive deliverables: archive cannot be empty -> >> [Help 1] >> >> >> >> Looking at the maven log file I see that: >> >> 0.The plugin configuration looks like: >> >> [DEBUG] Configuring mojo >> 'org.apache.maven.plugins:maven-assembly-plugin:3.4.1:single' with >> basic configurator --> >> >> [DEBUG] (s) appendAssemblyId = true >> >> [DEBUG] (f) attach = true >> >> [DEBUG] (s) basedir = >> f:\Documents\Workspaces\AEO-Gitlab\aeo-kmo-portefeuille-parent >> >> [DEBUG] (s) descriptorRefs = [unziprezip] >> >> [DEBUG] (f) dryRun = false >> >> [DEBUG] (f) encoding = UTF-8 >> >> [DEBUG] (s) finalName = AEO-KMO-Portefeuille-Parent-6.0.0-SNAPSHOT >> >> [DEBUG] (f) ignoreDirFormatExtensions = true >> >> [DEBUG] (f) ignoreMissingDescriptor = false >> >> [DEBUG] (f) ignorePermissions = false >> >> [DEBUG] (f) includeProjectBuildFilters = true >> >> [DEBUG] (s) localRepository = id: local >> >> [DEBUG] (f) mavenSession = >> org.apache.maven.execution.MavenSession@586cc15d >> >> [DEBUG] (s) outputDirectory = >> f:\Documents\Workspaces\AEO-Gitlab\aeo-kmo-portefeuille-parent\target >> >> [DEBUG] (f) project = MavenProject: >> dvtm.aeo.kmop:AEO-KMO-Portefeuille-Parent:6.0.0-SNAPSHOT @ >> f:\Documents\Workspaces\AEO-Gitlab\aeo-kmo-portefeuille-
RE: Maven-Assembly-Plugin v3.4.1 not correctly processing assembly descriptors?
Looks like the issue is already reported: https://issues.apache.org/jira/projects/MASSEMBLY/issues/MASSEMBLY-969?filter=allopenissues and solved by https://github.com/apache/maven-common-artifact-filters/pull/29. Maven-Assembly-Plugin v3.4.1 uses maven-common-artifact-filters v3.3.0 -> fails Maven-Assembly-Plugin v3.3.0 uses maven-common-artifact-filters v3.1.0 -> works I will need maven-common-artifact-filters v3.3.1 released on 16/07/2022. -Original Message- From: Karl Heinz Marbaise Sent: dinsdag 19 juli 2022 12:39 To: Maven Users List Subject: Re: Maven-Assembly-Plugin v3.4.1 not correctly processing assembly descriptors? Hi, can you make an example project on github or alike... Kind regards Karl Heinz Marbaise On 19.07.22 12:07, Jean Pierre URKENS wrote: > I am trying to re-zip some deliverables into one packaging using the > maven-assembly-plugin. > > My plugin configuration looks like: > > > > org.apache.maven.plugins > > > *maven-assembly-plugin* > > 3.4.1 > > > > > > dvtm.base > > Assembly > > > ${dvtm.base.assembly.version} version> > > > > > > > > > > > unziprezip > > > > > > > > > > I.e. the descriptor unziprezip is located in the artifact > dvtm.base.Assembly and contains a dependencySet as follows: > > > > > > provided > > / > > false > > true > > > >** > > dvtm*:*:zip:deliverables > > > > > > > > > > Now if I try to execute ‘mvn assembly:single’ I get the error: Error > creating assembly archive deliverables: archive cannot be empty -> > [Help 1] > > > > Looking at the maven log file I see that: > > 0.The plugin configuration looks like: > > [DEBUG] Configuring mojo > 'org.apache.maven.plugins:maven-assembly-plugin:3.4.1:single' with > basic configurator --> > > [DEBUG] (s) appendAssemblyId = true > > [DEBUG] (f) attach = true > > [DEBUG] (s) basedir = > f:\Documents\Workspaces\AEO-Gitlab\aeo-kmo-portefeuille-parent > > [DEBUG] (s) descriptorRefs = [unziprezip] > > [DEBUG] (f) dryRun = false > > [DEBUG] (f) encoding = UTF-8 > > [DEBUG] (s) finalName = AEO-KMO-Portefeuille-Parent-6.0.0-SNAPSHOT > > [DEBUG] (f) ignoreDirFormatExtensions = true > > [DEBUG] (f) ignoreMissingDescriptor = false > > [DEBUG] (f) ignorePermissions = false > > [DEBUG] (f) includeProjectBuildFilters = true > > [DEBUG] (s) localRepository = id: local > > [DEBUG] (f) mavenSession = > org.apache.maven.execution.MavenSession@586cc15d > > [DEBUG] (s) outputDirectory = > f:\Documents\Workspaces\AEO-Gitlab\aeo-kmo-portefeuille-parent\target > > [DEBUG] (f) project = MavenProject: > dvtm.aeo.kmop:AEO-KMO-Portefeuille-Parent:6.0.0-SNAPSHOT @ > f:\Documents\Workspaces\AEO-Gitlab\aeo-kmo-portefeuille-parent\pom.xml > > [DEBUG] (s) reactorProjects = [MavenProject: > dvtm.aeo.kmop:AEO-KMO-Portefeuille-Parent:6.0.0-SNAPSHOT @ > f:\Documents\Workspaces\AEO-Gitlab\aeo-kmo-portefeuille-parent\pom.xml > ] > > [DEBUG] (f) recompressZippedFiles = true > > [DEBUG] (f) remoteRepositories = […] > > [DEBUG] (f) runOnlyAtExecutionRoot = false > > [DEBUG] (s) siteDirectory = > f:\Documents\Workspaces\AEO-Gitlab\aeo-kmo-portefeuille-parent\target\ > site > > [DEBUG] (f) skipAssembly = false > > [DEBUG] (s) tarLongFileMode = warn > > [DEBUG] (s) tempRoot = > f:\Documents\Workspaces\AEO-Gitlab\aeo-kmo-portefeuille-parent\target\ > archive-tmp > > [DEBUG] (f) updateOnly = false > > [DEBUG] (f) useJvmChmod = false > > [DEBUG] (s) workDirectory = > f:\Documents\Workspaces\AEO-Gitlab\aeo-kmo-portefeuille-parent\target\ > assembly\work > > [DEBUG] -- end configuration -- > > 1.My project dependencies are included (and they do exist): > > [DEBUG] Dependencies for project: > dvtm.aeo.kmop:AEO-KMO-Portefeuille-Parent:jar:6.0.0-SNAPSHOT are: > > dvtm.aeo.kmop:AEO-KMO-Portefeuille:zip:deliverables:6.0.0:provided > > dvtm.aeo.kmop:AEO-KMO-Portefeuille-EAWS-webservice:zip:deliverables:2. > 0.2:provided > > dvtm.aeo.kmop:AEO-KMO-Portefeuille-Emitt
Maven-Assembly-Plugin v3.4.1 not correctly processing assembly descriptors?
I am trying to re-zip some deliverables into one packaging using the maven-assembly-plugin. My plugin configuration looks like: org.apache.maven.plugins *maven-assembly-plugin* 3.4.1 dvtm.base Assembly ${dvtm.base.assembly.version} unziprezip I.e. the descriptor unziprezip is located in the artifact dvtm.base.Assembly and contains a dependencySet as follows: provided / false true ** dvtm*:*:zip:deliverables Now if I try to execute ‘mvn assembly:single’ I get the error: Error creating assembly archive deliverables: archive cannot be empty -> [Help 1] Looking at the maven log file I see that: 0.The plugin configuration looks like: [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-assembly-plugin:3.4.1:single' with basic configurator --> [DEBUG] (s) appendAssemblyId = true [DEBUG] (f) attach = true [DEBUG] (s) basedir = f:\Documents\Workspaces\AEO-Gitlab\aeo-kmo-portefeuille-parent [DEBUG] (s) descriptorRefs = [unziprezip] [DEBUG] (f) dryRun = false [DEBUG] (f) encoding = UTF-8 [DEBUG] (s) finalName = AEO-KMO-Portefeuille-Parent-6.0.0-SNAPSHOT [DEBUG] (f) ignoreDirFormatExtensions = true [DEBUG] (f) ignoreMissingDescriptor = false [DEBUG] (f) ignorePermissions = false [DEBUG] (f) includeProjectBuildFilters = true [DEBUG] (s) localRepository = id: local [DEBUG] (f) mavenSession = org.apache.maven.execution.MavenSession@586cc15d [DEBUG] (s) outputDirectory = f:\Documents\Workspaces\AEO-Gitlab\aeo-kmo-portefeuille-parent\target [DEBUG] (f) project = MavenProject: dvtm.aeo.kmop:AEO-KMO-Portefeuille-Parent:6.0.0-SNAPSHOT @ f:\Documents\Workspaces\AEO-Gitlab\aeo-kmo-portefeuille-parent\pom.xml [DEBUG] (s) reactorProjects = [MavenProject: dvtm.aeo.kmop:AEO-KMO-Portefeuille-Parent:6.0.0-SNAPSHOT @ f:\Documents\Workspaces\AEO-Gitlab\aeo-kmo-portefeuille-parent\pom.xml] [DEBUG] (f) recompressZippedFiles = true [DEBUG] (f) remoteRepositories = […] [DEBUG] (f) runOnlyAtExecutionRoot = false [DEBUG] (s) siteDirectory = f:\Documents\Workspaces\AEO-Gitlab\aeo-kmo-portefeuille-parent\target\site [DEBUG] (f) skipAssembly = false [DEBUG] (s) tarLongFileMode = warn [DEBUG] (s) tempRoot = f:\Documents\Workspaces\AEO-Gitlab\aeo-kmo-portefeuille-parent\target\archive-tmp [DEBUG] (f) updateOnly = false [DEBUG] (f) useJvmChmod = false [DEBUG] (s) workDirectory = f:\Documents\Workspaces\AEO-Gitlab\aeo-kmo-portefeuille-parent\target\assembly\work [DEBUG] -- end configuration -- 1.My project dependencies are included (and they do exist): [DEBUG] Dependencies for project: dvtm.aeo.kmop:AEO-KMO-Portefeuille-Parent:jar:6.0.0-SNAPSHOT are: dvtm.aeo.kmop:AEO-KMO-Portefeuille:zip:deliverables:6.0.0:provided dvtm.aeo.kmop:AEO-KMO-Portefeuille-EAWS-webservice:zip:deliverables:2.0.2:provided dvtm.aeo.kmop:AEO-KMO-Portefeuille-Emittent:zip:deliverables:4.0.0:provided … 2.All my dependencies are filtered out when processing the dependencySet: [DEBUG] Processing DependencySet (output=/) [DEBUG] Filtering dependency artifacts WITHOUT transitive dependency path information. [DEBUG] dvtm.aeo.kmop:AEO-KMO-Portefeuille:zip:deliverables:6.0.0 *was removed by one or more filters*. … 3.In the end nothing is included in my assembly hence the final error ‘archive cannot be empty’ My project dependencies (see point 1) do match with the -filter of my dependencySet. Referring to https://maven.apache.org/plugins/maven-assembly-plugin/advanced-descriptor-topics.html , I do not understand why my dependencies are are filtered out? Is there a reference manual describing the exact configuration of the maven element ? *NOTE:* with maven-assembly-plugin set to version 3.3.0 the archive is correctly assembled. Regards, J.P.
RE: maven-war-plugin packagingExcludes not working
Yes, this worked! Thanks. -Original Message- From: Scott Kurz Sent: maandag 11 juli 2022 19:10 To: Maven Users List Subject: Re: maven-war-plugin packagingExcludes not working I tried this which seems to work: WEB-INF/classes/db/** though without tracking down the source or doc to understand why.Maybe that helps though. On Mon, Jul 11, 2022 at 9:56 AM Jean Pierre URKENS wrote: > Dear all, > > > > I am trying to exclude the resources under ‘src/main/resource/db/*’ > from being included in my war file any possible configuration of the > ‘packagingExcludes ‘ config parameter seems to be ignored: > > > > My plugin-configuration as reported during the run with debug option is: > > [DEBUG] > -- > - > > [DEBUG] Goal: org.apache.maven.plugins:maven-war-plugin:3.3.2:war > (default-war) > > [DEBUG] Style: Regular > > [DEBUG] Configuration: > > > > > > > > > true > > > > > > > 6.0.0-SNAPSHOT > > ${buildNumber} > > 11/07/2022 > 13:34:24 > > > > > > > > > > > > > > > > > > > > > > > > > > <*packagingExcludes>WEB-INF/classes/db/**/*.sql* > > > > > > > > > > > > ${maven.war.skip} > > > > > > > > op > > > > > > > > > > src/main/config > > > > log4j.properties > > > > WEB-INF/classes > > > > > >default-value="${project.build.directory}/${project.build.finalName}"/ > > > > > > > > > > I also tried specifying: > > > *WEB-INF/classes/db* > > *WEB-INF/classes/db**/ > > > > But the generated war always includes the content of this folder. So > how do I prevent a resource folder to be included in the generated war > file. > - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
maven-war-plugin packagingExcludes not working
Dear all, I am trying to exclude the resources under ‘src/main/resource/db/*’ from being included in my war file any possible configuration of the ‘packagingExcludes ‘ config parameter seems to be ignored: My plugin-configuration as reported during the run with debug option is: [DEBUG] --- [DEBUG] Goal: org.apache.maven.plugins:maven-war-plugin:3.3.2:war (default-war) [DEBUG] Style: Regular [DEBUG] Configuration: true 6.0.0-SNAPSHOT ${buildNumber} 11/07/2022 13:34:24 <*packagingExcludes>WEB-INF/classes/db/**/*.sql* ${maven.war.skip} op src/main/config log4j.properties WEB-INF/classes I also tried specifying: *WEB-INF/classes/db* *WEB-INF/classes/db**/ But the generated war always includes the content of this folder. So how do I prevent a resource folder to be included in the generated war file.
RE: Regarding component usage in maven-assembly-plugin
Have a look at http://maven.apache.org/xsd/assembly-2.1.0.xsd Look in the example assembly files that come packaged with the plugin. In the xml assembly file you'll see a reference to: http://maven.apache.org/ASSEMBLY/2.1.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.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 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: 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 v3.3.0 - how to modify generated MANIFEST.MF
Thanks, exactly what I was looking for. -Original Message- From: Thomas Broyer Sent: donderdag 18 februari 2021 11:44 To: jean-pierre.urk...@devoteam.com.invalid Cc: Maven Users List Subject: Re: maven-assembly-plugin v3.3.0 - how to modify generated MANIFEST.MF Use the 'archive' property of the assembly plugin itself (not in the assembly descriptor): http://maven.apache.org/plugins/maven-assembly-plugin/single-mojo.html#archive Le jeu. 18 févr. 2021 à 11:23, Jean-Pierre Urkens a écrit : > Hi all, > > > > I am trying to generate a ‘jar’ assembly that contains a ‘Main-Class’ > in the META-INF/MANIFEST.MF. Now it looks like the assembly plugin is > generating its own (plexus archiver) MANIFEST file with contents: > >Manifest-Version: 1.0 > > Created-By: Plexus Archiver 4.2.1 > > > > My idea was to include via a my own MANIFEST.MF file > specifying the Main-Class and ‘append’ this to the generated MANIFEST > using the ‘file-aggregator’ containerDescriptorHandler in my descriptor > file: > > > > > > > > file-aggregator > > > > .*/MANIFEST.MF > > META-INF/MANIFEST.MF > > > > > > > > > > This didn’t work so I was wondering whether it found my manifest file. > So I adjusted the above configuration to write to ‘test/ > META-INF/MANIFEST.MF’. > > My own manifest file resides under ‘db/MANIFEST.MF’ and should be > picked up > by: > > > > > > > > > ${project.build.directory}/classes > > > > false > > > > db/** > > > > > > > > > > Now it does generate an ‘test/META-INF/MANIFEST.MF’ but with following > contents: > ># Aggregated on Thu Feb 18 11:18:39 CET 2021 from: > > > > So it looks that the content of my ‘db/MANIFEST.MF’ isn’t included. > What am I missing? How can I add my own content to the generated > manifest file of this plugin? > > > > Tanks for any hints, > > > > J.P. > - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
maven-assembly-plugin v3.3.0 - how to modify generated MANIFEST.MF
Hi all, I am trying to generate a ‘jar’ assembly that contains a ‘Main-Class’ in the META-INF/MANIFEST.MF. Now it looks like the assembly plugin is generating its own (plexus archiver) MANIFEST file with contents: Manifest-Version: 1.0 Created-By: Plexus Archiver 4.2.1 My idea was to include via a my own MANIFEST.MF file specifying the Main-Class and ‘append’ this to the generated MANIFEST using the ‘file-aggregator’ containerDescriptorHandler in my descriptor file: file-aggregator .*/MANIFEST.MF META-INF/MANIFEST.MF This didn’t work so I was wondering whether it found my manifest file. So I adjusted the above configuration to write to ‘test/ META-INF/MANIFEST.MF’. My own manifest file resides under ‘db/MANIFEST.MF’ and should be picked up by: ${project.build.directory}/classes false db/** Now it does generate an ‘test/META-INF/MANIFEST.MF’ but with following contents: # Aggregated on Thu Feb 18 11:18:39 CET 2021 from: So it looks that the content of my ‘db/MANIFEST.MF’ isn’t included. What am I missing? How can I add my own content to the generated manifest file of this plugin? Tanks for any hints, J.P.