[
https://issues.apache.org/jira/browse/ARROW-15959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17528365#comment-17528365
]
David Li edited comment on ARROW-15959 at 4/26/22 7:25 PM:
-----------------------------------------------------------
Tracing my steps: I started with a fresh IntelliJ 2022.1 installation. I
installed IdeaVim and CheckStyle-IDEA for reference.
I then opened the {{java}} subdirectory of a fresh Arrow checkout, and waited
for the Maven sync. That ran into
{noformat}
Could not find artifact
io.netty:netty-transport-native-unix-common:jar:${os.detected.name}-${os.detected.arch}:4.1.72.Final
in central (https://repo.maven.apache.org/maven2)
{noformat}
This seems to be related to
https://github.com/trustin/os-maven-plugin/issues/19. I updated the plugin and
re-opened the IDE, which seemed to fix it mostly, except in
flight-integration-tests which had
{noformat}
Unresolved dependency:
'io.netty:netty-transport-native-unix-common:jar:4.1.72.Final'
{noformat}
Adding the os-maven-plugin didn't help here. Deactivating the
linux-netty-native profile in the Maven pane did. I think this might be because
IntelliJ isn't substituting the os properties when dependencies come from a
profile.
Now Maven syncs. I tried to build the project and had to set an SDK. I chose
JDK11 and set the language level to 8, then tried building again. That led to
{noformat}
package sun.misc does not exist
{noformat}
That seems to be related to https://youtrack.jetbrains.com/issue/IDEA-201168. I
disabled the option specified there and the build continued. Now the build
fails in TestExpandableByteBuf. Honestly, I think this file is in the wrong
packageā¦I moved it into arrow-memory-netty.
Continuing on, the build fails because it can't find the auto-generated
sources. So then I manually invoked {{mvn compile}}. That inexplicably failed
from within IntelliJ, so I switched to the CLI and ran {{mvn compile}}
manually, which seemed to work fine. That generated
{{arrow-vector/target/generated-sources}}, so I found that in the IntelliJ
Project pane and right-click > "Mark Directory As" > "Generated Sources Root".
Then I restarted the build.
was (Author: lidavidm):
Tracing my steps: I started with a fresh IntelliJ 2022.1 installation. I
installed IdeaVim and CheckStyle-IDEA for reference.
I then opened the {{java}} subdirectory of a fresh Arrow checkout, and waited
for the Maven sync. That ran into
{noformat}
Could not find artifact
io.netty:netty-transport-native-unix-common:jar:${os.detected.name}-${os.detected.arch}:4.1.72.Final
in central (https://repo.maven.apache.org/maven2)
{noformat}
This seems to be related to
https://github.com/trustin/os-maven-plugin/issues/19. I updated the plugin and
re-opened the IDE, which seemed to fix it mostly, except in
flight-integration-tests which had
{noformat}
Unresolved dependency:
'io.netty:netty-transport-native-unix-common:jar:4.1.72.Final'
{noformat}
Adding the os-maven-plugin didn't help here. Deactivating the
linux-netty-native profile in the Maven pane did. I think this might be because
IntelliJ isn't substituting the os properties when dependencies come from a
profile.
Now Maven syncs. I tried to build the project and had to set an SDK. I chose
JDK11 and set the language level to 8, then tried building again. That led to
{noformat}
package sun.misc does not exist
{noformat}
> [Java][Docs] Fix IntelliJ IDE setup instructions
> ------------------------------------------------
>
> Key: ARROW-15959
> URL: https://issues.apache.org/jira/browse/ARROW-15959
> Project: Apache Arrow
> Issue Type: Improvement
> Components: Documentation, Java
> Reporter: David Li
> Assignee: David Li
> Priority: Major
>
> A few more things need to be documented to get debugging working in IntelliJ,
> at least in my experience. This is probably because instead of using the
> Maven build, I'm using IntelliJ's native build, which lets me one-click run a
> particular class or test, but needs some extra configuration.
> * Must unset "Use --release option for cross compilation" in compiler
> settings
> * Must build once with Maven and mark the
> arrow-vector/target/generated-sources directory as a generated sources root
--
This message was sent by Atlassian Jira
(v8.20.7#820007)