Configure provided libraries with maven

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Configure provided libraries with maven

Georgi Stoyanov

Hi guys,

 

In our project we have setup that uses flink-core, flink-java, rocksdb, slf4j (and some more libraries, that are on the machines, where the jars will be deployed) with scope “provided”. This is a bit tricky cause when we run the tests in IntelliJ there’s no logging (cause of missing slf4j library) and if we want to debug something is even harder, cause flink core, java etc are missing and we are forced to remove provided from our pom. This is not a huge problem, but when we want to debug and use some existing checkpoints, flink needs a file with the configured things (as I’m aware something similar to what I want is done in StreamingMultipleProgramsTestBase for integration testing)

 

Do you have any suggestions how can I run everything on my machine but when build to not include those libraries? (Tried maven profiles, they seems not to work very well, cause it makes some libraries to be duplicated/overlapping)  

 

Regards,

Georgi Stoyanov

 

Reply | Threaded
Open this post in threaded view
|

Re: Configure provided libraries with maven

Chesnay Schepler
If you use IntelliJ you can use a profile that sets dependencies to compile if executed in the IDE.
We use this in our quickstarts.

On 03.05.2018 12:56, Georgi Stoyanov wrote:

Hi guys,

 

In our project we have setup that uses flink-core, flink-java, rocksdb, slf4j (and some more libraries, that are on the machines, where the jars will be deployed) with scope “provided”. This is a bit tricky cause when we run the tests in IntelliJ there’s no logging (cause of missing slf4j library) and if we want to debug something is even harder, cause flink core, java etc are missing and we are forced to remove provided from our pom. This is not a huge problem, but when we want to debug and use some existing checkpoints, flink needs a file with the configured things (as I’m aware something similar to what I want is done in StreamingMultipleProgramsTestBase for integration testing)

 

Do you have any suggestions how can I run everything on my machine but when build to not include those libraries? (Tried maven profiles, they seems not to work very well, cause it makes some libraries to be duplicated/overlapping)  

 

Regards,

Georgi Stoyanov