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

Cannot add dependency #25

Closed
Tutul- opened this issue Jul 1, 2015 · 10 comments
Closed

Cannot add dependency #25

Tutul- opened this issue Jul 1, 2015 · 10 comments

Comments

@Tutul-
Copy link

Tutul- commented Jul 1, 2015

First, thank for your plugin but I have a problem with it.
Actually, I use some library like apache-common but I cannot build (with assembly plugin) an exe with library in int :/
I try the addDependency param but didn't work (or I use it wrong ?).
I try to build after the assembly plugin create the jar whit dependency but I didn't succeed :/
Can you tell me how to add these dependency in the exe ?
You can check the pom file there : https://github.com/Tutul-/NaheulCraft-Updater/blob/master/pom.xml

@lukaszlenart
Copy link
Collaborator

In configuration of assembly plugin you have <finalName>${project.name}</finalName> but in launch4j plugin you use <jar>target/${project.artifactId}-${project.version}-${release.identifier}.jar</jar>

What do you see in target folder after running mvn assembly?

@Tutul-
Copy link
Author

Tutul- commented Jul 1, 2015

The finalName must be remove but I see the ${project.artifactId}-${project.version}-${release.identifier}.jar and the version with dependency. And the exe without dependency (not working on Windows)

@lukaszlenart
Copy link
Collaborator

First of all: why do you need assembly-plugin? It isn't needed to run launch4j-plugin

@lukaszlenart
Copy link
Collaborator

Ok, I was able to find issue, but it's rather temporary fix and it would be better to clean up configuration.

Running mvn assembly:single will build ${project.name}-jar-with-dependencies.jar in target so you must use that jar in Launch4j's configuration

<jar>target/${project.name}-jar-with-dependencies.jar</jar>

@Tutul-
Copy link
Author

Tutul- commented Jul 2, 2015

ok I will do like that. But, I used assembly:assembly because before I used appbundle (for OSX but not used anymore actually). And appbundle pack the dependency within. but why launch4j does not?

@lukaszlenart
Copy link
Collaborator

Not sure why, by default addDependency flag is set to true so it should be there - will check some other options as well.

PS. assembly:single is the only valid option now, all others are deprecated - check page

@Tutul-
Copy link
Author

Tutul- commented Jul 2, 2015

ok I use shade now and I must specified the shaded jar (so launch4j didn't include dependency). It's woking. I try with the no-shaded jar and true but not working.

@lukaszlenart
Copy link
Collaborator

Can you try with the latest plugin version? I have tested your project locally and it supposed to works.

@Tutul-
Copy link
Author

Tutul- commented Sep 15, 2017

I'll try that these week-end :)

@Tutul-
Copy link
Author

Tutul- commented Sep 16, 2017

Seems to be ok :) thanks ^^

@Tutul- Tutul- closed this as completed Sep 16, 2017
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

No branches or pull requests

2 participants