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

Update example build config to produce a cleaner fat jar #268

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

eneufeld
Copy link
Contributor

@eneufeld eneufeld commented Feb 20, 2023

Fix #139

@ndoschek ndoschek self-requested a review February 21, 2023 13:24
Copy link
Contributor

@ndoschek ndoschek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Eugen, warnings were reduced significantly during the m2 build.
Also the size of the standalone JAR was decreased by ~4MB (from 26.4MB to 22.1MB).

However, the standalone JAR cannot be started anymore:

java -jar org.eclipse.emfcloud.modelserver.example-0.7.0-SNAPSHOT-standalone.jar 
Error: Unable to initialize main class org.eclipse.emfcloud.modelserver.example.ExampleServerLauncher
Caused by: java.lang.NoClassDefFoundError: org/eclipse/emfcloud/modelserver/emf/di/ModelServerModule

Could you have another look there, thanks!

Regarding the GitHub workflow builds: --> Extracted this to a separate issue: #269

It seems that they updated to maven 3.9.0, which has a breaking change regarding the maven.config file we use: https://maven.apache.org/docs/3.9.0/release-notes.html#potentially-breaking-core-changes
To fix this for the newest maven version, we need to split the arguments in separate lines:

.mvn/maven.config:

--settings
./.mvn/custom-settings.xml

I quickly checked with an older version (3.8.6), the adjusted maven.config worked for me locally as well.

@@ -64,12 +64,12 @@
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<!--<dependency>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we remove this lib dependency?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's not needed as it is pulled in by the other dependencies. We get rid of many warnings by removing it.

@ndoschek
Copy link
Contributor

ndoschek commented Mar 17, 2023

Regarding the GitHub workflow builds: --> Extracted this to a separate issue: #269

Workflows are functional again, after rebasing the checks should work again.

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.

Fix warnings in build
2 participants