vojtechhabarta / typescript-generator

Generates TypeScript from Java - JSON declarations, REST service client
MIT License
1.14k stars 237 forks source link

Maven generate goal error #75

Closed bsandhu closed 8 years ago

bsandhu commented 8 years ago

This is my maven config:

        <plugin>
            <groupId>cz.habarta.typescript-generator</groupId>
            <artifactId>typescript-generator-maven-plugin</artifactId>
            <version>1.7.192</version>
            <executions>
                <execution>
                    <id>generate</id>
                    <goals>
                        <goal>generate</goal>
                    </goals>
                    <configuration>
                        <jsonLibrary>jackson2</jsonLibrary>
                        <classes>
                            <class>com.ib.loans.lsi.model.FieldAudit</class>
                        </classes>
                        <outputFile>foo.d.ts</outputFile>
                        <outputKind>module</outputKind>
                    </configuration>
                </execution>
            </executions>
        </plugin>

This is the Java file:

package com.ib.loans.lsi.model; public class FieldAudit { public String fieldName; public String values; }

Seems simple enough, when i run the mvn goal, I get this error.

[ERROR] Failed to execute goal cz.habarta.typescript-generator:typescript-generator-maven-plugin:1.7.192:generate (default-cli) on project LoansStaticService: The parameters 'outputFile', 'outputKind', 'jsonLibrary' for goal cz.habarta.typescript-generator:typescript-generator-maven-plugin:1.7.192:generate are missing or invalid -> [Help 1]

I also tried with 1.10 and 1.9.

vojtechhabarta commented 8 years ago

You can run

mvn install

which invokes generate goal as part of process-classes phase (you can also add for example <phase>process-classes</phase> to pom.xml). This is preferred because it runs typescript-generator after maven-compiler-plugin.

Or you can run

mvn cz.habarta.typescript-generator:typescript-generator-maven-plugin:1.10.212:generate

but in this case you need to change execution id to default-cli in pom.xml.

vojtechhabarta commented 8 years ago

Closing the issue. @bsandhu I hope it works for you. Please reopen if you need more help.