0

I am using maven, testng, selenium and java framework. I have mojo appassembler plugins to create maven build.

I noticed that when I create mvn package - there are few folders getting created under target. for example:

  • archive-tmp
  • end2end-1.0-bin.tar
  • generated-sources
  • maven-status
  • classes
  • end2end-1.0-jar-with-dependencies.jar
  • generated-test-sources
  • surefire-reports
  • end2end-1.0
  • end2end-1.0.jar
  • maven-archiver
  • test-classes

Here, after I untar end2end-1.0.bin.tar, I am able to run the build however it also depends on other folders, classes outside tar build. (inside target folder)

What I want to do is : to create only 1 tar file for entire build. So that other user can copy tar, untar and directly run it.

I know there are some configuration need to set in POM.xml for build. Does anyone have any specific ideas?

Thanks,

Alexandre Santos
  • 8,170
  • 10
  • 42
  • 64
user3263913
  • 13
  • 2
  • 5
  • possible duplicate of [How to make an executable jar file?](http://stackoverflow.com/questions/5258159/how-to-make-an-executable-jar-file) – Alexandre Santos Jun 24 '14 at 19:12
  • Thanks. However this is not duplicate of executable jar file. This is regarding maven build. – user3263913 Jun 24 '14 at 19:54
  • Look into the answers and you'll see that what you are trying to do is the same. Packaging extra stuff into the jar, regardless if you call it an "executable" or not. – Alexandre Santos Jun 24 '14 at 20:16
  • Hi Alexandre, I am not looking for packaging extra stuff in a jar. Nor I want to create jar. I am looking for maven appassembler solution. I found something on internet (http://maven.apache.org/plugin-developers/cookbook/generate-assembly.html) however trying to see if its working. – user3263913 Jun 24 '14 at 20:20
  • Yep, that looks like what you need – Alexandre Santos Jun 24 '14 at 20:24
  • Just take a look here: https://github.com/khmarbaise/supose/blob/master/supose-assembly/pom.xml (working thing appassembler-maven-plugin + maven-assembly-plugin). – khmarbaise Jun 24 '14 at 21:29

0 Answers0