executable uberjar

View: New views
2 Messages — Rating Filter:   Alert me  

executable uberjar

by maven_newbie99 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Folks,

I have figured out how to create a single .JAR file that contains all my dependencies. Using minijar:ueberjar I can extract all needed classes from the .JAR dependencies and include only those classes that are really referenced by my project. So far so good.

With the old method of creating executable .JAR files (maven-jar-plugin), it automatically added a MANIFEST.MF file in order to make the .JAR file executable. I had to add the following configuration:

<!-- Make executable JAR -->
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-jar-plugin</artifactId>
  <configuration>
    <archive>
      <manifest>
        <addClasspath>true</addClasspath>
        <mainClass>my.main.Class</mainClass>
        </manifest>
    </archive>
  </configuration>
</plugin>


But now that I create the .JAR file using minijar, I don't know how to automatically generate and include the MANIFEST.MF file.

Any help is greatly appreciated.

Thanks,
Frank

Re: executable uberjar

by Jesse Farinacci :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Frank,

On Wed, Nov 4, 2009 at 10:53 AM, maven_newbie99 <frank@...> wrote:
>
> But now that I create the .JAR file using minijar, I don't know how to
> automatically generate and include the MANIFEST.MF file.
>

This sounds like a great requirement for minijar plugin. You should
file a new JIRA, and include some testcases for it. A patch would
probably even make it more welcome.

-Jesse

--
There are 10 types of people in this world, those
that can read binary and those that can not.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...