• 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
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

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

 
Greenhorn
Posts: 27
  • 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: 10300
217
  • 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
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you want entire pom.xml or log ?
 
raghu kalachar
Greenhorn
Posts: 27
  • 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: 10300
217
  • 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
Greenhorn
Posts: 27
  • 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: 10300
217
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!