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

plugin does not handle namespaces: imports are not recognized #140

Open
kanehekili opened this issue Sep 19, 2023 · 0 comments
Open

plugin does not handle namespaces: imports are not recognized #140

kanehekili opened this issue Sep 19, 2023 · 0 comments

Comments

@kanehekili
Copy link

kanehekili commented Sep 19, 2023

My protos need to have a namespace, hence they have a "base" folder under protobuf, which they have to reference (using it for python). But qualified paths are not accepted.

Working Example
import "another.proto"

Failing:
import /myNamespace/another.proto

protoc is able to compile that code. Is this plugin capable of namespaces or is just my config wrong? (just the base parts)

            <plugin>
                <groupId>com.github.os72</groupId>
                <artifactId>protoc-jar-maven-plugin</artifactId>
                <version>3.11.4</version>
                <executions>
                    <execution>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <inputDirectories>
                                <include>${basedir}/protobuf</include>
                            </inputDirectories>
                            <outputTargets>
			          <outputTarget>
				          <type>java</type>
				          <addSources>main</addSources>
			          </outputTarget>
		          </outputTargets>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

directory structure:

protobuf
    myNamespace
        a.proto
        b.proto
        folderA
           c.proto
           d.proto
        ...   
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

1 participant