Re: WEB-INF/lib excludes once more
WAR plugin is broken in 2.0.4 so excludes don't work. As a workaround I'm using the following: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-antrun-plugin/artifactId executions execution idpackage/id phasepackage/phase goals goalrun/goal /goals configuration tasks !-- | Repackages the generated WAR file to exclude | JARs from the WEB-INF/lib directory. This is | a workaround until the WAR plugin is fixed to | allow to exclude these files. |-- property name=war.dir value=${project.build.directory}/${project.build.finalName} / unjar src=${war.dir}.war dest=${war.dir}/ jar destfile=${war.dir}.war basedir=${war.dir} excludes=WEB-INF/lib/*.jar manifest=${war.dir}/META-INF/MANIFEST.MF / /tasks /configuration /execution /executions /plugin -- View this message in context: http://www.nabble.com/WEB-INF-lib-excludes-once-more-tf1913187.html#a5327843 Sent from the Maven - Users forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: WEB-INF/lib excludes once more
The maven version has nothing to do with it. It's broken in maven-war-plugin 2.0 and fixed in 2.0.1. -Original Message- From: Lukasz Szelag [mailto:[EMAIL PROTECTED] Sent: Friday, July 14, 2006 9:44 AM To: users@maven.apache.org Subject: Re: WEB-INF/lib excludes once more WAR plugin is broken in 2.0.4 so excludes don't work. As a workaround I'm using the following: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-antrun-plugin/artifactId executions execution idpackage/id phasepackage/phase goals goalrun/goal /goals configuration tasks !-- | Repackages the generated WAR file to exclude | JARs from the WEB-INF/lib directory. This is | a workaround until the WAR plugin is fixed to | allow to exclude these files. |-- property name=war.dir value=${project.build.directory}/${project.build.finalName} / unjar src=${war.dir}.war dest=${war.dir}/ jar destfile=${war.dir}.war basedir=${war.dir} excludes=WEB-INF/lib/*.jar manifest=${war.dir}/META-INF/MANIFEST.MF / /tasks /configuration /execution /executions /plugin -- View this message in context: http://www.nabble.com/WEB-INF-lib-excludes-once-more-tf1913187.html#a532 7843 Sent from the Maven - Users forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: WEB-INF/lib excludes once more
OK, I meant that the WAR plugin which comes with 2.0.4 is broken. Anyways, is there a way to include these libs automatically in the EAR without explicitly specifying in EAR POM all dependencies from the WAR? This is how EJB dependencies are treated in the EAR. -- View this message in context: http://www.nabble.com/WEB-INF-lib-excludes-once-more-tf1913187.html#a5330992 Sent from the Maven - Users forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: WEB-INF/lib excludes once more
The plugin does not come with Maven. Maven downloads the latest version when you first need it. If you were to install 2.0.4 today, it would download 2.0.1. No. It would be a nice feature in the EAR plugin, IMO. -Original Message- From: Lukasz Szelag [mailto:[EMAIL PROTECTED] Sent: Friday, July 14, 2006 12:38 PM To: users@maven.apache.org Subject: RE: WEB-INF/lib excludes once more OK, I meant that the WAR plugin which comes with 2.0.4 is broken. Anyways, is there a way to include these libs automatically in the EAR without explicitly specifying in EAR POM all dependencies from the WAR? This is how EJB dependencies are treated in the EAR. -- View this message in context: http://www.nabble.com/WEB-INF-lib-excludes-once-more-tf1913187.html#a533 0992 Sent from the Maven - Users forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: WEB-INF/lib excludes once more
OK, you're right and indeed excludes work in war-plugin 2.0.1. I thought that Maven releases explicitly depend on certain versions of plugins. -- View this message in context: http://www.nabble.com/WEB-INF-lib-excludes-once-more-tf1913187.html#a5333709 Sent from the Maven - Users forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WEB-INF/lib excludes once more
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I have to add a note to this: With the given POM snippet there are no dependencies generated in eclipse project anymore. This is kind of anoying and should not counted as proper solution for this I think. Markus Wolf - -- emedia-solutions wolf Wedeler Landstrasse 63 22559 Hamburg (040) 550 083 70 web: http://www.emedia-solutions-wolf.de mail: [EMAIL PROTECTED] pgp: http://wwwkeys.de.pgp.net -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEtK5leyJE91ndMG4RAlNaAJwOHFWN+Xsv8PPoP4Xv/jVa7tk1hgCfXDZ6 dCld7Wx448205RGnFPca+tY= =LTu9 -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
WEB-INF/lib excludes once more
Hi, I have a problem creating my EAR file containing a WAR and a EJB. First I setup my WAR-pom to have the EAR as provided dependency, but then it is not possible to add it to the manifests classpath. Then I read through the mailinglist and found an exclude configuration should help. But no matter how I configure my excludes they are ignored... I've checked the version of the war plugin as well and I'm using 2.0.1. Is there anything I've overlooked in my pom.xml? ... dependencies dependency groupIdde.esw.services/groupId artifactIdemediaservices-core/artifactId version1.0-SNAPSHOT/version scoperuntime/scope /dependency dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.1/version scopetest/scope /dependency /dependencies build finalNameemediaservices-web/finalName plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-war-plugin/artifactId configuration excludes excludeWEB-INF/lib/*.jar/exclude /excludes archive manifest addClasspathtrue/addClasspath /manifest /archive /configuration /plugin /plugins /build ... Any ideas? Thanks Markus Wolf -- emedia-solutions wolf Wedeler Landstrasse 63 22559 Hamburg (040) 550 083 70 web: http://www.emedia-solutions-wolf.de mail: [EMAIL PROTECTED] pgp: http://wwwkeys.de.pgp.net - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WEB-INF/lib excludes once more
With evenisse's help I just figured this out today and submitted a patch to the war plugin documentation, cf MWAR-61. I assume that what you want is for the EJB jar to be in the war's manifest classpath and your mention of putting the ear on the m. cp is a typo? Here's my configuration that works for me: build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-war-plugin/artifactId configuration archive manifest addClasspathtrue/addClasspath /manifest /archive /configuration /plugin /plugins /build dependencies dependency groupIdorg.apache.geronimo.itest/groupId artifactIdjar/artifactId version${pom.version}/version optionaltrue/optional /dependency /dependencies The build/plugin configuration generates the manifest cp, and the optionaltrue/optional prevents maven from bundling the dependency into WEB-INF/lib. Hope this is what you are looking for, david jencks On Jul 8, 2006, at 11:39 PM, Markus Wolf wrote: Hi, I have a problem creating my EAR file containing a WAR and a EJB. First I setup my WAR-pom to have the EAR as provided dependency, but then it is not possible to add it to the manifests classpath. Then I read through the mailinglist and found an exclude configuration should help. But no matter how I configure my excludes they are ignored... I've checked the version of the war plugin as well and I'm using 2.0.1. Is there anything I've overlooked in my pom.xml? ... dependencies dependency groupIdde.esw.services/groupId artifactIdemediaservices-core/artifactId version1.0-SNAPSHOT/version scoperuntime/scope /dependency dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.1/version scopetest/scope /dependency /dependencies build finalNameemediaservices-web/finalName plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-war-plugin/artifactId configuration excludes excludeWEB-INF/lib/*.jar/exclude /excludes archive manifest addClasspathtrue/addClasspath /manifest /archive /configuration /plugin /plugins /build ... Any ideas? Thanks Markus Wolf -- emedia-solutions wolf Wedeler Landstrasse 63 22559 Hamburg (040) 550 083 70 web: http://www.emedia-solutions-wolf.de mail: [EMAIL PROTECTED] pgp: http://wwwkeys.de.pgp.net - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WEB-INF/lib excludes once more
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 With evenisse's help I just figured this out today and submitted a patch to the war plugin documentation, cf MWAR-61. I assume that what you want is for the EJB jar to be in the war's manifest classpath and your mention of putting the ear on the m. cp is a typo? Thanks, this is exaclty what I was looking for. And since this does work for the ejb and jar plugins as well it is very simple. :) Thanks again Markus Wolf - -- emedia-solutions wolf Wedeler Landstrasse 63 22559 Hamburg (040) 550 083 70 web: http://www.emedia-solutions-wolf.de mail: [EMAIL PROTECTED] pgp: http://wwwkeys.de.pgp.net -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEsS/seyJE91ndMG4RAu6JAJ4q194vqmH0a//21Vk6HxJh+aJs1wCfVCS5 airHC0nwp+dkSg8qtixI7F8= =hQlt -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: WEB-INF/lib excludes once more
You are using excludes incorrectly. plugin artifactIdmaven-war-plugin/artifactId configuration warSourceExcludesWEB-INF/lib/*.jar/warSourceExcludes archive manifest addClasspathtrue/addClasspath classpathPrefixlib//classpathPrefix /manifest /archive /configuration /plugin plugin artifactIdmaven-ear-plugin/artifactId configuration defaultJavaBundleDirlib//defaultJavaBundleDir /configuration /plugin -Original Message- From: Markus Wolf [mailto:[EMAIL PROTECTED] Sent: Sunday, July 09, 2006 1:40 AM To: users@maven.apache.org Subject: WEB-INF/lib excludes once more Hi, I have a problem creating my EAR file containing a WAR and a EJB. First I setup my WAR-pom to have the EAR as provided dependency, but then it is not possible to add it to the manifests classpath. Then I read through the mailinglist and found an exclude configuration should help. But no matter how I configure my excludes they are ignored... I've checked the version of the war plugin as well and I'm using 2.0.1. Is there anything I've overlooked in my pom.xml? ... dependencies dependency groupIdde.esw.services/groupId artifactIdemediaservices-core/artifactId version1.0-SNAPSHOT/version scoperuntime/scope /dependency dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.1/version scopetest/scope /dependency /dependencies build finalNameemediaservices-web/finalName plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-war-plugin/artifactId configuration excludes excludeWEB-INF/lib/*.jar/exclude /excludes archive manifest addClasspathtrue/addClasspath /manifest /archive /configuration /plugin /plugins /build ... Any ideas? Thanks Markus Wolf -- emedia-solutions wolf Wedeler Landstrasse 63 22559 Hamburg (040) 550 083 70 web: http://www.emedia-solutions-wolf.de mail: [EMAIL PROTECTED] pgp: http://wwwkeys.de.pgp.net - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WEB-INF/lib excludes once more
Hello, the exclude paramater of the war plugin is only meant for the webapp sources, the parameter name is a little bit vague. =) if you want to exclude certain dependencies from the war, just specify the scope as compile. only dependencies with runtime scope will be included in the war. pete marvin Markus Wolf wrote: Hi, I have a problem creating my EAR file containing a WAR and a EJB. First I setup my WAR-pom to have the EAR as provided dependency, but then it is not possible to add it to the manifests classpath. Then I read through the mailinglist and found an exclude configuration should help. But no matter how I configure my excludes they are ignored... I've checked the version of the war plugin as well and I'm using 2.0.1. Is there anything I've overlooked in my pom.xml? ... dependencies dependency groupIdde.esw.services/groupId artifactIdemediaservices-core/artifactId version1.0-SNAPSHOT/version scoperuntime/scope /dependency dependency groupIdjunit/groupId artifactIdjunit/artifactId version3.8.1/version scopetest/scope /dependency /dependencies build finalNameemediaservices-web/finalName plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-war-plugin/artifactId configuration excludes excludeWEB-INF/lib/*.jar/exclude /excludes archive manifest addClasspathtrue/addClasspath /manifest /archive /configuration /plugin /plugins /build ... Any ideas? Thanks Markus Wolf - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: WEB-INF/lib excludes once more
Not true. -Original Message- From: Pete Marvin King [mailto:[EMAIL PROTECTED] Sent: Sunday, July 09, 2006 11:52 AM To: Maven Users List Subject: Re: WEB-INF/lib excludes once more if you want to exclude certain dependencies from the war, just specify the scope as compile. only dependencies with runtime scope will be included in the war. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WEB-INF/lib excludes once more
sorry my mistake, SCOPE_RUNTIME = systemScope = false; providedScope = false; compileScope = true; runtimeScope = true; testScope = false; ---AbstractWarMojo snippet -- // TODO: utilise appropriate methods from project builder ScopeArtifactFilter filter = new ScopeArtifactFilter( Artifact.SCOPE_RUNTIME ); if ( !artifact.isOptional() filter.include( artifact ) ) { String type = artifact.getType(); if ( tld.equals( type ) ) { copyFileIfModified( artifact.getFile(), new File( tldDirectory, targetFileName ) ); } else ---AbstractWarMojo snippet -- thanx for the correction mike. i need to stop assuming things. =) Mike Perham wrote: Not true. -Original Message- From: Pete Marvin King [mailto:[EMAIL PROTECTED] Sent: Sunday, July 09, 2006 11:52 AM To: Maven Users List Subject: Re: WEB-INF/lib excludes once more if you want to exclude certain dependencies from the war, just specify the scope as compile. only dependencies with runtime scope will be included in the war. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WEB-INF/lib excludes once more
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 the exclude paramater of the war plugin is only meant for the webapp sources, the parameter name is a little bit vague. =) I think the docs are loo vague about excluding something and as well adding something to the manifest classpath. if you want to exclude certain dependencies from the war, just specify the scope as compile. only dependencies with runtime scope will be included in the war. The scope compile will remove the dep. from the manifest classpath as well I think. The solution David Jencks posted as reply to my questions seems the best suited for me. But thanks for your input. Markus Wolf - -- __ Markus Wolf Wedeler Landstrasse 63 22559 Hamburg tel: (+49) 40 / 550 083 70 mob: (+49) 177 / 288 48 67 web: http://www.matrixweb.de icq: #109622365 pgp: http://wwwkeys.de.pgp.net __ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEsTWgYuGbqyQxpHcRAs1bAJ9o7vnoxObE55BgeHhuNb5UDB4aSQCgzaPK Z/r/ImOtQehcpvsnklHoMyc= =1wny -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]