secure-software-engineering / FlowDroid

FlowDroid Static Data Flow Tracker
GNU Lesser General Public License v2.1
1.02k stars 292 forks source link

Error in install progress #632

Closed hannuri-k closed 11 months ago

hannuri-k commented 11 months ago

When I type 'mvn install' inside the FlowDroid folder, I get the following error. How can I fix it? java is version 20.

스크린샷 2023-07-11 오후 1 58 40

The screenshot below shows the inside of the pom.xml file

스크린샷 2023-07-11 오후 2 00 10
timll commented 11 months ago

I'd suggest you to run a single test and look whether it displays some error message while running.

StevenArzt commented 11 months ago

The tests reference the rt.jar file that only existed up to Java 9. We check whether FlowDroid finds flows inside the Java standard library, but the test suite was never ported to the new Java module file system. I assume that you only have Java 20 on your machine. The tests therefore find no code to analyze.

I suggest that you either use the official FlowDroid JARs from Maven Central (release version 1.12 is fairly recent), or that you build FlowDroid and skip the tests using mvn install -DskipTests.

We run the tests as part of our CI/CD pipeline on a machine that has Java 8 installed on the side for the rt.jar. FlowDroid itself obviously runs on modern Java as well, it's just a problem with the tests.

hannuri-k commented 11 months ago

Failure occurred at the StubDroid stage when 'mvn install -DskipTests' was used. Even in this case, can I just assume that there is no problem and proceed? Or do I need to install the Java 8 version?

StevenArzt commented 11 months ago

Which failure? Please be more precise.

hannuri-k commented 11 months ago
스크린샷 2023-07-13 오전 10 03 54
StevenArzt commented 11 months ago

I just committed a fix that should resolve this issue. Apparently, the "attached" goal in the Maven assembly plugin has been removed in newer versions.

hannuri-k commented 11 months ago
스크린샷 2023-07-18 오전 11 36 33

Hi, I solved the last problem but got a new error. When I rebuilt after deleting the folder, it succeeds up to the 'stubdroid' step but fails at the 'FlowDroid Command Line Util' step. I used the command 'mvn install -DskipTests'.

StevenArzt commented 11 months ago

That's interesting. I don't really know why this fails, see screenshot below:

image

hannuri-k commented 11 months ago
스크린샷 2023-07-19 오후 12 15 50

The java version is the same as your screenshot, and the mvn version looks like the below image.

The pom file in the root folder

스크린샷 2023-07-19 오후 12 19 57 스크린샷 2023-07-19 오후 12 20 10

I did not modify the pom files in the subfolders. Do I need to modify the pom file?