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

Intellij 2017.3.x together with jgitver not working at all for a multimodule project #81

Closed
1 task
anthonime opened this issue Mar 5, 2018 · 15 comments
Closed
1 task

Comments

@anthonime
Copy link

Issue

version: any

usage context:

  • Intellij IDEA: 2017.3.x

Problem description:

In a multimodule Maven project, with Intellij 2017.3.x, the internal dependencies between a child module and another child module of the same project are not detected. The whole dependency management of Intellij seem to get unstable and broken, leading to an impossibility to work.

To reproduce

  • download a fresh ZIP install of Intellij 2017.3.x
  • clone https://github.com/jgitver/jgitver-samples
  • Import the project in Intellij multi-deploy-at-end
  • in the pom.xml of module "two", try to add the dependency on module "one"
  • try to use classes defined in the module one in classes of the module two: it does not work

Note: we are several different teams in my customer, struggling with that bug. In order to fix it, we had to come back to previous versions of Intellij, which work perfectly

@anthonime
Copy link
Author

note also that the unstability appear more and more while you are switching to other branch of the project

@McFoggy
Copy link
Contributor

McFoggy commented Mar 5, 2018

as defined in #70 & in IDEA-184983 you would need at least a version above IDEA build 173.4548.5. Is it the case?

can you also provide some feedback on #72 if you still need help on the topic.

@anthonime
Copy link
Author

The bug is reproducible using version IDEA 173.4548.28
The symptoms mentionned in #70 are not the one I am mentioning in this bug.
(I do not see the message "detection of jgitver old setting mechanism").
The problem is different: it just prevent IDEA to resolve "internal" dependencies (module One and module Two).
It's very easy to reproduce and here, for different team of my company working on different product, we all encounter the same issue.
I will comment the #72 too

@McFoggy
Copy link
Contributor

McFoggy commented Mar 6, 2018

@anthonime indeed it looks like IDEA-184983 introduced regressions.

Can you open an issue on Intellij IDEA bugtracker please?

To bypass the problem, you can still fallback to skip jgitver for importing inside IDEA:

  • use at least 1.1.7 of jgitver-maven-plugin (latest is better)
  • change your IDEA maven imports settings to skip jgitver: see wiki here
  • close IDEA
  • reopen IDEA
  • reimport the maven project:
    • via right click on the root maven project
    • or via the button on the maven view

image

image

@anthonime
Copy link
Author

@McFoggy
Copy link
Contributor

McFoggy commented Mar 8, 2018

@anthonime thanks for the IDEA issue

did you tried my workaround to temporary bypass the problem?

Would be great also that you join the gitter room ; it can ease discussions.
Don't hesitate to come back to me.

@vromero
Copy link

vromero commented Apr 4, 2018

The symptoms mentionned in #70 are not the one I am mentioning in this bug.
(I do not see the message "detection of jgitver old setting mechanism").
The problem is different: it just prevent IDEA to resolve "internal" dependencies (module One and module Two).

We're experiencing the same issues in multi-module project. Using the workaround of the previous ticket didn't work for me either. :(

@McFoggy
Copy link
Contributor

McFoggy commented Apr 4, 2018

I rechecked this morning and experienced initially the exact same on the latest IDEA version IntelliJ IDEA 2018.1.1 (Ultimate Edition) Build #IU-181.4445.20, built on April 2, 2018

Then I created a new clean multi-module project (https://github.com/jgitver/jgitver-samples/tree/master/multi-module) and imported it inside IDEA ; this worked perfectly. I could edit the class in api project and immediately see changes available in the impl project.

As the project was more or less the exact same than the multi-deploy-at-end project I reopened this project in IDEA. It failed to see changes. Then I started to figure out for differences and found in .idea/libraries an XML file referencing the imported project. This was not the case for the new working multi module project.
I removed all the *.iml files and the old .idea directory ; then I reimported the maven project ; everything worked fine again. I could reference the classes from the imported sub module one inside the classes of the sub module two.

@gimmebytes
Copy link

@McFoggy

I just wanted to share my results with your suggestions. I've updated IntelliJ some days ago to 2018.1 (Community Edition) and was hoping that these issues got resolved. It seems not.

I've reproduced your steps:

  1. Check out your examples
  2. Open the parent pom.xml as project in intelliJ
  3. Added a basic class to the api module ("Foobar.java")
  4. Added a class in the impl module and tried to use the Foobar class, but didnt work. IntelliJ marks the Foobar class as red and suggest to add the api module as dependency which results in having the dependency twice in the pom. And still then, I cannot access the Foobar class.

Cheers,
Marvin

@McFoggy
Copy link
Contributor

McFoggy commented Apr 4, 2018

@gimmebytes ok I got it, I still have -Djgitver.skip=true in my IDEA maven import settings.

But at least, it remains a valid workaround until Jetbrains corrects the behavior.

image

@gimmebytes
Copy link

Yes, indeed. I'm using it currently on all my projects with ease :-)

@gimmebytes
Copy link

Bump

After updating IntelliJ to 2018.2.4 (CE) the bug still persists. I've updated the maven plugin to 1.3.0, but IntelliJ still fails to automatically pick up changes from other modules, e.g. add a new class to B and use in A.

After running mvn package the changes can be picked up.

Too bad, that Jetbrains did not fix this within months 👎 I still really like your plugin so much.

@McFoggy
Copy link
Contributor

McFoggy commented Oct 12, 2018

Too bad, that Jetbrains did not fix this within months 👎 I still really like your plugin so much.

thanks for your support ; indeed it is bad that IDEs do not support dynamic versioning.

I have no real news from Jetbrains since last time I discussed with them at devoxx France.
Next month, Wedneday November 14th, I will present jgitver at Devoxx : https://dvbe18.confinabox.com/talk/DBF-1594/project_versioning_like_a_git
I'll benefit to be there to again discuss that issue with IDEs providers : Jetbrains will be there for sure and I expect also some Eclipse community members to be there.

@avpet
Copy link

avpet commented Oct 10, 2019

The issue is still present in the latest IntelliJ IDEA 2019.2.3 Ultimate Edition, Build #IU-192.6817.14, still have to use -Djgitver.skip=true.

@McFoggy
Copy link
Contributor

McFoggy commented Oct 11, 2019

the IDEA issue has been just closed today (2019-10-11) see https://youtrack.jetbrains.com/issue/IDEA-187928

They will not support the feature, and thus you have to deactivate jgitver by using -Djgitver.skip=true while importing the maven project in IDEA

See above comment to know where to configure it in IDEA settings.

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

No branches or pull requests

5 participants