Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I2346.1 #2

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
42 changes: 2 additions & 40 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,43 +33,5 @@ jobs:

steps:

- script: docker run --rm --publish 5432:5432 --name build-postgres -e POSTGRES_USER=hibernate_orm_test -e POSTGRES_PASSWORD=hibernate_orm_test -e POSTGRES_DB=hibernate_orm_test -d postgres:10.5
displayName: 'start postgres'

- task: Maven@3
displayName: 'Maven Build'
inputs:
goals: 'install'
options: '-B --settings azure-mvn-settings.xml -Dnative-image.docker-build -Dtest-postgresql -Dtest-elasticsearch -Dnative-image.xmx=6g -Dnative -Dno-format'

- job: Windows_Build
timeoutInMinutes: 60
pool:
vmImage: 'vs2017-win2016'

variables:
imageName: 'quarkus-windows:$(build.buildId)'

steps:

- task: Maven@3
displayName: 'Maven Build'
inputs:
goals: 'install'
options: '-B --settings azure-mvn-settings.xml -Dno-native -Dno-format'

- job: Build_JDK11_Linux
timeoutInMinutes: 60
pool:
vmImage: 'Ubuntu 16.04'

variables:
imageName: 'quarkus-jdk11:$(build.buildId)'

steps:
- task: Maven@3
displayName: 'Maven Build'
inputs:
jdkVersionOption: '1.11'
goals: 'install'
options: '-B --settings azure-mvn-settings.xml -Dno-native -Dno-format'
- bash: 'settings=$(pwd)/azure-mvn-settings.xml; mvn clean install -DskipTests -Dinvoker.skip=true -B --settings ${settings} -Dno-format && cd integration-tests/camel-core && mvn clean verify -Dnative -Dnative-image.docker-build -B --settings ${settings} -Dnative-image.xmx=6g -Dno-format; cat target/reports/call_tree_quarkus*'
displayName: 'bash'
4 changes: 2 additions & 2 deletions devtools/maven/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@
</executions>
</plugin>

<plugin>
<!-- <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-invoker-plugin</artifactId>
<version>3.1.0</version>
Expand All @@ -238,7 +238,7 @@
</goals>
</execution>
</executions>
</plugin>
</plugin> -->

<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import java.util.List;

import io.quarkus.camel.core.runtime.graal.JaxbDisabled;
import io.quarkus.camel.core.runtime.graal.XmlDisabled;
import io.quarkus.runtime.annotations.ConfigItem;
import io.quarkus.runtime.annotations.ConfigPhase;
import io.quarkus.runtime.annotations.ConfigRoot;
Expand All @@ -28,17 +30,21 @@ public static class BuildTime {
* down the size of applications, it is possible to disable jaxb support
* at runtime. This is useful when routes at loaded at build time and
* thus the camel route model is not used at runtime anymore.
*
* @see JaxbDisabled
*/
@ConfigItem
@ConfigItem(defaultValue = "false")
public boolean disableJaxb;

/**
* Disable XML support in various parts of Camel.
* Because xml parsing using xerces/xalan libraries can consume
* a lot of code space in the native binary (and a lot of cpu resources
* when building), this allows to disable both libraries.
*
* @see XmlDisabled
*/
@ConfigItem
@ConfigItem(defaultValue = "false")
public boolean disableXml;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class CamelSubstitutions {
@Substitute
final class Target_com_sun_beans_WeakCache<K, V> {

@Substitute
private Map<K, Reference<V>> map = new WeakHashMap<>();

@Substitute
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.quarkus.camel.core.runtime.graal;

import java.util.Optional;
import java.util.function.BooleanSupplier;

import org.eclipse.microprofile.config.ConfigProvider;
Expand All @@ -8,8 +9,12 @@ public final class JaxbDisabled implements BooleanSupplier {

@Override
public boolean getAsBoolean() {
String val = ConfigProvider.getConfig().getValue("quarkus.camel.disable-jaxb", String.class);
return Boolean.parseBoolean(val);
Optional<String> val = ConfigProvider.getConfig().getOptionalValue("quarkus.camel.disable-jaxb", String.class);
if (val.isPresent()) {
return Boolean.parseBoolean(val.get());
} else {
return false;
}
}

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.quarkus.camel.core.runtime.graal;

import java.util.Optional;
import java.util.function.BooleanSupplier;

import org.eclipse.microprofile.config.ConfigProvider;
Expand All @@ -8,8 +9,12 @@ public final class XmlDisabled implements BooleanSupplier {

@Override
public boolean getAsBoolean() {
String val = ConfigProvider.getConfig().getValue("quarkus.camel.disable-xml", String.class);
return Boolean.parseBoolean(val);
Optional<String> val = ConfigProvider.getConfig().getOptionalValue("quarkus.camel.disable-xml", String.class);
if (val.isPresent()) {
return Boolean.parseBoolean(val.get());
} else {
return false;
}
}

}
5 changes: 3 additions & 2 deletions integration-tests/camel-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
<id>native-image</id>
<activation>
<property>
<name>native-camel</name>
<name>native</name>
</property>
</activation>
<build>
Expand Down Expand Up @@ -156,7 +156,8 @@
<dumpProxies>false</dumpProxies>
<graalvmHome>${graalvmHome}</graalvmHome>
<enableJni>false</enableJni>
<disableReports>true</disableReports>
<disableReports>false</disableReports>
<additionalBuildArgs>-H:+ReportExceptionStackTraces</additionalBuildArgs>
</configuration>
</execution>
</executions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ quarkus.log.file.enable = false
#
# Camel
#
quarkus.camel.disable-xml=false

camel.context.name=quarkus-camel-example
camel.context.loadTypeConverters=false

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package io.quarkus.it.camel.core;

import org.junit.jupiter.api.Disabled;

import io.quarkus.test.junit.SubstrateTest;

@Disabled("See https://github.com/quarkusio/quarkus/issues/2351")
@SubstrateTest
public class CamelInfinispanITCase extends CamelInfinispanTest {
}