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

Usage with intellij #338

Open
Dragas opened this issue Apr 30, 2019 · 1 comment
Open

Usage with intellij #338

Dragas opened this issue Apr 30, 2019 · 1 comment

Comments

@Dragas
Copy link

Dragas commented Apr 30, 2019

Intellij synchronizes its project configuration with the provided maven pom.xmls. On paper this seems to work alright, but there are two issues.

First one is that NarSystem class isn't available prior calling javah goal atleast once. Since it's put in target/nar/nar-generated, by default intellij does not index that class as target folder is ignored, although you can specify that nar-generated contains sources, it's a redundant step in setting up the project on another machine, but if you were to put generated classes in src/main/gen folder, that folder is indexed by default. How do you specify in your plugin to put the generated NarSystem class into src/main/gen folder?

Second one is that if you were to add a <type>nar</type dependency into another module, Intellij is unable to add classes from that dependency into the module's classpath. So far I'm using the following workaround

        <dependency>
            <groupId>lt.saltyjuice.dragas.chip</groupId>
            <artifactId>libnativeclock</artifactId>
            <version>1.0-SNAPSHOT</version>
            <type>nar</type>
        </dependency>
        <dependency>
            <groupId>lt.saltyjuice.dragas.chip</groupId>
            <artifactId>libnativeclock</artifactId>
            <version>1.0-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>

But this causes builds to fail as libnativeclock module is in nar format, not jar, which is what maven defaults compilation to. Is there a workaround for the second issue?

Cheers.

@pavlus
Copy link
Contributor

pavlus commented May 22, 2019

Have you tried adding nar to File | Settings | Build, Execution, Deployment | Build Tools | Maven | Importing Dependency types field?

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