Maven: impostazioni per creazione di un runnable jar

Il pezzo di pom che segue dice modifica le impostazioni di default della fase di compile e di assembly di maven, per:

  • Rendere il jar eseguibile
  • Impacchettare insieme al jar anche tutte le librerie che servono

Questo è il tag BUILD del pom:

 
			maven-compiler-plugin
 
				2.5.1
				true
				<source />1.5
				1.5
 
			maven-jar-plugin
 
						true
						true
 
			maven-assembly-plugin
			2.4
 
					jar-with-dependencies
 
				${artifactId}-${version}-full
				false
 
					it.nicola.esempi.maven.MainClas
						true
						true

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>