Skip to content

Commit

Permalink
测试通过nop-cli和nop-quarkus-demo的native编译。最新的graalvm23.1需要quarkus3.4.1版本,…
Browse files Browse the repository at this point in the history
…3.3.3编译报错。
  • Loading branch information
entropy-cloud committed Oct 1, 2023
1 parent c411169 commit 346f165
Show file tree
Hide file tree
Showing 49 changed files with 1,314 additions and 63,632 deletions.
33 changes: 33 additions & 0 deletions docs/dev-guide/quarkus.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,37 @@ jar包中的bean。
</execution>
</executions>
</plugin>
````

## 原生编译
需要使用maven 3.9.3以后版本

````
mvnw install -Dnative -DskipTests -Dquarkus.native.container-build=true
````

* windows下中文VC存在问题,配置-H:-CheckToolchain 可以跳过
* 不能使用awt模块下的Font等类
* 不能包含--report-unsupported-elements-at-runtime选项,否则通过Delete注解排除的class仍然会报错
* GraalVM 23.1无法使用quarkus3.3.3进行原生编译,必须升级到3.4.1

## 上传解析
需要引入com.sun.mail依赖,并禁用内置依赖的angus-mail模块,并且不能排除jaxb-provider

````xml
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-multipart</artifactId>
<exclusions>
<exclusion>
<artifactId>angus-mail</artifactId>
<groupId>org.eclipse.angus</groupId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>jakarta.mail</artifactId>
</dependency>
````
4 changes: 2 additions & 2 deletions nop-api-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
</licenses>

<properties>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Args=-H:ReflectionConfigurationResources=${.}/reflect-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,242 @@
[
{
"name": "io.nop.api.core.annotations.cache.Cache",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.annotations.cache.CacheEvicts",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.annotations.orm.SingleSession",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.annotations.txn.TccMethod",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.annotations.txn.TccTransactional",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.annotations.txn.Transactional",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.annotations.biz.BizAction",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.annotations.biz.BizQuery",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.annotations.biz.BizMutation",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.annotations.biz.BizSubscription",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.beans.ApiRequest",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.beans.ApiRequest",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.beans.ApiMessage",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.beans.CheckResultBean",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.beans.DictBean",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.beans.DictOptionBean",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.beans.ErrorBean",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.beans.ExtensibleBean",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.beans.FieldSelectionBean",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.beans.FilterBeans",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.beans.IntRangeBean",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.beans.IntRangeBean",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.beans.PageBean",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.beans.LongRangeBean",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.beans.PointBean",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.beans.PropDefBean",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.beans.ServiceCallBean",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.beans.TreeBean",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.beans.TreeResultBean",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.beans.VarMetaBean",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.beans.WebContentBean",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.beans.WeightedItem",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.beans.task.TaskStatusBean",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.beans.query.GroupFieldBean",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.beans.query.OrderFieldBean",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.beans.query.QueryBean",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.beans.query.QueryFieldBean",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.beans.query.QuerySourceBean",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.beans.graphql.CancelRequestBean",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.beans.graphql.GraphQLConnection",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.beans.graphql.GraphQLConnectionInput",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.beans.graphql.GraphQLEdgeBean",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.beans.graphql.GraphQLErrorBean",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.beans.graphql.GraphQLNode",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.beans.graphql.GraphQLPageInfo",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.beans.graphql.GraphQLRequestBean",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.beans.graphql.GraphQLResponseBean",
"allPublicConstructors": true,
"allPublicMethods": true
},
{
"name": "io.nop.api.core.beans.graphql.GraphQLSourceLocation",
"allPublicConstructors": true,
"allPublicMethods": true
}
]
Loading

0 comments on commit 346f165

Please sign in to comment.