Edit: Enter compiler Failure, thats the error code.
First things first: Sorry for the massive WallOfCode, tried to give all informations i have.
Hey, this is my first time here. I will try to descripe my problem as best i can do. i create a maven multi project, with 2 modules. TestA and TestB within TestA is my main for later JS Convertion. within TestB are 2 classes, one for a method:
public String foo (String s, String t) {
Exchange ex = new Exchange( s.trim(), t.trim() );
}
and one for a cache but this we can forget at this moment.
if TestA generate a object from foo (TestB) and use it for a simple sout i got a error. if TestA generate a object from a method within TestA and use it for a simple sout it worked.
i cant get contact to the TestB Class , a second Module, i guess.
my convertion from java to javascript code works fine for using methode within my TestA class
Hopefully that someone can help me out, struggle few days with it.
here some code:
my POM
<?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">
<modelVersion>4.0.0</modelVersion>
<groupId>de.binarium</groupId>
<artifactId>archetype</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<modules>
<module>TestB</module>
<module>TestA</module>
</modules>
<properties>
<jsweet.transpiler.version>3.0.0-SNAPSHOT</jsweet.transpiler.version>
<jsweet.core.version>6.0.2</jsweet.core.version>
<java.version.release>11</java.version.release>
<java.version>1.${java.version.release}</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<repositories>
<repository>
<id>jsweet-central</id>
<name>libs-release</name>
<url>http://repository.jsweet.org/artifactory/libs-release-local</url>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<release>${java.version.release}</release>
<compilerVersion>${java.version}</compilerVersion>
<source>${java.version}</source>
<target>${java.version}</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.jsweet</groupId>
<artifactId>jsweet-maven-plugin</artifactId>
<version>${jsweet.transpiler.version}</version>
<configuration>
<verbose>true</verbose>
<tsOut>target/reneTs</tsOut>
<outDir>target/renejs</outDir>
<candiesJsOut>webapp</candiesJsOut>
<targetVersion>ES6</targetVersion>
<moduleResolution>classic</moduleResolution>
<includes>
<include>**/*.java</include>
</includes>
</configuration>
<executions>
<execution>
<id>generate-js</id>
<phase>generate-sources</phase>
<goals>
<goal>jsweet</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.jsweet.candies</groupId>
<artifactId>jquery</artifactId>
<version>1.10.0-20170726</version>
</dependency>
</dependencies>
</project>
my TestA
package main.java.app.momente;
import main.java.TestB;
import java.io.IOException;
public class TestA {
public static void main( String[] args ) throws IOException {
System.out.println("Hallo, welt");
}
}
my TestB
package main.java;
public class TestB {
public String foo (String s, String t){
Exchange ex = new Exchange( s.trim(), t.trim() ); // The Exchange methode is correct, no need to investigate
String outT = ex.t;
String outS = ex.s;
return ex.s + ex.t;
}
}
last my code from mvn generate-soruces
[ERROR] transpilation failed
org.apache.maven.plugin.MojoFailureException: transpilation failed with 2 error(s) and 0 warning(s)
at org.jsweet.AbstractJSweetMojo.transpile (AbstractJSweetMojo.java:618)
at org.jsweet.JSweetMojo.execute (JSweetMojo.java:43)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
at org.codehaus.classworlds.Launcher.main (Launcher.java:47)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.915 s
[INFO] Finished at: 2020-01-09T15:15:13+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.jsweet:jsweet-maven-plugin:3.0.0-SNAPSHOT:jsweet (generate-js) on project TestA: transpilation failed: transpilation failed with 2 error(s) and 0 warning(s) -> [Help 1]