Comments (5)
I had the same problem when packaging with the Maven m2 plugin for Eclipse.
However,
when performing a 'mvn package' from command line, there was no problem and the
jars
are included as expected.
Original comment by [email protected]
on 4 Jun 2009 at 6:30
from onejar-maven-plugin.
Hi Elisha, thanks for your issue report. And thank you Tom for your input on
the matter.
I made a small test project which I beleive does the same thing you are looking
for,
Elisha.
It's three library projects, and one application project. All
<packaging>jar</packaging> and the app uses onejar-maven-plugin. They are built
from
a root-pom which has all of them as <module>.
You can download it from here:
http://github.com/hugojosefson/onejar-maven-plugin-issue15/tree/master
Unpack, enter the unpacked directory and run these commands and you should get
the
correct output:
$ mvn install
$ java -jar myapp/target/myapp-1.0-SNAPSHOT.one-jar.jar
Hello World from App!
Hello World from Lib A!
Hello World from Lib B!
Hello World from Lib C!
I use Maven 2.0.10.
Elisha, please verify if it works for you with a recent version of Maven.
Switching issue status to Incomplete, while waiting for your response. Thank
you.
/Hugo
Original comment by [email protected]
on 12 Jun 2009 at 7:33
- Changed state: Incomplete
from onejar-maven-plugin.
Hi, Hugo.
Thanks for the working example.
The strange thing is that it only works from command line. (as my project did)
When I package from within Eclipse with the Maven m2 Eclipse plugin there is no
lib
folder included in myapp-1.0-SNAPSHOT.one-jar.jar, resulting in a
NoClassDefFoundError.
Thanks,
Tom.
Original comment by [email protected]
on 13 Jun 2009 at 11:00
from onejar-maven-plugin.
Thank you Elisha for verifying that.
Yes, many people have problems with Eclipe's instability. That's why I always
recommend clients to rely on a stable build tool (like Maven) for building and
releasing, and only use an IDE as far as it makes certain things easier (like
CTRL-space completion and stuff). I even use a different IDE
altogether...combined
with Maven of course!
/Hugo
----
Closing this now as WontFix, because it works with Maven as it should.
Original comment by [email protected]
on 13 Jun 2009 at 11:16
- Changed state: WontFix
from onejar-maven-plugin.
Sorry Tom and Elisha! Mixed up your names there a little.. :)
Original comment by [email protected]
on 13 Jun 2009 at 11:17
from onejar-maven-plugin.
Related Issues (20)
- Artifacts should be copied by user selection (runtime, compile, etc) HOT 4
- Make OneJarMojo.mainJarFilename writeable HOT 2
- using different native libs for different os not working HOT 8
- Local dependency projects are not included in the onejar HOT 2
- upload to central repository HOT 2
- java.io.FileNotFoundException: log4j.xml HOT 6
- Provide override for generated jar file name HOT 1
- Support newer versions of OneJar HOT 3
- Axis2 jar doesnot load
- Use newer version of One-JAR 0.97 HOT 1
- Cant specify JarClassLoader for One-jar, need to because of spring url loading HOT 5
- Add arbitrary manifest entries to top-level
- generic classpath arguments cannot be passed to execution
- Patch for /trunk/src/site/apt/usage.apt
- Can this be used under Java 1.5?
- Enhanchment - support adding one-jar.properties to the target one-jar
- How to Get List of ClassPath Resources in OneJar? HOT 2
- Support system properties included as /one-jar.properties
- NullPointerException thrown trying to access MANIFEST.MF of embedded jars
- How to add class path folder in Manifest
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from onejar-maven-plugin.