How to not run a maven module of the project?

Answered

I posted a problem I'm having at:

https://stackoverflow.com/questions/54268210/preventing-non-src-code-module-from-running-maven-build-cycle-when-a-source-file

however, I have had no luck with the suggestions there - at least how I understood how to implement them.

My Problem is that ever since I added a "file storage" module to my Kotlin/Java project, whenever I run any Kotlin of Java class from another module - it first runs through some of the phases of this "file storage" module.

This module is a JVM type module, I needed to create it that way to get maven to run on it.

But I only want to run maven on this module manually. I do not want it as part of the build process of the project. It  really slows me down because even if I want to run a simple unit test, I have to wait for this maven goals window to pop up and for it to work through them for this "file storage" module before the simple unit test can run.

 

 

0
15 comments

Hi.

Is it possible to provide a project example? it is hard to advice without looking at a project.

0
Avatar
Permanently deleted user

what is a project example? you mean all the maven poms? or just an outline of the names of the modules?

0

I mean entire project, any project where the problem reproduces would be fine.

0
Avatar
Permanently deleted user

I'm not really a maven expert, maybe I'm just overlooking something obvious.

Would you know what can cause the "maven goals" window to pop up? I think maybe I should try to figure this out by trying to idenftify what causes this window to appear.

I don't remember it happening before I had this problem.

And also I tried on a simple unrelated project I have that has a pom and this goal window never appears.

0

Could you please explain step by step how exactly are you running a project? Are you using run command or running Goal from Maven tool window?

I suppose you should switch Run/Debug configuration https://www.jetbrains.com/help/idea/creating-and-editing-run-debug-configurations.html

0
Avatar
Permanently deleted user

not working correctly:

java or kotlin classes are run from Run/Debug configurations(this toolbar at the top right of the IDE) - their main class. Their modules have poms associated with them.

Unit tests are run manually from the buttons next to the unit test class in the source or next to the unit test methods.

all these ways make a goal window pop up and run my XML-files-only maven module (no src files in that module)

and then the actual code I wanted to execute (main class or unit test) will run after it is finished... it means that "build" on the statusbar does not even appear until after the goal window is finished.

works correctly:

for "running" my XML-files module, I just run it manually within the lifecycle from the maven sidebar. That is what I want to do, that part works fine.

0

Could you please provide a screenshot of run debug configuration?

0
Avatar
Permanently deleted user

I attached to the left side what shows when this is run, before it proceeds to build and to running the Kt fun main.

However, it pops up before anything from the java or kotlin modules in the project is run even unit tests.

0

Is there anything in before launch section? Could you please try creating a new Kotlin run debug configuration from scratch?

0
Avatar
Permanently deleted user

is "before launch section" an intellij run configuration-related thing? or is that something i would find in the maven poms?

also, I have to sign in everytime I visit the jetbrains forums - is that normal? can you stay signed in for a long time?

0

before launch section can be found at the bottom of run debug configuration, please check https://www.jetbrains.com/help/idea/creating-and-editing-run-debug-configurations.html

Regarding the forum - are you sure you have checked "remember me"?

 

0
Avatar
Permanently deleted user

oh I didn't see that because there is a lot of blank space and you need to scroll down to find that before launch section.

 

yes, it has "build". But all my launch configurations do. I have not altered the part of the launch configuration at all since I didn't even know it existed.

all I did was make a maven pom for my JVM-type module that has no source code in it, just XML files and then after that this maven goal window started popping up whenever I run anything. I'm not entirely sure yet how to pare down my project to a sample project that shows the problem and can be analyzed, therefore I'm just trying to understand what might be causing it so I can investigate it. I have no idea where to start.. would the problem be in the new pom ? other poms? somewhere else?

about "remember me".. there is no "remember me"... it just says "sign in" whenever I visit the forums. I click that and it signs me in, doesn't ask or even show username/password ... just signs in after I click it.

0

Hello.

Have you tried to create a new run debug configuration? Are you sure there is no way to share project source code?

0
Avatar
Permanently deleted user

nope i didn't try making a new run configuration, maybe that will help - i'll try. All the old ones have this same problem.

 

What exactly is sharing the project configuration? what files specifically is that? the poms and the iml files?

0

I meant the whole project source, to reproduce the problem.

0

Please sign in to leave a comment.