You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by trant <mm...@webatrocity.com> on 2011/06/07 16:03:59 UTC

Maven suddenly ignoring a configuration!

I had this working fine yesterday, but I am trying to build an EAR file with
skinny WARs. Today all I did was add some deployment configurations to the
Parent project's pom file. Basically added the weblogic deployment plugin so
I can deploy the completed EAR to server. I dont think I modified anything
else.

Ever since then, the war project has started to include all the jar files
into the WEB-INF/lib folder, completely ignoring my configuration:
<packagingExcludes>WEB-INF/lib/*.jar</packagingExcludes>	 

It also didnt work if I tried:
<packagingExcludes>**/*.jar</packagingExcludes>	 

It puts the jars in there anyway! So then since my war file has those jars
in the lib, then the ear file has double the jars because it still knows to
put it's jars into the ear's lib folder, yet the war file it pulled from the
war project has the same jars in it's WEB-INF/lib.

What the heck happened?

My war file plugin looks like this:

	     <plugin>
	       <groupId>org.apache.maven.plugins</groupId>
	       <artifactId>maven-war-plugin</artifactId>
	       <configuration>        
	         <packagingExcludes>**/*.jar</packagingExcludes>	         
	         <filtering>true</filtering>	         
	         <excludes>**/test/*.*</excludes>
	         <warSourceDirectory>web</warSourceDirectory>	   
	         <warName>myProject</warName>   
	       </configuration>
	     </plugin>

It still builds the war using all the other configuration. for example it
names the war "myProject.war" instead of the default which is the project
final name including version #. So it seems to be only ignoring that one
packaingExcludes parameter.

My complete project structure is like:

main-folder
+---pom.xml (parent pom, includes reference to ear project pom and war
project pom)
+---ear-folder
____+---pom.xml (ear project pom, has pretty standard config to build skinny
wars)
+---war-folder
____+---pom.xml (war project pom, has a bunch of stuff, but only one war
plugin which tells it to exclude which is not working!)



--
View this message in context: http://maven.40175.n5.nabble.com/Maven-suddenly-ignoring-a-configuration-tp4461861p4461861.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven suddenly ignoring a configuration!

Posted by trant <mm...@webatrocity.com>.
Hi Stephen,

thanks for the quick response!

now that you mentioned maven version - I use MyEclipse which has an embedded
version of Maven. When I had this setup working yesterday I was using the
latest standalone version of Maven. So I reconfigured MyEclipse to use the
standalone version instead and it works fine!

However, now while package works as expected, the deploy goal fails on the
following error:

[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-deploy-plugin:2.4:deploy (default-deploy) on
project myProject: Deployment failed: repository element was not specified
in the pom inside distributionManagement element or in
-DaltDeploymentRepository=id::layout::url parameter -> [Help 1]

What could this mean?

--
View this message in context: http://maven.40175.n5.nabble.com/Maven-suddenly-ignoring-a-configuration-tp4461861p4462081.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven suddenly ignoring a configuration!

Posted by Stephen Connolly <st...@gmail.com>.
On 7 June 2011 15:03, trant <mm...@webatrocity.com> wrote:
> I had this working fine yesterday, but I am trying to build an EAR file with
> skinny WARs. Today all I did was add some deployment configurations to the
> Parent project's pom file. Basically added the weblogic deployment plugin so

Are you using Maven 2.x?

If yes, can you check the dependencies of this "weblogic deployment
plugin" and see if it has been a bold boy and depended on (a possibly
different version of) the maven-war-plugin

Otherwise...

is the weblogic deployment plugin forking its own lifecycle which
might include the war plugin again (only with the default
configuration - which would be solved if you move your configuration
of the war plugin into the project/build/pluginManagement/plugins as
that would be redefining the defaults for your project)

> I can deploy the completed EAR to server. I dont think I modified anything
> else.
>
> Ever since then, the war project has started to include all the jar files
> into the WEB-INF/lib folder, completely ignoring my configuration:
> <packagingExcludes>WEB-INF/lib/*.jar</packagingExcludes>
>
> It also didnt work if I tried:
> <packagingExcludes>**/*.jar</packagingExcludes>
>
> It puts the jars in there anyway! So then since my war file has those jars
> in the lib, then the ear file has double the jars because it still knows to
> put it's jars into the ear's lib folder, yet the war file it pulled from the
> war project has the same jars in it's WEB-INF/lib.
>
> What the heck happened?
>
> My war file plugin looks like this:
>
>             <plugin>
>               <groupId>org.apache.maven.plugins</groupId>
>               <artifactId>maven-war-plugin</artifactId>
>               <configuration>
>                 <packagingExcludes>**/*.jar</packagingExcludes>
>                 <filtering>true</filtering>
>                 <excludes>**/test/*.*</excludes>
>                 <warSourceDirectory>web</warSourceDirectory>
>                 <warName>myProject</warName>
>               </configuration>
>             </plugin>
>
> It still builds the war using all the other configuration. for example it
> names the war "myProject.war" instead of the default which is the project
> final name including version #. So it seems to be only ignoring that one
> packaingExcludes parameter.
>
> My complete project structure is like:
>
> main-folder
> +---pom.xml (parent pom, includes reference to ear project pom and war
> project pom)
> +---ear-folder
> ____+---pom.xml (ear project pom, has pretty standard config to build skinny
> wars)
> +---war-folder
> ____+---pom.xml (war project pom, has a bunch of stuff, but only one war
> plugin which tells it to exclude which is not working!)
>
>
>
> --
> View this message in context: http://maven.40175.n5.nabble.com/Maven-suddenly-ignoring-a-configuration-tp4461861p4461861.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org