JVich Salas532369 (Community Member) asked a question.

Greenlight. Scan multimodule maven project

I'm trying to scan a maven project using greenlight. It runs smoothly when the project is single module (src and target folder are at the root) but fails when is multi-module. Multimódule means :

root

-- module-one

-- src

-- target

-- module-two

-- src

-- target

and so on.

 

The greenlight jar is looking for builds in the wrong place and I can not found any way to indicate the correct path

 

java -jar gl-scanner-java.jar [params...] -b target/classes

The results is the expectec because the target classes folder is not there

GREENLIGHT SEVERE: Provided build directory 'path/./target/classes' is not a directory or not accessible: skipping pair #1.

 

java -jar gl-scanner-java.jar [params...] -b module-one/target/classes

The build path is wrong:

Source file:   module-one/src/main/java/.../ByteCodeChange.java

Build file:   module-one/module-one/target/classes/.../ByteCodeChange.class

And of course fail:

GREENLIGHT SEVERE: Unable to create JAR 'path/module-one/module-one/target/classes/.../ByteCodeChange.class': Problem accessing input file: module-one/module-one/target/classes/.../ByteCodeChange.class (No such file or directory)

 

Does not matter about the -b paramater is passed, it will never found the correct build path but take a look the source file found is the correct one.

 

Could some one help me.

 

Thanks a lot

 


  • JVich Salas532369 (Community Member)

    The solutions seems

     

    -s module-one/src/main/java,module-two/src/main/java \

    -b module-one/target/classes,modules-two/target/classes

     

Topics (2)

No articles found
Loading

Ask the Community

Get answers, share a use case, discuss your favorite features, or get input from the community.