You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "martin.eisengardt" <ma...@googlemail.com> on 2012/05/21 18:20:32 UTC
apache httpd plugin
Hi.
I looked around for some apache plugin (apache httpd) and did not find any.
So my first question is: Does anyone know of a project? Google seems not to
find any and in official repository there seems to be no match.
The main reason I need it is because some non-java web applications will
require .htaccess files (mod_rewrite).
Maybe I will start a plugin project if there is nothing around.
Greetings
Martin
Re: Re: apache httpd plugin
Posted by Wayne Fay <wa...@gmail.com>.
> 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-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Re: apache httpd plugin
Posted by "martin.eisengardt" <ma...@googlemail.com>.
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
Posted by Thorsten Heit <th...@vkb.de>.
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
Re: apache httpd plugin
Posted by "martin.eisengardt" <ma...@googlemail.com>.
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.
Am I wrong? Maybe there is another solution I do not see at the moment.
Re: apache httpd plugin
Posted by Jeff MAURY <je...@jeffmaury.com>.
Can you explain what do you want to achieve from Maven: start/stop an httpd
instance, deploy to an httpd instance, ... ?
Jeff
On Mon, May 21, 2012 at 6:20 PM, martin.eisengardt <
martin.eisengardt@googlemail.com> wrote:
> Hi.
>
>
> I looked around for some apache plugin (apache httpd) and did not find any.
> So my first question is: Does anyone know of a project? Google seems not to
> find any and in official repository there seems to be no match.
> The main reason I need it is because some non-java web applications will
> require .htaccess files (mod_rewrite).
>
> Maybe I will start a plugin project if there is nothing around.
>
>
> Greetings
> Martin
>
--
Jeff MAURY
"Legacy code" often differs from its suggested alternative by actually
working and scaling.
- Bjarne Stroustrup
http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.twitter.com/jeffmaury