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

How to generate the index in maven #651

Open
liujingxing opened this issue Jul 16, 2020 · 1 comment
Open

How to generate the index in maven #651

liujingxing opened this issue Jul 16, 2020 · 1 comment

Comments

@liujingxing
Copy link

How do I pass the eventBusIndex parameter in Maven

@greenrobot-team
Copy link
Collaborator

greenrobot-team commented Jul 27, 2020

Maven is not officially supported (only Gradle is), but it should work similar to the following configuration. You should be able to replace with EventBus annotation processor and its option (https://greenrobot.org/eventbus/documentation/subscriber-index/):

<!-- Adds the ObjectBox annotation processor to enable code generation -->
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>3.8.0</version>
    <configuration>
        <annotationProcessorPaths>
            <path>
                <groupId>io.objectbox</groupId>
                <artifactId>objectbox-processor</artifactId>
                <version>${objectboxVersion}</version>
            </path>
        </annotationProcessorPaths>
        <annotationProcessors>
            <annotationProcessor>io.objectbox.processor.ObjectBoxProcessorShim</annotationProcessor>
        </annotationProcessors>
        <compilerArgs>
            <arg>-Aobjectbox.modelPath=${project.basedir}/objectbox-models/default.json</arg>
        </compilerArgs>
    </configuration>
</plugin>

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