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

Eclipse is not a fan of the IT class name colliding with test projects root folder path #178

Open
tmortagne opened this issue Jan 14, 2021 · 6 comments
Labels
bug Something isn't working

Comments

@tmortagne
Copy link

tmortagne commented Jan 14, 2021

Describe the bug

In Eclipse/M2e you get a "The type CheckMojoIT collides with a package" (replace CheckMojoIT by the name of your test class) error in the test class file because it has the same path (without the ".java" part of course) as the folder which contain the test projects.

To Reproduce

Import the Maven project in Eclipse as a Maven project.

You don't always get the error right away for some reason, but you should see it appear when you modify the class. I can always make it disappear using Maven -> Update Project... but then it's coming back as soon as I modify something.

The used versions
The version of tools you have used.

  • JDK: openjdk version 11.0.9.1
  • IDE: Eclipse: 2020-12 (4.18.0)
  • OS: Ubuntu 20.10

It's probably more of a problem on Eclipse side since I see no real technical problem with that, but it's quite annoying...

@tmortagne tmortagne added the bug Something isn't working label Jan 14, 2021
@khmarbaise
Copy link
Owner

Could you create an example project which reproduces the problem... and put that on github or a lilke...

@tmortagne
Copy link
Author

Sure, I have one on github that reproduce the issue, but it has some other snapshot dependencies, so not the easiest one to debug probably. I will try to find some time to build a simpler example project later today.

In the meantime:

@tmortagne
Copy link
Author

Here is a simpler Maven project:

maven-it-extension-test.zip

  • import it as "Existing Maven project"
  • edit CheckMojoIT class

-> an error "The type CheckMojoIT collides with a package" appear associated to the class

@khmarbaise
Copy link
Owner

First thanks for your example project by which I can reproduce the issue within Eclipse but based on correctly working on Maven, Javac etc. and IDEA IntelliJ and Netbeans as well without any issue and this I would assume that this is an issue in Eclipse because Eclipse seemed to be analysing the content of the target directory.

But in the end it will not really help you... I'm currently changing some things which means you might be able to change the location of the copied resources related to #163 but currently there is no real option to change this behaviour.

@khmarbaise
Copy link
Owner

I have create bug at eclipse https://bugs.eclipse.org/bugs/show_bug.cgi?id=571218

@khmarbaise
Copy link
Owner

Reopened the above bug because the issue can be reproduced with current Eclipse version.

Eclipse IDE for Java Developers (includes Incubating components)
Version: 2021-12 (4.22.0)
Build id: 20211202-1639
OS: Mac OS X, v.10.14.6, x86_64 / cocoa
Java vendor: Eclipse Adoptium
Java runtime version: 17.0.1+12
Java version: 17.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants