Skip to content

Commit

Permalink
Merge pull request #17 from belgattitude/develop
Browse files Browse the repository at this point in the history
Cleanup of legacy resources
  • Loading branch information
belgattitude committed Feb 6, 2017
2 parents b11cf37 + cafb449 commit 169318b
Show file tree
Hide file tree
Showing 494 changed files with 111 additions and 10,658 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ manifest.mf
*.lock
*.log
devNull
out/

2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MIT License
MIT License

Copyright (c) 2017 - Jost Boekemeier
- Andre Felipe Machado
Expand Down
88 changes: 63 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
[![Build Status](https://travis-ci.org/belgattitude/php-java-bridge.svg?branch=master)](https://travis-ci.org/belgattitude/php-java-bridge)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
(Develop branch: [![Build Status](https://travis-ci.org/belgattitude/php-java-bridge.svg?branch=develop)](https://travis-ci.org/belgattitude/php-java-bridge))


# Unofficial fork of the [PHP/Java bridge](http://php-java-bridge.sourceforge.net/pjb/) server.

The VM Bridge is a network protocol which can be used to connect a native
script engine, for example PHP, with a Java VM. To get more information have a
look to those projects:

- [soluble-japha](https://github.com/belgattitude/soluble-japha) PHP client to interact with the bridge.
- [pjb-starter-gradle](https://github.com/belgattitude/pjb-starter-gradle) Modern starter project to quickly configure and run PHPJavaBridge servers.
- [pjbserver-tools](https://github.com/belgattitude/pjbserver-tools) A standalone server for helping php unit tests on travis.

## Disclaimer

> This fork have been made on the *no-longer maintained* sourceforge [CVS PHP/Java bridge repository](https://sourceforge.net/p/php-java-bridge/code/) and
Expand All @@ -33,28 +31,57 @@ Latest version 6.2.1 has been released long ago but, AFAIK, proved stable and ma
- [ ] License issue; MIT or GPL (website indicates MIT while CVS GPL) ? Try to contact original developers.
- [ ] Remove dependency of php in build scripts (should be possible to build without php)
- [ ] Deprecate and remove completely the `Java.inc` client.
- [ ] Publish on maven (need help - must be made after removal of php dependency)
- [ ] Removal of obsolete code and resources.
- [x] Publish on maven (need help - must be made after removal of php dependency)
- [x] Removal of obsolete code and resources.
- [ ] Security review and safe practices.
- [ ] Write JUnit tests
- [ ] Start refactorings and improve ;)
- [ ] Documentation (always a wip)

- Master branch: [![Build Status](https://travis-ci.org/belgattitude/php-java-bridge.svg?branch=master)](https://travis-ci.org/belgattitude/php-java-bridge)
- Develop branch: [![Build Status](https://travis-ci.org/belgattitude/php-java-bridge.svg?branch=develop)](https://travis-ci.org/belgattitude/php-java-bridge)

Please **[participate in the discussion for future ideas here](https://github.com/belgattitude/php-java-bridge/issues/6)**.

## Documentation

Server API doc

- [API doc](http://docs.soluble.io/php-java-bridge/api).
- Older documentation can be found in the [PHP/Java bridge](http://php-java-bridge.sourceforge.net/pjb/) site

For the PHP client part (*replaces Java.inc*), documentation is located on another project:

- [soluble-japha](https://github.com/belgattitude/soluble-japha) PHP client to interact with the bridge.


> Older documentation can be found in the [PHP/Java bridge](http://php-java-bridge.sourceforge.net/pjb/) site

## Releases

- You can download pre-compiled [java bridge binaries](https://github.com/belgattitude/php-java-bridge/releases) on the releases page (jdk8).
- Alternatively you can build the project, first clone the project and follow the build steps.
- [Gradle starter project](https://github.com/belgattitude/pjb-starter-gradle) on it's way !!!

> Note: Evaluate the [pjb-starter-gradle](https://github.com/belgattitude/pjb-starter-gradle) if you like to
> customize your php-java-bridge server build.
## Installation

Major releases are published on [Maven central](https://search.maven.org/#search%7Cga%7C1%7Cio.soluble.pjb.php-java-bridge).

With maven:

```
<dependency>
<groupId>io.soluble.pjb</groupId>
<artifactId>php-java-bridge</artifactId>
<version>VERSION</version>
</dependency>
```

or gradle

```
compile 'io.soluble.pjb:php-java-bridge:VERSION'
```

## Build the project

Expand Down Expand Up @@ -88,22 +115,30 @@ See the `/build/libs` folder :

| File | Description | Approx. size |
| ------------- | ------------- | ------------ |
| `JavaBridge-<VERSION>.jar` | JavaBridge library. | +/- 500k |
| `JavaBridge-<VERSION>.war` | Ready to deploy war template file. | +/- 900k |
| `JavaBridge-<VERSION>-sources.jar` | JavaBridge sources. | +/- 400k |
| `JavaBridge-<VERSION>-javadoc.jar` | Generated API documentation. | +/- 600k |
| `php-java-bridge-<VERSION>.jar` | JavaBridge library. | +/- 500k |
| `php-java-bridge-<VERSION>.war` | Ready to deploy war template file. | +/- 900k |
| `php-java-bridge-<VERSION>-sources.jar` | JavaBridge sources. | +/- 400k |
| `php-java-bridge-<VERSION>-javadoc.jar` | Generated API documentation. | +/- 600k |

## Develop
### Gradle tasks
## Gradle tasks


Tomcat embedded support

```shell
$ gradle tomcatRun
$ # gradle tomcatStop (to stop the server)
```

For rebuilding the older Java.inc and launchers:

```shell
$ gradle genClean -Dphp_exec=php5.6
$ gradle genAll -Dphp_exec=php5.6
```
## Usage

### Deploy
Expand Down Expand Up @@ -161,16 +196,19 @@ Feel free to fork and submit pull requests :)

## Credits

See the [CREDITS.md](./CREDITS.md) for an updated list of contributions.

* Java refactorings and modernizations made by [Christian P. Lerch](https://github.com/cplerch)
* Fork initially made by [Sébastien Vanvelthem](https://github.com/belgattitude).

Original developers:

- Jost Boekemeier
- Andre Felipe Machado,
- Sam Ruby,
- Kai Londenberg,
- Nandika Jayawardana,
- Sanka Samaranayake,
- Jost Boekemeier

Forked version

- [Christian P. Lerch](https://github.com/cplerch): Java refactorings and modernizations.
- [Sébastien Vanvelthem](https://github.com/belgattitude): Fork initiator.


See the [CREDITS.md](./CREDITS.md) for an up to date of list of contributors.
32 changes: 21 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ apply plugin: 'maven-publish'

group = "io.soluble.pjb"
archivesBaseName = 'php-java-bridge'
version = "6.2.11-SNAPSHOT"
version = "6.2.11-rc-1"
description = "PHPJavaBridge server (soluble fork)"

ext {
Expand All @@ -31,10 +31,9 @@ buildscript {
}




war {
dependsOn jar
classifier 'web'
//baseName "${project.archivesBaseName}-template"
//from 'src/rootContent' // could add a file-set to the root of the archive
}
Expand Down Expand Up @@ -67,6 +66,7 @@ dependencies {
def tomcatVersion = '7.0.59'

providedCompile('javax.servlet:javax.servlet-api:3.0.1')
//compile('javax.servlet:javax.servlet-api:3.0.1')

tomcat(
"org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}",
Expand All @@ -87,8 +87,6 @@ if (System.getProperty('php_exec') == null) {
ant.importBuild 'build.xml'

jar {
//classifier 'server'
//baseName = "${project.archivesBaseName}-standalone"
manifest {
attributes('Main-Class': 'io.soluble.pjb.bridge.Standalone')
}
Expand Down Expand Up @@ -130,7 +128,7 @@ publishing {
repositories {
maven {
if (project.ext.isReleaseVersion) {
url 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
url 'https://oss.sonatype.org/service/local/staging/deploy/maven2'
} else {
url 'https://oss.sonatype.org/content/repositories/snapshots/'
}
Expand All @@ -153,6 +151,7 @@ publishing {
artifact javadocJar

// Add license

tasks.withType(Jar) {
from(project.projectDir) {
include 'LICENSE.md'
Expand All @@ -162,9 +161,8 @@ publishing {

pom.withXml {
asNode().with {
appendNode('packaging', 'jar')
appendNode('name', 'php-java-bridge')
appendNode('description', project.description)
appendNode('description', "PHPJavaBridge server (soluble fork)")
appendNode('url', 'https://github.com/belgattitude/php-java-bridge')
appendNode('scm').with {
appendNode('url', 'https://github.com/belgattitude/php-java-bridge')
Expand All @@ -186,7 +184,7 @@ publishing {
}
appendNode('developers').with {
appendNode('developer').with {
appendNode('id', 'belgattitude')
//appendNode('id', 'belgattitude')
appendNode('name', 'Sébastien Vanvelthem')
appendNode('email', 'belgattitude@gmail.com')
appendNode('organization', 'Soluble')
Expand All @@ -201,10 +199,12 @@ publishing {

}
}

}

// Sign the pom.xml and artifacts.
if (signing.required) {

// Sign the pom.xml.
pom.withXml {
writeTo(project.ext.pomFile)
Expand All @@ -216,7 +216,14 @@ publishing {
project.ext.pomFile.delete()
}

// Sign the artifacts.
// Sign the artifacts. Not working
configurations.signatures.getArtifacts().each { sig ->
println "adding signature to jars publication: $sig"
artifact(sig) {
extension "jar.asc"
}
}
/*
project.tasks.signArchives.signatureFiles.each {
artifact(it) {
def matcher = it.file =~ /-(sources|javadoc)\.jar\.asc$/
Expand All @@ -227,7 +234,8 @@ publishing {
}
extension = 'jar.asc'
}
}
}*/

}
}
}
Expand All @@ -242,6 +250,8 @@ model {
}
}

task install(dependsOn: publishToMavenLocal)

configure(rootProject) {

task wrapper(type: Wrapper) {
Expand Down
2 changes: 1 addition & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<target name="genInit">
<property name="srcDir" value="${basedir}/src"/>
<property name="distDir" value="${basedir}/build"/>
<property name="serverDir" value="${basedir}/server"/>
<property name="serverDir" value="${basedir}/legacy/server"/>
<property name="javaDir" value="${srcDir}/main/java"/>
<property name="pkgDir" value="${javaDir}/io/soluble/pjb"/>
<property name="resDir" value="${srcDir}/main/resources"/>
Expand Down
8 changes: 7 additions & 1 deletion doc/publish/publish_on_maven_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ signing.secretKeyRingFile=/home/user/.gnupg/secring.gpg
Gradle should be ready to sign.

## Publish snapshot to mavenLocal

```shell
$ gradle clean build publishToMavenLocal
```

## Publish snapshot to maven

Be sure you have set your credentials in the `~/.gradle/gradle.properties` file.
Expand All @@ -42,7 +48,7 @@ ossrhPassword=<password>


```shell
$ gradle clean build uploadArchives
$ gradle clean build publish
```

Then release the deployment manually http://central.sonatype.org/pages/releasing-the-deployment.html
Expand Down
10 changes: 10 additions & 0 deletions legacy/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Content

This directory contains a backup of previous resources found in the
original source code. If most have been superceeded or replaced in the fork,
we keep them secure in this directory until sorting things out.

# License

The legacy directory might contain non MIT resources (GPL or Apache)... Open issues if
you discoverer license incompatibilities
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import java.rmi.RemoteException;
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;
import java.util.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import java.io.Serializable;
import java.rmi.RemoteException;
import javax.ejb.CreateException;
import javax.ejb.EJBHome;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import javax.ejb.EJBObject;
import java.rmi.RemoteException;
import java.math.*;

// This interface defines the "business" methods
public interface DocumentRemote extends EJBObject {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
require_once("java/PHPDebugger.php");
include ("report.php");
include("report.php");

?>
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
<tr VALIGN=TOP>
<td WIDTH="25%">Calling a PHP function.</td>
<td WIDTH="25%"><a href="jsp%2Bphp.jsp">Execute</a></td>
<td WIDTH="25%"><a href="jsp+php.jsp">Execute</a></td>
<td WIDTH="25%"><a href="source.php?source=jsp%2Bphp.jsp">Source</a></td>
<td WIDTH="25%"></td>
Expand All @@ -104,7 +104,7 @@
<tr VALIGN=TOP>
<td WIDTH="25%">Calling a remote PHP script.</td>
<td WIDTH="25%"><a href="jsp%2Bphp2.jsp">Execute</a></td>
<td WIDTH="25%"><a href="jsp+php2.jsp">Execute</a></td>
<td WIDTH="25%"><a href="source.php?source=jsp%2Bphp2.jsp">Source</a></td>
<td WIDTH="25%"></td>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
19 changes: 0 additions & 19 deletions out/production/php-java-bridge/META-INF/java/JavaProxy.php

This file was deleted.

Loading

0 comments on commit 169318b

Please sign in to comment.