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

Dependencies not found. Cannot resolve at.mana:instrument-maven-plugin:1.0.0 #36

Open
j-j-kam opened this issue Oct 17, 2022 · 8 comments

Comments

@j-j-kam
Copy link

j-j-kam commented Oct 17, 2022

After successfully installing the plugin from the source, when I update the pom.xml file, the dependencies are highlighted in red. Do you know what the problem may be?

Screenshot 2022-10-17 at 13 40 21

Screenshot 2022-10-17 at 13 52 34

Screenshot 2022-10-17 at 13 52 25

@aschuler84
Copy link
Owner

aschuler84 commented Oct 17, 2022

Upon first start the plugin asks to install additional dependencies, however this process can also be started from within IntelliJ's settings view. Under File > Preferences > Manai there is a verify ("Verify MANAi installation") and install ("Install Dependencies") dependencies link.

  • The verify link checks if all required dependencies within your local maven repository are available.
  • The install link installs required dependencies.

image

Click the install link, then verify if the installation was correct and try again. If it is still not working, paste a screenshot of the ManaI preferences window after clicking the verify link. Also if the problem remains, could you provide which system you are working on - Mac, Windows, Linux?

@j-j-kam
Copy link
Author

j-j-kam commented Oct 17, 2022

I want to use your library for my university project. I'm using macOS 12.3.1. Unfortunately, downloading dependencies takes ages for some reason and runs for 15 minutes already. Is it supposed to be that way?

Thank you very much for your help. Here's the image you requested. I will try to install a previous version of IntelliJ on a university Linux machine and try it there. Or can I wait till you release the new version compatible with the latest IntelliJ, and then try it both on my PC and the Linux machine? When do you plan to release it? Thank you.

Screenshot 2022-10-17 at 16 10 18

@aschuler84
Copy link
Owner

aschuler84 commented Oct 17, 2022

Using MacOsx should be fine, the only important thing is, that it only works on Intel-Based Macs so no Apple M1/2 chips.
Looking at the output of the verifier it seems that your maven installation is not configured properly. The plugin requires maven 3.8.4 to be installed on your system, additionally the M2_HOME environment variable needs to be set properly.
Both steps show a red-icon, hence the plugin was unable to locate your maven installation, maybe due to missing/invalid configuration.

See https://github.com/aschuler84/MANAi#maven in the documentation for reference.

M2_HOME environment variable should point to your Maven 3.8.4 installation dir. You can specify environment variables either globally on MacOsx, e.g. via export command in ~/.bashrc or you can specify them directly within IntelliJ, however for the latter the environment variable only is visible in Intellij (see screenshot below). Be sure to restart Intellij after setting path variables

Bildschirmfoto 2022-10-17 um 17 59 15

In summary, all verification steps need to print a green tick, only then the plugin is properly installed.
So even with the new release you need to properly configure your maven installation beforehand.

Is there a particular project/assignment you are working on, I am very interested what your are planning to use the plugin for.

@j-j-kam
Copy link
Author

j-j-kam commented Oct 29, 2022

Dear @aschuler84 ,

I've tried for several hours, but it seems the plugin just refuses to recognize the settings. I've locally installed the correct maven version you specified, because I work on a university computer, configured both global variables

export PATH=/cs/home/gmk5/mavenDir/apache-maven-3.8.4/bin:$PATH

Same for M2_HOME.

echo $M2_HOME
/cs/home/gmk5/mavenDir/apache-maven-3.8.4/bin

and Intellij-specific one, reloaded the project... the plugin does not see the maven.home. Do you have any thoughts on what can the source of the problems be? I'm starting to lose hope...

I'm now working on a Linux machine.

image

image

image

image

@aschuler84
Copy link
Owner

aschuler84 commented Nov 10, 2022

The settings look fine, it seems as if there is a bug on Linux not being able to resolve the environment variables defined in IntelliJ - I will have to investigate that.

The settings look fine now - the plugin is now able to resolve the required dependencies, still however the M2_HOME variable can not be resolved - please try the following though:

Please try adding the M2_HOME environment variable system-wide, e.g. by specifying it in your .bash_profile file. Once set, test if the variable is properly set via a terminal window. Keep in mind, that you need may need to re-login. Then start IntelliJ, run the verification tests in the ManaI settings screen and check if the first entry is now also green. Then it should work.

@aschuler84
Copy link
Owner

aschuler84 commented Nov 10, 2022

Oh, I've seen you already verified it when setting it on the system-level. Did you add it to your .bash-profile so that it get's picked up during linux startup?

@aschuler84
Copy link
Owner

aschuler84 commented Nov 10, 2022

@j-j-kam Oh, it just occurred to me ... your M2_HOME points to the .../bin folder - this is wrong however.

  • The bin folder needs to be added to your PATH variable (correct in your comment above).
  • The M2_HOME however, should point the maven installation/home directory (see below).

echo $M2_HOME
/cs/home/gmk5/mavenDir/apache-maven-3.8.4/bin <--- remove bin folder M2_HOME should point to the installation directory of maven not its binary folder.

correct: /cs/home/gmk5/mavenDir/apache-maven-3.8.4

@j-j-kam
Copy link
Author

j-j-kam commented Nov 11, 2022

@aschuler84 thank you very much. Great. Installation finally went successfully. Specifying M2_HOME in IntelliJ does not work, just in the shell. So, I set up the variable in the shell and then run the needed version of IntelliJ from the same terminal window. I now tried to run the plugin on Linux machine, however, the Mana plugin section says there is no recorded data found. What am I doing wrong this time? Sorry, I'm asking way too many questions. I'm a student who tries to use your plugin for a project.

photo_2022-11-11 19 06 49
photo_2022-11-11 19 06 50
photo_2022-11-11 19 06 51
photo_2022-11-11 19 06 52
photo_2022-11-11 19 06 54
photo_2022-11-11 19 06 55

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