Skip to content

Commit

Permalink
Merge pull request #162 from personium/develop
Browse files Browse the repository at this point in the history
Release v1.6.0
  • Loading branch information
yoh1496 authored Aug 31, 2022
2 parents 334bc4c + db76e19 commit 147ada0
Show file tree
Hide file tree
Showing 28 changed files with 457 additions and 114 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/checkstyle.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
on: pull_request_target
on:
pull_request_target:
types: [labeled]

jobs:
checkstyle_job:
runs-on: ubuntu-latest
name: Checkstyle job
if: contains(github.event.pull_request.labels.*.name, 'safe to test')
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ jobs:
GITHUB_TOKEN: ${{ secrets.PERSONIUM_GITHUB_TOKEN }}

steps:

- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'

- name: git settings
run: |
if [ -z "$GITHUB_USER" -o -z "$GITHUB_TOKEN" ]; then
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scripts/update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ git rebase master

# update version in pom.xml
sed -i \
"s|^\( <version>[0-9]\+\.[0-9]\+\.\)[0-9]\+-SNAPSHOT\(</version>\)|\1${MINOR_VERSION}-SNAPSHOT\2|" \
"s|^\( <version>[0-9]\+\.[0-9]\+\.\)[0-9]\+\(</version>\)|\1${MINOR_VERSION}-SNAPSHOT\2|" \
pom.xml

