Skip to content

Commit

Permalink
Nitrite test fails because of forbiddn serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
JiriOndrusek committed Feb 12, 2021
1 parent 5332d4f commit 04134ef
Show file tree
Hide file tree
Showing 20 changed files with 197 additions and 283 deletions.
11 changes: 5 additions & 6 deletions docs/modules/ROOT/pages/reference/extensions/nitrite.adoc
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
// Do not edit directly!
// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
= Nitrite
:page-aliases: extensions/nitrite.adoc
:cq-artifact-id: camel-quarkus-nitrite
:cq-native-supported: false
:cq-status: Preview
:cq-native-supported: true
:cq-status: Stable
:cq-description: Access Nitrite databases.
:cq-deprecated: false
:cq-jvm-since: 1.0.0
:cq-native-since: n/a
:cq-jvm-since: 1.7.0
:cq-native-since: 1.7.0

[.badges]
[.badge-key]##JVM since##[.badge-supported]##1.0.0## [.badge-key]##Native##[.badge-unsupported]##unsupported##
[.badge-key]##JVM since##[.badge-supported]##1.7.0## [.badge-key]##Native since##[.badge-supported]##1.7.0##

Access Nitrite databases.

Expand Down
8 changes: 4 additions & 4 deletions docs/modules/ROOT/partials/reference/components/nitrite.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
:cq-artifact-id: camel-quarkus-nitrite
:cq-artifact-id-base: nitrite
:cq-native-supported: false
:cq-status: Preview
:cq-native-supported: true
:cq-status: Stable
:cq-deprecated: false
:cq-jvm-since: 1.0.0
:cq-native-since: n/a
:cq-jvm-since: 1.7.0
:cq-native-since: 1.7.0
:cq-camel-part-name: nitrite
:cq-camel-part-title: Nitrite
:cq-camel-part-description: Access Nitrite databases.
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion extensions-jvm/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@
<module>mllp</module>
<module>mvel</module>
<module>mybatis</module>
<module>nitrite</module>
<module>ognl</module>
<module>openstack</module>
<module>printer</module>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
limitations under the License.
-->
<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/xsd/maven-4.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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.camel.quarkus</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,12 @@
*/
package org.apache.camel.quarkus.component.nitrite.deployment;

import io.quarkus.deployment.annotations.BuildProducer;
import io.quarkus.deployment.annotations.BuildStep;
import io.quarkus.deployment.annotations.ExecutionTime;
import io.quarkus.deployment.annotations.Record;
import io.quarkus.deployment.builditem.FeatureBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
import io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem;
import io.quarkus.deployment.pkg.steps.NativeBuild;
import org.apache.camel.quarkus.core.JvmOnlyRecorder;
import org.h2.store.fs.FilePathNio;
import org.jboss.logging.Logger;

class NitriteProcessor {
private static final Logger LOG = Logger.getLogger(NitriteProcessor.class);

private static final String FEATURE = "camel-nitrite";

Expand All @@ -38,25 +30,14 @@ FeatureBuildItem feature() {
return new FeatureBuildItem(FEATURE);
}

/**
* Remove this once this extension starts supporting the native mode.
*/
@BuildStep(onlyIf = NativeBuild.class)
@Record(value = ExecutionTime.RUNTIME_INIT)
void warnJvmInNative(JvmOnlyRecorder recorder) {
JvmOnlyRecorder.warnJvmInNative(LOG, FEATURE); // warn at build time
recorder.warnJvmInNative(FEATURE); // warn at runtime
}

@BuildStep
void runtimeInitializedClasses(BuildProducer<RuntimeInitializedClassBuildItem> runtimeInitializedClasses) {
RuntimeInitializedClassBuildItem runtimeInitBcryptUtil() {
// this class uses a SecureRandom which needs to be initialised at run time
runtimeInitializedClasses.produce(new RuntimeInitializedClassBuildItem("org.dizitart.no2.Security"));
return new RuntimeInitializedClassBuildItem("org.dizitart.no2.Security");
}

@BuildStep
void reflectiveClasses(BuildProducer<ReflectiveClassBuildItem> reflectiveClasses) {
reflectiveClasses.produce(new ReflectiveClassBuildItem(false, false, FilePathNio.class));
ReflectiveClassBuildItem reflectiveClasses() {
return new ReflectiveClassBuildItem(false, false, org.h2.store.fs.FilePathNio.class);
}

}
5 changes: 3 additions & 2 deletions extensions-jvm/nitrite/pom.xml → extensions/nitrite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
limitations under the License.
-->
<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/xsd/maven-4.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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.camel.quarkus</groupId>
Expand All @@ -33,6 +35,5 @@
<modules>
<module>deployment</module>
<module>runtime</module>
<module>integration-test</module>
</modules>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
limitations under the License.
-->
<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/xsd/maven-4.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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.camel.quarkus</groupId>
Expand All @@ -28,9 +30,11 @@

<artifactId>camel-quarkus-nitrite</artifactId>
<name>Camel Quarkus :: Nitrite :: Runtime</name>
<description>Access Nitrite databases.</description>

<properties>
<camel.quarkus.jvmSince>1.0.0</camel.quarkus.jvmSince>
<camel.quarkus.jvmSince>1.7.0</camel.quarkus.jvmSince>
<camel.quarkus.nativeSince>1.7.0</camel.quarkus.nativeSince>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -78,6 +82,7 @@
</plugins>
</build>


<profiles>
<profile>
<id>full</id>
Expand Down
Loading

0 comments on commit 04134ef

Please sign in to comment.