skadistats / clarity-examples

Example code for clarity
BSD 3-Clause "New" or "Revised" License
113 stars 37 forks source link

Update pom.xml #52

Closed Whoeza closed 1 year ago

Whoeza commented 1 year ago

Hi! I propose a new default because the current one does not look like it's meant to build to me: ${exampleName} -> clarityexamples Cheers! o/

Whoeza commented 1 year ago

I closed it because, I don't know HOW, but it appears that ${exampleName} builds just fine..?

spheenik commented 1 year ago

If you build with maven, you have to supply the example you want to build as a parameter. For example: mvn -P combatlog package to build the combatlog example.

spheenik commented 1 year ago

From the IDE, you can just directly run the Main class of the example you're interested in.

Whoeza commented 1 year ago

From the IDE, you can just directly run the Main class of the example you're interested in.

Hi spheenik. I had success with the -P parameter using the profile names indicated in the pom. I can build once, and run every time I need to create the JAR executable for a given profile passed in the run settings. Is this correct? I don't understand the running the Main class that you mentioned. I'm new to Maven and IDEA, and I'm a bit confused by the workflow, but I got it to work today and it's beautiful when it does.

spheenik commented 1 year ago

If you build via maven, you have to specify the profile. In IDEA, you can just open the main class of the example you're interested in and run it. No maven building is required, IDEA takes care of finding out what to compile and does it itself.

Whoeza commented 1 year ago

If you build via maven, you have to specify the profile. In IDEA, you can just open the main class of the example you're interested in and run it. No maven building is required, IDEA takes care of finding out what to compile and does it itself.

Where can I learn this topic? Do I have to learn Maven? Or IDEA? Or using Maven in IDEA? It seems like dark magic to me. In all cases, thank you.