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

uber-jar the frameless sample and set mainClass #3341

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

prabhah
Copy link

@prabhah prabhah commented Nov 20, 2023

What kind of change does this PR introduce? (check at least one)

  • [] Bugfix
  • Feature
  • Code style update
  • Refactor
  • [x ] Build-related changes
  • Other, please describe:

The description of the PR:

  1. missing "mainClass" definition in the pom.xml

java -jar failed:

java -jar ./xxl-job-executor-samples/xxl-job-executor-sample-frameless/target/xxl-job-executor-sample-frameless-2.4.1-SNAPSHOT.jar
no main manifest attribute, in ./xxl-job-executor-samples/xxl-job-executor-sample-frameless/target/xxl-job-executor-sample-frameless-2.4.1-SNAPSHOT.jar

this method works,

java -cp ./xxl-job-executor-samples/xxl-job-executor-sample-frameless/target/xxl-job-executor-sample-frameless-2.4.1-SNAPSHOT.jar com.xxl.job.executor.sample.frameless.FramelessApplication
  1. didn't pack the dependence's jars to the final jar, difficult to run the sample
java -cp ./xxl-job-executor-samples/xxl-job-executor-sample-frameless/target/xxl-job-executor-sample-frameless-2.4.1-SNAPSHOT.jar com.xxl.job.executor.sample.frameless.FramelessApplication
Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
	at com.xxl.job.executor.sample.frameless.FramelessApplication.<clinit>(FramelessApplication.java:13)
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
	at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)

Other information:

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.

None yet

1 participant