PDA

View Full Version : Quercus Open Source Modules


domdorn
01-14-2011, 02:59 PM
To fulfill the need of the community to take part in the Quercus evolution,
we're starting the Quercus Open Source Modules project.

Goal
The goal is to provide more or less "independent" modules that are not packaged with the main Quercus distribution, but can simply be added by putting the jars in the classpath (e.g. /WEB-INF/lib folder).

Development
Development should take place on GitHub.com/Quercus (http://github.com/quercus), as it's by far the most used platform for easy code collaboration.

Contribute a new module
If you want to contribute, please reply to this post, tell something about the module you'd like to start and we'll get everything set-up.

Participate in a module
If you want to participate in a modules development, simply fork the repository on Github, do your work (including tests) and send a pull request.


Existing Modules

Currently, these is the list of available modules (that I'm _aware of_):

Quercus-LDAP (http://github.com/quercus/quercus-ldap) <br/>Implements some of the LDAP Functions from PHP
Quercus-Filter (http://github.com/quercus/quercus-filter) <br/>Equivalent for PHPs Filter extension.


and there is our Quercus Testing Framework available under
Quercus Testing Framework (http://github.com/quercus/quercus-testing-framework)



Testing
Please clone the Quercus Testing Framework (http://github.com/quercus/quercus-testing-framework),
then do a
mvn clean compile install

to get started with testing, please also clone Quercus-Filter (http://github.com/quercus/quercus-filter)

to get a general idea of a module layout.

Our testing framework is still a bit beta, so these are the steps you need to do:

- add the JUnit dependency to your modules pom.xml
- add our quercus-testing-framework dependency to your modules pom.xml
- create the folder /src/test/resources/qa
- create the file /src/test/resources/qa/resin.conf with the following content:

<?xml version="1.0" encoding="UTF-8" ?>
<resin xmlns="http://caucho.com/ns/resin"
xmlns:resin="urn:java:com.caucho.resin">


</resin>


- add a sample test /src/test/resources/qa/0000_sample.qa

<title>mymodule: FOOBAR Test</title>

<php out='stdout'>
<?php

echo "foo";

?>
</php>

<compare file='/stdout' escape>
foo
</compare>


- create a Junit Test like the following in /src/test/java/..../SomeNameTest.java

package com.caucho.quercus.lib.filter;

import com.caucho.quercus.junit.QuercusRunner;
import org.junit.runner.RunWith;


@RunWith(QuercusRunner.class)
public class FilterTest {
}

- execute your tests by typing
mvn clean compile test

In future versions of the testing framework, you will not have to create the resin.conf and the JUnit class, but right now its required.


Building of the module
We're using Maven to build the modules. Please take a look at
Quercus-Filter (http://github.com/quercus/quercus-filter)
to see how its done.


Quercus itself as Github-Repository?
It will take some time to properly get Quercus out of our main development repository, as Quercus has grown years with our other products in that environment and we don't simply want to cut it out of that repository and therefor loose all the history and other goodies given by decent SCMs.

We're still very busy with getting our Application Server "Resin" certified and ready for the JavaEE6 Web-Profile, so our resources are currently quite constraint and this will take some time to get done right.



Questions?
Please add your questions as posts bellow. I'll update this post and include the answers here.

anoland
04-11-2011, 11:15 PM
Goal
The goal is to provide more or less "independent" modules that are not packaged with the main Quercus distribution, but can simply be added by putting the jars in the classpath (e.g. /WEB-INF/lib folder).

From what I see now, it looks like I have to build my own jar files. Is there going to be any effort to provide those on github?

Thanks.

domdorn
04-19-2011, 08:46 AM
There will be a repository with pre-build jar files.
As none of the extensions right now available is in a state I would call "final", you'll have to build them yourself right now (but it's quite easy with ant/maven to do so).

lordmj
11-22-2011, 05:48 PM
Do I need to put something into META-INF/services to add the ldap modules to my webapp?

Michael