Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include project version in final name #3090

Merged
merged 1 commit into from
Nov 15, 2024

Conversation

apophizzz
Copy link
Contributor

What problem does this PR solve?

This PR configures the Maven assembly plugin to build a single fat JAR for each subproject. Each fat JAR follows the naming scheme ${pattern}-${version}-SNAPSHOT.jar.
After the Maven Assembly Plugin has been executed, the resulting artifact can be executed as follows:

$ mvn clean package -DskipTests=true
...
$ cd proxy/target
$ ls -al
drwxr-xr-x  14 patrick  staff     448 Oct  8 00:12 .
drwxr-xr-x   7 patrick  staff     224 Oct  8 00:12 ..
drwxr-xr-x   3 patrick  staff      96 Oct  8 00:12 archive-tmp
-rw-r--r--   1 patrick  staff     846 Oct  8 00:12 checkstyle-cachefile
-rw-r--r--   1 patrick  staff   17646 Oct  8 00:12 checkstyle-checker.xml
-rw-r--r--   1 patrick  staff     696 Oct  8 00:12 checkstyle-result.xml
-rw-r--r--   1 patrick  staff     699 Oct  8 00:12 checkstyle-suppressions.xml
drwxr-xr-x   3 patrick  staff      96 Oct  8 00:12 classes
drwxr-xr-x   3 patrick  staff      96 Oct  8 00:12 generated-sources
drwxr-xr-x   3 patrick  staff      96 Oct  8 00:12 generated-test-sources
drwxr-xr-x   3 patrick  staff      96 Oct  8 00:12 maven-archiver
drwxr-xr-x   3 patrick  staff      96 Oct  8 00:12 maven-status
-rw-r--r--   1 patrick  staff  958950 Oct  8 00:12 proxy-1.26.0-SNAPSHOT.jar
drwxr-xr-x   3 patrick  staff      96 Oct  8 00:12 test-classes
$ java -jar proxy-1.26.0-SNAPSHOT.jar
20:55:56.257 [main] INFO com.iluwatar.proxy.IvoryTower -- Red wizard enters the tower.
20:55:56.260 [main] INFO com.iluwatar.proxy.IvoryTower -- White wizard enters the tower.
20:55:56.260 [main] INFO com.iluwatar.proxy.IvoryTower -- Black wizard enters the tower.
20:55:56.260 [main] INFO com.iluwatar.proxy.WizardTowerProxy -- Green wizard is not allowed to enter!
20:55:56.260 [main] INFO com.iluwatar.proxy.WizardTowerProxy -- Brown wizard is not allowed to enter!

Close #2565

Copy link

sonarcloud bot commented Nov 11, 2024

@iluwatar iluwatar merged commit 97de002 into iluwatar:master Nov 15, 2024
1 check passed
@iluwatar
Copy link
Owner

Looks good! Thank you for the contribution 🎉

@all-contributors please add @apophizzz for code

Copy link
Contributor

@iluwatar

I've put up a pull request to add @apophizzz! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Executable jar problem
2 participants