• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
Bartenders:
  • salvin francis
  • Carey Brown
  • Frits Walraven

mvn clean compile assembly:single works but mvn install/package fails to create jar with dependencie

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to maven. I am having below pom.xml which creates jar with dependencies perfectly if I use the below cmd:




But if I use below cmd jar gets created without dependencies.Anything wrong with my pom.xml






 
Saloon Keeper
Posts: 11866
253
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Other than that it's poorly indented, I can't see anything wrong.

What does the build log say when you run mvn package? Can you post the entire thing here?
 
raghu kalachar
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you want entire pom.xml or log ?
 
raghu kalachar
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when I run mvn package it builds jar without dependencies. I want jar to be created with dependecies.
 
Stephan van Hulst
Saloon Keeper
Posts: 11866
253
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Again, post the build log that Maven spits out when you run it.
 
raghu kalachar
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is log on mvn package:



Here is another log on mvn clean compile assembly:single


 
Stephan van Hulst
Saloon Keeper
Posts: 11866
253
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think I see. You declared the plugin inside <pluginManagement>. That element is used to configure plugins, not to register them for a build. If you lift the <plugins> element up and out of <pluginManagement>, I think it should work.
 
When people don’t understand what you are doing they call you crazy. But this tiny ad just doesn't care:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
    Bookmark Topic Watch Topic
  • New Topic