Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
3bacf74
add YJS launch info
SandraMonnier Nov 15, 2024
ab22191
Update README.md
SandraMonnier Mar 6, 2026
04574be
Update README.md
SandraMonnier Mar 6, 2026
f0b2162
Fix warning
SandraMonnier Mar 19, 2026
f2bc903
Fix warning
SandraMonnier Mar 19, 2026
926a6ff
add java.version property
SandraMonnier Mar 17, 2026
79b3874
add jakarta.version property
SandraMonnier Mar 17, 2026
3f7b0db
extract properties for the version of arquillian-payara-server-embedd…
SandraMonnier Mar 26, 2026
158ed98
set payara-arquillian-container.version as it is in payara-server-5.2…
SandraMonnier Mar 26, 2026
150f9c6
upgrade to last 5.2022 payara
SandraMonnier Mar 26, 2026
8437ce4
follow https://docs.openrewrite.org/recipes/java/migrate/jakarta/java…
SandraMonnier Mar 18, 2026
5386aa9
go to jakarta 10.0.0
SandraMonnier Mar 26, 2026
b9bc53e
prevent Cookie deprecation
SandraMonnier Mar 26, 2026
4f90b3d
go to payara 6.2022.1 and its dependencies
SandraMonnier Mar 26, 2026
14267ce
fix arquillian default protocol
SandraMonnier Mar 26, 2026
b1a19fb
go to payara 6.2024.1 and its dependencies
SandraMonnier Mar 26, 2026
f259e2f
go to payara 6.2024.7 and its dependencies - localhost not working
SandraMonnier Mar 26, 2026
3ed499a
Update README.md
SandraMonnier Apr 7, 2026
491d07d
Java 17
SandraMonnier Mar 19, 2026
c0944ec
add ci build on java17 branches
SandraMonnier Apr 7, 2026
f2c2d28
remove useless parentheses PMD check
SandraMonnier Apr 7, 2026
86bca02
fix shaming characters in xml
SandraMonnier Apr 7, 2026
35bf844
remove "append character with char" PMD check
SandraMonnier Apr 7, 2026
379476d
do not fail if javadoc is not perfect
SandraMonnier Apr 7, 2026
7caccf3
Merge branch 'main' into java17-v1
xgo-work Jun 12, 2026
eed8b05
fixed liquibase version to be run properly at start up
xgo-work Jun 12, 2026
42b069d
merge and dependency fixes (javax to jakarta)
xgo-work Jun 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- main
- dev
- java17*
tags:
- "v*"
pull_request:
Expand Down Expand Up @@ -59,7 +60,7 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 11
java-version: 17
cache: "maven"

- name: Set up QEMU
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 11
java-version: 17
cache: 'maven'

- name: Maven package without tests
Expand Down
46 changes: 26 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ echo "CREATE USER \"colab_test\" WITH PASSWORD '1234';
CREATE DATABASE \"colab_test\" OWNER \"colab_test\";" | docker exec colab_postgres psql -U colab
```

If you have problems with authorization to drop and create colab_test, you may set colab_test user as a superuser.

### Mail Hog
create en email testing tool
```
Expand All @@ -38,8 +40,9 @@ docker run -d --restart always -p 27017:27017 --name colab_mongo mongo:4.4
## Compile

### Tools & version to use
* java11 & maven
* node
* java 17
* maven
* node 20
* yarn


Expand All @@ -49,13 +52,22 @@ Rebuild everything with :
mvn clean install
```

If you use more than one java version, you may need to specify the JAVA_HOME.
```bash
JAVA_HOME="<your-path-to-java-bin>" mvn clean install
```
Typically
```bash
JAVA_HOME="/Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home" mvn clean install
```

Rebuild everything but skip tests with :
```bash
mvn -DskipTests clean install
```

### Maven Site
PMD and other tools may fails the build. You may want to consult human-readable reports.
We use tools like PMD, spotbugs and checkstyle to ensure that the code is clean and healthy. The build can fail if there are bad errors. You may want to consult human-readable reports.

Regenerate maven site:
```bash
Expand All @@ -67,22 +79,7 @@ And open ./target/staging/index.html
## Run (development)