if [ "${COMPONENT}" = "personium-core" -o "${COMPONENT}" = "personium-engine" ]; then
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## 1.6.0
IMPROVEMENTS:
* Supporting java 17. [#156](https://github.com/personium/personium-engine/pull/156), [#159](https://github.com/personium/personium-engine/pull/159)

NEW FEATURE:
* Implement `_p.installBox` for installing bar in engine script. [#149](https://github.com/personium/personium-engine/pull/149)

MISC:
* Modify test codes. [#151](https://github.com/personium/personium-engine/pull/151)

## 1.5.28
IMPROVEMENTS:
* Implement dynamic path for engine script [#130](https://github.com/personium/personium-engine/pull/130)
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ docker run -d -p 8080:8080 -v /path/to/config.properties:/personium/personium-en

## Testing

1. Place `personium-ex-mailsender` jar file and `Ext_MailSender.properties` file in `/personium/personium-engine/`
1. Place `personium-ex-mailsender` jar file and `Ext_MailSender.properties` file in `/personium/personium-engine/extensions`. Content of `Ext_MailSender.properties` is below.
```properties
io.personium.engine.extension.MailSender.smtp.host=localhost
io.personium.engine.extension.MailSender.smtp.port=1025
```
1. Launch required software with `docker-compose up`
1. Launch `personium-core` on Tomcat9 locally.
For example, with below comand. ( Set `$TOMCAT_DIR` environment value to path of directory which Tomcat9 installed, and place `personium-core.war` on `$TOMCAT_DIR/webapps/personium-core.war`. )
Expand Down
118 changes: 76 additions & 42 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>io.personium</groupId>
<artifactId>personium-engine</artifactId>
<packaging>war</packaging>
<version>1.5.28</version>
<name>personium-engine Maven Webapp</name>
<url>http://maven.apache.org</url>
<version>1.6.0-SNAPSHOT</version>
<name>personium-engine</name>
<description>Additional module for personium-core to enable server-side JavaScript execution</description>
<url>https://github.com/personium/personium-engine</url>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
Expand All @@ -20,45 +21,48 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<io.personium.engine.jerseyTest.baseUrl>http://localhost:9998/test/</io.personium.engine.jerseyTest.baseUrl>
<io.personium.engine.jerseyTest.useCouchdb>false</io.personium.engine.jerseyTest.useCouchdb>
<java.source.version>1.8</java.source.version>
<java.target.version>1.8</java.target.version>
<logback.version>1.2.3</logback.version>
<java.source.version>17</java.source.version>
<java.target.version>17</java.target.version>
<jersey.version>2.36</jersey.version>
<logback.version>1.2.11</logback.version>
<slf4j.version>1.7.25</slf4j.version>
<esapi.version>2_4</esapi.version>
<httpclient.version>4.5.5</httpclient.version>
<httpclient.version>4.5.13</httpclient.version>
<surefire.version>2.22.2</surefire.version>
<jacoco.version>0.8.7</jacoco.version>
<jacoco.include.package>io.personium.*</jacoco.include.package>
<powermock.version>2.0.9</powermock.version>
</properties>
<dependencies>
<dependency>
<groupId>io.personium</groupId>
<artifactId>personium-client-java</artifactId>
<version>1.4.14</version>
<version>1.5.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.personium</groupId>
<artifactId>personium-lib-common</artifactId>
<version>1.5.3</version>
<version>1.6.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.personium</groupId>
<artifactId>personium-ex-base</artifactId>
<version>1.4.5</version>
<version>1.5.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.7</version>
</dependency>
<dependency>
<groupId>com.sun.jersey.jersey-test-framework</groupId>
<artifactId>jersey-test-framework-grizzly2</artifactId>
<version>1.10</version>
<scope>test</scope>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
<version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-bundle</artifactId>
<version>1.10</version>
<groupId>org.glassfish.jersey.inject</groupId>
<artifactId>jersey-hk2</artifactId>
<version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
Expand Down Expand Up @@ -118,11 +122,38 @@
<artifactId>jcl-over-slf4j</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>2.3.6</version>
</dependency>
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.28.0-GA</version>
</dependency>
<!-- For tests -->
<dependency>
<groupId>org.glassfish.jersey.test-framework</groupId>
<artifactId>jersey-test-framework-core</artifactId>
<version>${jersey.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
<artifactId>jersey-test-framework-provider-grizzly2</artifactId>
<version>${jersey.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -134,13 +165,13 @@
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4</artifactId>
<version>2.0.4</version>
<version>${powermock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito2</artifactId>
<version>2.0.4</version>
<version>${powermock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -163,26 +194,11 @@
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
<resource>
<directory>..</directory>
<includes>
<include>LICENSE.txt</include>
<include>NOTICE.txt</include>
<include>CHANGES.txt</include>
</includes>
</resource>
</resources>
<testResources>
<testResource>
<directory>src/test/resources</directory>
<filtering>false</filtering>
</testResource>
<testResource>
<directory>src/test/resources</directory>
<filtering>true</filtering>
<excludes>
<exclude>**/*.jar</exclude>
</excludes>
</testResource>
</testResources>
<plugins>
Expand Down Expand Up @@ -232,7 +248,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
<version>${surefire.version}</version>
<configuration>
<argLine>${jacocoArgs} -Xms512m -Xmx512m</argLine>
<excludes>
Expand Down Expand Up @@ -271,6 +287,17 @@
<outputEncoding>UTF-8</outputEncoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<nonFilteredFileExtensions>
<nonFilteredFileExtension>bar</nonFilteredFileExtension>
<nonFilteredFileExtension>jar</nonFilteredFileExtension>
</nonFilteredFileExtensions>
</configuration>
</plugin>
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
Expand All @@ -294,7 +321,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.3</version>
<version>${jacoco.version}</version>
<executions>
<execution>
<id>prepare-agent</id>
Expand Down Expand Up @@ -328,7 +355,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.22.2</version>
<version>${surefire.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -381,9 +408,16 @@
</reporting>
<repositories>
<repository>
<id>personium.io</id>
<name>Personium Repository</name>
<url>https://personium.io/mvnrepo</url>
<id>snapshots</id>
<name>Nexus Snapshots Repository</name>
<layout>default</layout>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
package io.personium.engine.source;

import com.sun.jersey.api.uri.UriTemplate;
import org.glassfish.jersey.uri.UriTemplate;

import java.util.ArrayList;
import java.util.HashMap;
Expand Down
53 changes: 53 additions & 0 deletions src/main/resources/js-lib/personium-dao.js
Original file line number Diff line number Diff line change
Expand Up @@ -791,6 +791,34 @@ _p.Cell.prototype.box = function(name) {
return dav;
};

/**
* Trigger box installation
* @param {string} name box name
* @param {stream} barStream barfile stream
* @returns {_p.Box} instance of control object for box created
*/
_p.Cell.prototype.installBox = function(name, barStream) {
try {
return this.core.installBox(name, barStream);
} catch (e) {
throw new _p.PersoniumException(e.message);
}
}

/**
* Trigger box installation
* @param {string} name box name
* @param {string} barUrl barfile URL which is accessible publicly
* @returns {_p.Box} instance of control object for box created
*/
_p.Cell.prototype.installBoxFromURL = function(name, barUrl) {
try {
return this.core.installBox(name, barUrl);
} catch (e) {
throw new _p.PersoniumException(e.message);
}
}

/**
* CellのUrlを取得.
* @returns {string} CellのURL
Expand Down Expand Up @@ -843,6 +871,18 @@ _p.Box = function(obj) {
};
_p.Box.prototype = new _p.Webdav();

/**
* Retrieve box meta data
* @returns {string} Retrieved box meta data
*/
_p.Box.prototype.getMetaData = function() {
try {
return this.core.getMetaData();
} catch (e) {
throw new _p.PersoniumException(e.message);
}
}

/**
* Box.ctl でアクセスされ、関連APIの呼び出しを行う.
* @class BoxCtl操作クラス
Expand Down Expand Up @@ -1246,6 +1286,19 @@ _p.BoxManager.prototype.retrieve = function(name) {
}
};

/**
* This method is used for Box Recursive/force delete.
* @param boxName boxName name of box to be deleted
* @throws DaoException Library Exception
*/
_p.BoxManager.prototype.recursiveDelete = function(boxName) {
try {
this.core.recursiveDelete(boxName);
} catch (e) {
throw new _p.PersoniumException(e.message);
}
};

/**
* 新しいAccountManagerオブジェクトを作成する.
* @class Account操作クラス
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#################################################

# engine version
io.personium.core.version=1.5.28
io.personium.core.version=1.5.29

# security configurations
# You must set these properties to personium-unit-config.properties file.
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<display-name>personium-engine</display-name>
<servlet>
<servlet-name>PersoniumEngineApp</servlet-name>
<servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
<servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>javax.ws.rs.Application</param-name>
<param-value>io.personium.engine.PersoniumEngineApplication</param-value>
Expand Down
Loading

0 comments on commit 147ada0

Please sign in to comment.