Used maven generator typescript is Error
ghostxbh opened this issue · 0 comments
ghostxbh commented
Stact Error:
show log
[INFO] [INFO] --------------< cz.habarta.typescript.generator:repo >--------------- [INFO] Building repo 1.0.0 [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ repo --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory D:\IDE_Spances\Idea_Spance\repo\src\main\resources [INFO] [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ repo --- [INFO] No sources to compile [INFO] [INFO] --- typescript-generator-maven-plugin:2.35.1025:generate (generate) @ repo --- Running TypeScriptGenerator version 2.35.1025 Error: Cannot load class 'cz.habarta.typescript.generator.domain.CapInfo' java.lang.ClassNotFoundException: cz.habarta.typescript.generator.domain.CapInfo at java.net.URLClassLoader.findClass(URLClassLoader.java:387) at java.lang.ClassLoader.loadClass(ClassLoader.java:418) at java.lang.ClassLoader.loadClass(ClassLoader.java:351) at cz.habarta.typescript.generator.Input.loadClasses(Input.java:218) at cz.habarta.typescript.generator.Input.fromClassNames(Input.java:204) at cz.habarta.typescript.generator.Input.from(Input.java:94) at cz.habarta.typescript.generator.maven.GenerateMojo.execute(GenerateMojo.java:1027) 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:957) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289) at org.apache.maven.cli.MavenCli.main(MavenCli.java:193) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) 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) Scanning classpath Scanning finished in 1.16 seconds. Total number of classes: 6688. Found 0 classes matching pattern. Error: No input classes found.
Maven pom.xml:
show xml
<?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/maven-v4_0_0.xsd"> <groupId>cz.habarta.typescript.generator</groupId> <artifactId>repo</artifactId> <version>1.0.0</version> <modelVersion>4.0.0</modelVersion> <packaging>jar</packaging> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <typescript-generator.version>2.35.1025</typescript-generator.version> </properties> <dependencies> <!-- https://mvnrepository.com/artifact/org.osgi/org.osgi.annotation.versioning --> <dependency> <groupId>org.osgi</groupId> <artifactId>org.osgi.annotation.versioning</artifactId> <version>1.0.0</version> <scope>provided</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.8.1</version> <configuration> <source>1.8</source> <target>1.8</target> <compilerArgs> <arg>-parameters</arg> </compilerArgs> </configuration> </plugin> <plugin> <groupId>cz.habarta.typescript-generator</groupId> <artifactId>typescript-generator-maven-plugin</artifactId> <version>${typescript-generator.version}</version> <executions> <execution> <id>generate</id> <goals> <goal>generate</goal> </goals> <phase>process-classes</phase> </execution> </executions> <configuration> <jsonLibrary>jackson2</jsonLibrary> <outputFileType>declarationFile</outputFileType> <outputKind>global</outputKind> <outputFile>index.d.ts</outputFile> <!-- <classes> <class>cz.habarta.typescript.generator.domain.CapInfo</class> </classes> --> <classPatterns> <pattern>cz.habarta.typescript.generator.domain.**</pattern> </classPatterns> </configuration> </plugin> </plugins> </build> </project>
Question:
Using the generator can generate java classes under generator-typescript
own jar
I can't generate ts using relative paths in my maven project