Re: Re: apache httpd plugin

2012-05-22 Thread Wayne Fay
> There is already a tomcat plugin, there is already a jetty plugin. So there
> should be a httpd plugin.
...
> I think it would be better to have a simple build plugin for httpd support
> and having some conventions for the project to run it with apache httpd.

If you have an itch, feel free to scratch it. Someone before you who
cared enough about tomcat and jetty wrote those plugins.

No one (before you) cared enough to do the same for httpd. There is
nothing standing between you and the realization of this plugin except
your own motivation and technical skills.

Wayne

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



Re: Re: apache httpd plugin

2012-05-22 Thread martin.eisengardt
Of course I can use the maven-exec-plugin. This will cause the build file
to have two different configurations, one for windows, one for *ix. I will
need to have a configuration file (going through filtering because of
document-root setting to target/classes for example). That's possible.

Let me ask a question: Wouldn't it be easier to simply let Tomcat run in
the background, for example on a dedicated machine or build server etc.,
(re-)deploy your artifact(s) and then start testing?
To get the point: The same question can be applied to maven-tomcat-plugin
and maven-jetty-plugin. So why having plugins at all and not having a huge
amount of maven-exec-plugin invocations or ant invocations?
I do not want to run into a philosophy session. I want to make it simple:
There is already a tomcat plugin, there is already a jetty plugin. So there
should be a httpd plugin.

The question how to remotely deploy an artifact is a good question but may
not be solved in a maven-httpd-plugin. I would expect this as part of
another goal/lifecycle. But maybe I am wrong and this is why I am asking
here. Is tomcat-plugin and jetty-plugin able to do remote-deployment and
running remote-tests? Testing on build servers is IMHO the wrong answer
because a build server checkouts the project, compiles it and performs a
local test. There is no "remote deployment" for the build server.


For now I simply want the following to work on a project:
--> mvn apache-httpd:run
--> mvn apache-httpd:stop
--> mvn apache-httpd:restart
--> mvn test
I already said that I am focused on testing with selenium against a running
apache httpd.
In a company it should not be done through shared remote servers because
the developers may fight against while deploying there local development
snapshot to the remote server.

To come back to your question: It will not be simple. A developer running
the goals "run, stop, restart, test" does not mind how to configure a local
apache, how to setup the document root, how to apply a working directory
layout so that selenium finds the web application it should test. I think
this can be covered by a plugin. Keeping in mind that maven is "COC"
(Convention over configuration).

I think it would be better to have a simple build plugin for httpd support
and having some conventions for the project to run it with apache httpd.


Re: Re: apache httpd plugin

2012-05-22 Thread Thorsten Heit
Hi,

> Yes, Starting/stopping
> Deploying to an instance (whatever that means)
> 
> The most important thing I was thinking of is testing. That means 
testing a
> web application with apache httpd and selenium. Testing a web app that
> requires mod_rewrite won't work at the moment because tomcat and jetty 
are
> not aware of .htaccess and mod_rewrite and therefor the requests will 
not
> be redirected to the correct php/perl/cgi scripts. Having a web.xml with
> servlet mappings that are similar to the .htaccess rewrite rules for 
only
> supporting maven tests sounds not good for me.

Is it really necessary to start and stop a webserver from within Maven 
solely for the purpose of testing? Wouldn't it be easier to simply let 
Apache run in the background, for example on a dedicated machine or build 
server etc., (re-)deploy your artifact(s) and then start testing?

If you still need starting/stopping the Apache instance from within a 
Maven build, I'd suggest you have a look at the exec plugin ([1]) and 
start and stop your Apache instance directly via "apachectl -k 
{start,stop}".


[1] http://mojo.codehaus.org/exec-maven-plugin/


HTH

Thorsten