-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Maven import claims no files to index #405
Comments
Hi @godeater, thanks for reaching out to us! Actually we designed the Maven project setup to be as simple as possible, so there is not much the user can do wrong ;) I'd rather say that it's an issue in Sourcetrail and we would be really happy to fix it! Can you provide some more info on the your Maven project? Are you doing anything unusual? One thing you could check: execute |
I'm actually pretty new to this project, hence the trial of Sourcetrail on it - to try to get a better understanding of the code, so I've actually no real idea of whether it's been set up in a particularly unusual way. Running the command you've given doesn't give me an XML file, it gives me a bunch of errors - so it's entirely possible my entire maven install is incorrect. Shall we park this until I can get the XML you've asked for? (and which I theorise might actually fix the entire problem? :) ) |
Thanks for the quick response! The command I gave you won't generate an XML on our harddisk. It will just write the XML struture as console output. But if that command isn't working in your console the Maven integration of Sourcetrail won't be working either ;) Parking this issue until your maven install is working correctly sounds good! |
Okay - got the maven install working, and have run your command successfully (have also checked, and Sourcetrail is still saying it can't find any files to index.). The sourceDirectory node says this : "C:\Users\childba\Projects\Stash_Repos\employer\edt\edt\src\main\java" which looks correct (but only if Sourcetrail recurses down the file tree in there - as that directory only contains sub-directories, and the actual .java files are several levels further down. |
Yes, Sourcetrail will recurse down into subfolders of the source directory. Thank you for providing the xml file! The pom looks good to me. I think now we should check if Sourcetrail uses the correct install of Maven. Can you please open your Sourcetrail preferences window and check the Maven path specified there? Try to run |
The one in the Sourcetrail preferences is the same one I'm running to generate the xml I've sent you. Preferences path : C:/Dev/apache-maven-3.3.9/bin/mvn.cmd Output of "which mvn" in Cygwin window : /cygdrive/c/Dev/apache-maven-3.3.9/bin/mvn PS - Working day has finished now, so anything else you want me to try will have to wait till Monday - sorry! |
Alright, have a nice weekend! Right now it really sounds like a bug to me. I'll reflag this issue. |
Back to work! So what Sourcetrail actually does is executing the With that console output I'd be able to debug your issue directly :) |
Oh, one other thing: Maybe a stupid question, but does the path "C:\Users\childba\Projects\Stash_Repos\employer\edt\edt\src\main\java" exist on your system? |
Doesn't look like it'll be necessary. |
Thanks for the quick reply! Good to hear that everything worked out for you! I think the usage of the |
We fixed this issue with Sourcetrail version 2017.2.5. As Maven will fail if the JAVA_HOME variable is not set on the system Sourcetrail will check that condition before executing Maven and set the value of this variable automatically (derived from the Java Path specified in the application settings). However Sourcetrail will log in a warning that it was required to use this fallback mechanism. Moreover Sourcetrail will now display a popup when an issued Maven command fails. This popup will show the Maven error message so that the user becomes aware and may react accordingly. |
hello, i am facing the same issue, and i found there is no src\main\java folder on my system, because there are only sub modules. how can i fix this problem? |
I'm trying to trial Sourcetrail on a Maven project we have here, only after I've pointed sourcetrail at the pom.xml - and then hit the "Show source files" button, it displays a window saying "File List - 0 files".
I accept this is almost certainly a user issue - but I'm not sure where I'm going wrong!
The text was updated successfully, but these errors were encountered: