-
Notifications
You must be signed in to change notification settings - Fork 75
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
Need migration guide documentation for moving vertx 3 js verticles to es4x #554
Comments
Not exactly the same topic, but related: it would be good to know how to package up an es4x project as a verticle "library" (not an app) to be loaded from java running on the jvm via the verticle factory, classpath requirements, etc. Like, for the vert.x 3 world, we had to ensure js directories were on the classpath and had to ensure |
I've noticed that 've been missing some artifacts during the release. I'm working on the documentation of the process, but for now assume you can do anything like this (using maven, but can use gradle too): <?xml version="1.0" encoding="UTF-8"?>
<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">
<parent>
<groupId>io.reactiverse.es4x</groupId>
<artifactId>es4x-generator</artifactId>
<version>0.15.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>vertx-redis-client</artifactId> <!-- <<<- here the java artifact you want to convert -->
<version>1.0.0</version>
<properties>
<maven.groupId>io.vertx</maven.groupId> <!-- <<<- here the java artifact group you want to convert -->
<npm-name>@vertx/redis-client</npm-name> <!-- <<<- here the npm desired package name -->
<npm-version>4.1.3</npm-version> <!-- <<<- here the java version you want to convert -->
<npm-skip>false</npm-skip>
<!-- language=json --> <!-- <<<- any customization to package.json you want, but this is required -->
<package-json>
{
"description": "${project.description}",
"version": "${npm-version}",
"license": "${npm-license}",
"maven": {
"groupId": "io.vertx",
"artifactId": "vertx-redis-client",
"version": "${npm-version}"
}
}
</package-json>
</properties>
<dependencies>
<!-- Sources to process -->
<dependency>
<groupId>${maven.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>${npm-version}</version>
</dependency>
<dependency>
<groupId>${maven.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>${npm-version}</version>
<scope>provided</scope>
<classifier>sources</classifier>
</dependency>
</dependencies>
</project> Running a |
@chefhoobajoob I've started documenting the generation process here: 4c9df86#diff-2586b42924f021fe14c65861d3404f4b4015ee68c6592ce5633fee850940b470 |
If you look at the manual I've started, there's a lot of system properties in the maven snippet I've added. You will need to pass those environmental variables to the process running the annotation processor. |
@chefhoobajoob can you share a simple hello world with your gradle script? I think we can improve it to be an easy template to generate es4x packages. |
sure - i'll try to get one up and post the repo link here |
hello world example project here: |
The vert.x 3 libraries made use of
vertx-lang-js
wrapper scripts in order to make vert.x libs accessible to js verticles. We also have some of our own "polyglot" class libraries that used that same scheme via codegen for using our own vertx utility libraries from js.Assuming there is an analogous mechanism in es4x for using vert.x and/or custom libs that were using the vertx 3
vertx-lang-js
wrappers, it would be extremely helpful if there was guidance documentation describing how to migrate such js code over to es4x.The text was updated successfully, but these errors were encountered: