Maven suddenly ignoring a configuration!

2011-06-07 Thread trant
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:
packagingExcludesWEB-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
   groupIdorg.apache.maven.plugins/groupId
   artifactIdmaven-war-plugin/artifactId
   configuration
 packagingExcludes**/*.jar/packagingExcludes
 
 filteringtrue/filtering 
 excludes**/test/*.*/excludes
 warSourceDirectoryweb/warSourceDirectory  
 warNamemyProject/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-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Maven suddenly ignoring a configuration!

2011-06-07 Thread trant
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-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



How do I add filtered properties to my pom.xml?

2011-05-18 Thread trant
I use the following setup to have maven inject filtered property values into
my application configuration files, such as the Spring
applicationContext.xml:

File System:
src/main/filters/filter-test.properties
src/main/filters/filter-live.properties
src/main/resources/applicationContext.xml

and in my pom.xml I do this:

// use profiles to setup env property value as either test or live
...
  build
filters
  filter${basedir}/src/main/filters/filter-${env}.properties/filter
/filters
resources
  resource
directorysrc/main/resources/directory
filteringtrue/filtering
  /resource
  /build

Now this works fine, but I would like to have my filter property files also
have properties entered into my pom.xml itself.

For example, later in my pom.xml I use a weblogic deployment plugin which
deploys my war to the server. This of course requires properties which are
environment specific. I wish I could have these properties in my separate
filter-env.properties files as well, because right now the only thing I
seem to get working is if I set these properties within my profiles setup. I
dont want it in the pom.xml though, I want maven to load them from my
environment specific property file.

Is there any way I can do this?

So that when I configure my weblogic plugin with for example:
  adminServerHostName${weblogic.host.name}/adminServerHostName

And I ran the pom.xml with my test profile activated, then maven should
pull the value of that property from my filter-test.properties file:
weblogic.host.name=testserver

or whatever.

--
View this message in context: 
http://maven.40175.n5.nabble.com/How-do-I-add-filtered-properties-to-my-pom-xml-tp4406945p4406945.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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



RE: How do I add filtered properties to my pom.xml?

2011-05-18 Thread trant
Martin,

Thank you for that link. 

It works!

--
View this message in context: 
http://maven.40175.n5.nabble.com/How-do-I-add-filtered-properties-to-my-pom-xml-tp4406945p4407382.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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



Re: How can I have a goal depend on another goal?

2011-05-12 Thread trant
Hi John,

Thanks for the reference to Cargo.

It looks like a cool plugin but according to the documentation it falls
short - it does not seem to support remote deploy- something which I need.
Only now during initial development am I deploying to local instance of
WebLogic, however soon when development starts to kick into high gear I'm
going to be deploying to a remote development server. Then later a remote
test server. So it would be nice to have this all done by one plugin.

--
View this message in context: 
http://maven.40175.n5.nabble.com/How-can-I-have-a-goal-depend-on-another-goal-tp4384674p4390485.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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



RE: How can I have a goal depend on another goal?

2011-05-11 Thread trant
When I say deploy I mean as in deploying my packaged application to my web
application server.


--
View this message in context: 
http://maven.40175.n5.nabble.com/How-can-I-have-a-goal-depend-on-another-goal-tp4384674p4388273.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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



Re: How can I have a goal depend on another goal?

2011-05-11 Thread trant
Yep, I didn't understand that concept.

So what I tried now is I added an execution to my plugin, as follows: 

executions
execution
phaseinstall/phase
goals
  goaldeploy/goal
/goals
/execution
/executions 

under the assumption that maven will now consider this plugin as part of the
deploy goal of the install phase?

I tried running it and it actually does do what I want, it now does all the
steps prior to deploy - build, test, package, etc...

So that's good. Not sure if I did it the right way though or just lucked
out.

But now what if I also wanted the other goal I mentioned called
weblogic:start to run prior to this deploy? What would I need to do to the
pom? I am thinking maybe put that goal in the executions prior to the
existing deploy goal? like: goalweblogic:start/goal ?? Somehow I dont
think thats the correct way to do it

--
View this message in context: 
http://maven.40175.n5.nabble.com/How-can-I-have-a-goal-depend-on-another-goal-tp4384674p4388271.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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



How can I have a goal depend on another goal?

2011-05-10 Thread trant
I am a newcomer to maven so forgive me if this sounds stupid...

I setup a web application project in MyEclipse, and built a pom.xml that
deploys my war archive to WebLogic.

this works fine, however it is just a standalone piece. For the whole
process, I need to first run maven package to build my war, then I need to
manually ensure my WebLogic server is running or the deploy task will fail
to connect.

How can I make this into one simple execution?

First, it should package my war just like package goal does.

Then immediately afterwards, it should ensure my WebLogic is started and
start it if not (or just run the weblogic:start goal I think I can ignore
the error if it finds the server already started)

Then finally do a deploy to WebLogic.

How can I do this using Maven?



--
View this message in context: 
http://maven.40175.n5.nabble.com/How-can-I-have-a-goal-depend-on-another-goal-tp4384674p4384674.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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