typescript-generator: maven plugin, problem with configuration

Hi,

I have setup my project with your plugin (by pasting it from doc and changing Pojo classes) but a message appears : Failed to execute goal cz.habarta.typescript-generator:typescript-generator-maven-plugin:1.10.220:generate (default-cli) on project ConfOnline: The parameters 'outputFile', 'outputKind', 'jsonLibrary' for goal cz.habarta.typescript-generator:typescript-generator-maven-plugin:1.10.220:generate are missing or invalid

configuration is

<jsonLibrary>jackson2</jsonLibrary>       
<classesFromJaxrsApplication>fr.test.MyApp</classesFromJaxrsApplication>
<outputFile>target/sample.d.ts</outputFile>
<outputKind>module</outputKind>

I have checked following things :

  • jackson2 is imported (I’ve tried with same version than in your example).
  • outputFile : checked that target folder exists, try also by adding an empty sample.d.ts file
  • outputKind : try the 3 authorized values without success
  • classes : I tried to provide just a simple class with classes instead of classesFromJaxrs.

What am I missing ?

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 1
  • Comments: 15 (6 by maintainers)

Most upvoted comments

@froux: Can you please try to put the configuration element outside the executions tag. I had the exact problem and got it working with that. See my pom snippet:

            <plugin>
                <groupId>cz.habarta.typescript-generator</groupId>
                <artifactId>typescript-generator-maven-plugin</artifactId>
                <version>1.10.220</version>
                <executions>
                    <execution>
                        <id>generate</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <jsonLibrary>jackson2</jsonLibrary>
                    <classes>
                        <class>com.xy.model.Item</class>
                    </classes>
                    <outputFile>target/Item.d.ts</outputFile>
                    <outputKind>global</outputKind>
                </configuration>
            </plugin>

@vojtechhabarta : Thank you for the awesome tool.