### Configuration file
Copy `./colab-webapp/default_colab.properties` to `./colab-webapp/colab.properties` and edit the colab.
Edit `./colab-webapp/colab.properties` to match
```
#
# coLAB properties
#######################

## Database
colab.database.user=colab
colab.database.password=<YOUR_SECRET_PASSWORD>
colab.database.name=colab

colab.default.admin.username=
colab.default.admin.email=
colab.default.admin.password=
```
Copy `./colab-webapp/default_colab.properties` to `./colab-webapp/colab.properties` and fill the database information.

The `./colab-webapp/colab.properties` is your own configuration file and will never be committed.
So you can safely put secrets in it.
Expand Down Expand Up @@ -129,7 +126,7 @@ Such refactors are defined with the help of [LiquiBase](https://www.liquibase.or

Writing those changeLogs may be painfull. Luckily, LiquiBase ships with handy tools ([dowload here](https://github.com/liquibase/liquibase/releases)) to ease writing changeLogs. We are especially interested in the `diffChangeLog` tool.

This tool compute a changeLog between a database and a reference. In our case, the database is the live database, the reference is the test database. Here is an script which stores the diff changeLog in a XML file named after the current timestamp.
This tool compute a changeLog between a database and a reference. In our case, the database is the live database, the reference is the test database. Here is an script that you can run to generate a diff changeLog in a XML file named after the current timestamp. If there is no difference, no file will be generated.

```sh
#!/bin/bash
Expand Down Expand Up @@ -231,4 +228,13 @@ yarn start

The webapp will be available on http://localhost:3004

### YJS
Can be run via docker (see [YJS Docker setup in the wiki](https://github.com/Heigvd/colab/wiki/CoLab-YJS#docker-setup))

Or with
```bash
cd colab-api/src/main/node/colab-yjs
yarn start
```

When using webpack-dev-server, one could add `-DskipWebappYarn` to each maven command
35 changes: 11 additions & 24 deletions build-tools/src/main/resources/colab/pmd/default-ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<ruleset name="Default Maven PMD Plugin Ruleset" xmlns="http://pmd.sourceforge.net/ruleset/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 https://pmd.sourceforge.io/ruleset_2_0_0.xsd">
<ruleset name="Default Maven PMD Plugin Ruleset" xmlns="http://pmd.sourceforge.net/ruleset/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd">

<description>
The default ruleset used by the Maven PMD Plugin, when no other ruleset is specified.
Expand All @@ -32,21 +32,20 @@ under the License.
<rule ref="category/java/bestpractices.xml/AvoidUsingHardCodedIP"/>
<rule ref="category/java/bestpractices.xml/CheckResultSet"/>
<rule ref="category/java/bestpractices.xml/MissingOverride"/>
<rule ref="category/java/bestpractices.xml/UnusedImports"/>
<rule ref="category/java/bestpractices.xml/PrimitiveWrapperInstantiation" />
<rule ref="category/java/bestpractices.xml/UnusedFormalParameter"/>
<rule ref="category/java/bestpractices.xml/UnusedLocalVariable"/>
<rule ref="category/java/bestpractices.xml/UnusedPrivateField"/>
<rule ref="category/java/bestpractices.xml/UnusedPrivateMethod"/>
<rule ref="category/java/bestpractices.xml/UseCollectionIsEmpty"/>
<rule ref="category/java/bestpractices.xml/SystemPrintln"/>

<rule ref="category/java/codestyle.xml/EmptyControlStatement" />
<rule ref="category/java/codestyle.xml/AvoidDollarSigns"/>
<rule ref="category/java/codestyle.xml/CommentDefaultAccessModifier"/>
<rule ref="category/java/codestyle.xml/ControlStatementBraces"/>
<rule ref="category/java/codestyle.xml/DontImportJavaLang"/>
<rule ref="category/java/codestyle.xml/DuplicateImports"/>
<rule ref="category/java/codestyle.xml/ExtendsObject"/>
<rule ref="category/java/codestyle.xml/FieldDeclarationsShouldBeAtStartOfClass" />
<!--<rule ref="category/java/codestyle.xml/FieldDeclarationsShouldBeAtStartOfClass" />-->
<!--<rule ref="category/java/codestyle.xml/FieldNamingConventions" />-->
<rule ref="category/java/codestyle.xml/ForLoopShouldBeWhileLoop"/>
<rule ref="category/java/codestyle.xml/GenericsNaming" />
Expand All @@ -57,8 +56,11 @@ under the License.
<rule ref="category/java/codestyle.xml/NoPackage" />
<rule ref="category/java/codestyle.xml/TooManyStaticImports"/>
<rule ref="category/java/codestyle.xml/UnnecessaryFullyQualifiedName"/>
<rule ref="category/java/codestyle.xml/UnnecessaryImport" />
<rule ref="category/java/codestyle.xml/UnnecessaryModifier"/>
<rule ref="category/java/codestyle.xml/UnnecessaryReturn"/>
<rule ref="category/java/codestyle.xml/UnnecessarySemicolon" />
<!--<rule ref="category/java/codestyle.xml/UselessParentheses" />-->
<rule ref="category/java/codestyle.xml/UselessQualifiedThis"/>
<rule ref="category/java/codestyle.xml/UseDiamondOperator" />

Expand All @@ -72,11 +74,11 @@ under the License.
<rule ref="category/java/design.xml/ExceptionAsFlowControl" />
<rule ref="category/java/design.xml/SimplifyConditional" />
<rule ref="category/java/design.xml/SimplifiedTernary"/>
<rule ref="category/java/design.xml/UseObjectForClearerAPI" />
<!--<rule ref="category/java/design.xml/UseObjectForClearerAPI" />-->
<rule ref="category/java/design.xml/UselessOverridingMethod"/>
<rule ref="category/java/design.xml/UseUtilityClass" />

<rule ref="category/java/documentation.xml/CommentRequired" />
<!--<rule ref="category/java/documentation.xml/CommentRequired" />-->
<rule ref="category/java/documentation.xml/UncommentedEmptyConstructor" />
<rule ref="category/java/documentation.xml/UncommentedEmptyMethodBody" />

Expand All @@ -92,16 +94,6 @@ under the License.
<rule ref="category/java/errorprone.xml/ClassCastExceptionWithToArray"/>
<rule ref="category/java/errorprone.xml/DontUseFloatTypeForLoopIndices"/>
<rule ref="category/java/errorprone.xml/EmptyCatchBlock"/>
<rule ref="category/java/errorprone.xml/EmptyFinallyBlock"/>
<rule ref="category/java/errorprone.xml/EmptyIfStmt"/>
<rule ref="category/java/errorprone.xml/EmptyInitializer"/>
<rule ref="category/java/errorprone.xml/EmptyStatementBlock"/>
<rule ref="category/java/errorprone.xml/EmptyStatementNotInLoop"/>
<rule ref="category/java/errorprone.xml/EmptySwitchStatements"/>
<rule ref="category/java/errorprone.xml/EmptySynchronizedBlock"/>
<rule ref="category/java/errorprone.xml/EmptyTryBlock"/>
<rule ref="category/java/errorprone.xml/EmptyWhileStmt"/>
<rule ref="category/java/errorprone.xml/ImportFromSamePackage"/>
<rule ref="category/java/errorprone.xml/JumbledIncrementer"/>
<rule ref="category/java/errorprone.xml/MisplacedNullCheck"/>
<rule ref="category/java/errorprone.xml/OverrideBothEqualsAndHashcode"/>
Expand All @@ -116,19 +108,14 @@ under the License.
<rule ref="category/java/multithreading.xml/DoubleCheckedLocking"/>

<rule ref="category/java/performance.xml/AddEmptyString" />
<rule ref="category/java/performance.xml/AppendCharacterWithChar" />
<!--<rule ref="category/java/performance.xml/AppendCharacterWithChar" />-->
<rule ref="category/java/performance.xml/AvoidFileStream" />

<rule ref="category/java/performance.xml/AvoidUsingShortType" />
<rule ref="category/java/performance.xml/BigIntegerInstantiation"/>
<rule ref="category/java/performance.xml/BooleanInstantiation"/>
<rule ref="category/java/performance.xml/ConsecutiveAppendsShouldReuse" />
<rule ref="category/java/performance.xml/ConsecutiveLiteralAppends" />
<!--<rule ref="category/java/performance.xml/ConsecutiveLiteralAppends" />-->
<rule ref="category/java/performance.xml/InefficientEmptyStringCheck" />
<rule ref="category/java/performance.xml/InefficientStringBuffering" />
<rule ref="category/java/performance.xml/IntegerInstantiation" />
<rule ref="category/java/performance.xml/LongInstantiation" />
<rule ref="category/java/performance.xml/SimplifyStartsWith" />
<rule ref="category/java/performance.xml/TooFewBranchesForASwitchStatement" />
<rule ref="category/java/performance.xml/UseArraysAsList" />
<rule ref="category/java/performance.xml/UseIndexOfChar" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
package ch.colabproject.colab.generator.model.exceptions;

import ch.colabproject.colab.generator.model.annotations.ExtractJavaDoc;
import javax.ws.rs.core.Response;
import jakarta.ws.rs.core.Response;

/**
* Throw an error message.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

import ch.colabproject.colab.generator.model.interfaces.WithJsonDiscriminator;
import ch.colabproject.colab.generator.model.tools.PolymorphicDeserializer;
import javax.ejb.ApplicationException;
import javax.json.bind.annotation.JsonbTransient;
import javax.json.bind.annotation.JsonbTypeDeserializer;
import javax.ws.rs.core.Response;
import jakarta.ejb.ApplicationException;
import jakarta.json.bind.annotation.JsonbTransient;
import jakarta.json.bind.annotation.JsonbTypeDeserializer;
import jakarta.ws.rs.core.Response;

/**
* run-time exception which may be sent back to client.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
package ch.colabproject.colab.generator.model.interfaces;

import ch.colabproject.colab.generator.model.tools.PolymorphicDeserializer;
import javax.json.bind.annotation.JsonbTypeDeserializer;
import jakarta.json.bind.annotation.JsonbTypeDeserializer;

/**
* Simple interface which depict objects having a Long id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
import ch.colabproject.colab.generator.model.annotations.JsonClassName;
import ch.colabproject.colab.generator.model.tools.PolymorphicDeserializer;
import java.io.Serializable;
import javax.json.bind.annotation.JsonbProperty;
import javax.json.bind.annotation.JsonbTypeDeserializer;
import jakarta.json.bind.annotation.JsonbProperty;
import jakarta.json.bind.annotation.JsonbTypeDeserializer;

/**
* Represent an object which can be serialize to JSON. Implementing this interface force
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import java.util.HashMap;
import java.util.Map;
import javax.json.bind.annotation.JsonbTransient;
import jakarta.json.bind.annotation.JsonbTransient;

/**
* Represent javadoc of a class, with fields and methods javadocs.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
import java.time.Instant;
import java.time.OffsetDateTime;
import java.time.ZoneId;
import javax.json.bind.serializer.DeserializationContext;
import javax.json.bind.serializer.JsonbDeserializer;
import javax.json.bind.serializer.JsonbSerializer;
import javax.json.bind.serializer.SerializationContext;
import javax.json.stream.JsonGenerator;
import javax.json.stream.JsonParser;
import jakarta.json.bind.serializer.DeserializationContext;
import jakarta.json.bind.serializer.JsonbDeserializer;
import jakarta.json.bind.serializer.JsonbSerializer;
import jakarta.json.bind.serializer.SerializationContext;
import jakarta.json.stream.JsonGenerator;
import jakarta.json.stream.JsonParser;

/**
* Date Serializer and Deserializer.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,36 @@


import ch.colabproject.colab.generator.model.annotations.ExtractJavaDoc;
import java.io.IOException;
import java.io.InputStream;
import java.io.Writer;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.stream.Stream;
import jakarta.enterprise.util.TypeLiteral;
import jakarta.json.bind.Jsonb;
import jakarta.persistence.Entity;
import jakarta.ws.rs.Path;

import javax.annotation.processing.AbstractProcessor;
import javax.annotation.processing.RoundEnvironment;
import javax.annotation.processing.SupportedAnnotationTypes;
import javax.annotation.processing.SupportedSourceVersion;
import javax.enterprise.util.TypeLiteral;
import javax.json.bind.Jsonb;
import javax.lang.model.SourceVersion;
import javax.lang.model.element.Element;
import javax.lang.model.element.ExecutableElement;
import javax.lang.model.element.PackageElement;
import javax.lang.model.element.TypeElement;
import javax.lang.model.element.VariableElement;
import javax.persistence.Entity;
import javax.lang.model.element.*;
import javax.tools.Diagnostic.Kind;
import javax.tools.FileObject;
import javax.tools.StandardLocation;
import javax.ws.rs.Path;
import java.io.IOException;
import java.io.InputStream;
import java.io.Writer;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.stream.Stream;

/**
* Annotations Processor to extract Javadoc of REST endpoints and JPA entities.
*
* @author maxence
*/
@SupportedSourceVersion(SourceVersion.RELEASE_11)
@SupportedAnnotationTypes({"javax.ws.rs.Path", "javax.persistence.Entity"})
@SupportedSourceVersion(SourceVersion.RELEASE_17)
@SupportedAnnotationTypes({"jakarta.ws.rs.Path", "jakarta.persistence.Entity"})
public class JavaDocExtractor extends AbstractProcessor {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
*/
package ch.colabproject.colab.generator.model.tools;

import javax.json.bind.Jsonb;
import javax.json.bind.JsonbBuilder;
import javax.json.bind.JsonbConfig;
import javax.ws.rs.ext.ContextResolver;
import javax.ws.rs.ext.Provider;
import jakarta.json.bind.Jsonb;
import jakarta.json.bind.JsonbBuilder;
import jakarta.json.bind.JsonbConfig;
import jakarta.ws.rs.ext.ContextResolver;
import jakarta.ws.rs.ext.Provider;

/**
* convenient way to customize the JSON-B mapper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
import javax.json.JsonObject;
import javax.json.bind.serializer.DeserializationContext;
import javax.json.bind.serializer.JsonbDeserializer;
import javax.json.stream.JsonParser;
import jakarta.json.JsonObject;
import jakarta.json.bind.serializer.DeserializationContext;
import jakarta.json.bind.serializer.JsonbDeserializer;
import jakarta.json.stream.JsonParser;
import org.reflections.Reflections;

/**
Expand All @@ -26,7 +26,7 @@
* from other packages.
* </p>
* All WithJsonDiscriminator abstract implementation MUST register this deserializer with the
* {@link javax.json.bind.annotation.JsonbTypeDeserializer JsonbTypeDeserializer} annotation.
* {@link jakarta.json.bind.annotation.JsonbTypeDeserializer JsonbTypeDeserializer} annotation.
* <p>
* Yasson/JSON-b polymorphic deserializer is a "vieux serpent de mer". Some inputs:
* <ul>
Expand Down
Loading
Loading