Skip to content
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

rootPackageName configuration seems ignored #34

Closed
jpastoor opened this issue Oct 1, 2020 · 4 comments
Closed

rootPackageName configuration seems ignored #34

jpastoor opened this issue Oct 1, 2020 · 4 comments

Comments

@jpastoor
Copy link

jpastoor commented Oct 1, 2020

The code is generated in the com.example.graphql.client, instead of using the configuration option rootPackageName. Am I missing something or is this a bug?

Currently using

        <apollo-client-maven-plugin.version>3.3.1</apollo-client-maven-plugin.version>
        <apollo-runtime.version>2.3.1</apollo-runtime.version>

with the following plugin configuration:

<plugin>
                <groupId>com.github.sparow199</groupId>
                <artifactId>apollo-client-maven-plugin</artifactId>
                <version>${apollo-client-maven-plugin.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
                            <rootPackageName>org.mycompany.xxx.graphql.client</rootPackageName>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

Generated sources have the com.example.graphql.client package. mvn clean and re-generate did not resolve the issue. (I'm pretty rusty when it comes to Java so good chance I'm doing something wrong here :) )

@jpastoor
Copy link
Author

jpastoor commented Oct 1, 2020

Found out that it does seem to work whenever I move the configuration to the plugin top level, instead of in the execution block.

            <plugin>
                <groupId>com.github.sparow199</groupId>
                <artifactId>apollo-client-maven-plugin</artifactId>
                <version>${apollo-client-maven-plugin.version}</version>
                <configuration>
                    <rootPackageName>org.mycompany.xxx.graphql.client</rootPackageName>

works.

is that expected?

@aoudiamoncef
Copy link
Owner

aoudiamoncef commented Oct 1, 2020

Hi @jpastoor,
This is what's expected.

@jpastoor
Copy link
Author

jpastoor commented Oct 1, 2020

But in the README and in the example project the plugin configuration is present in the <execution> block, should we update the README and move the configuration there too?

@aoudiamoncef
Copy link
Owner

Please look at Spring Boot example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants