Maven 1.x UberJar Plugin
  1. Maven 1.x UberJar Plugin
  2. MPUBERJAR-6

Don't include dependencies marked with a given property

    Details

    • Type: Wish Wish
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Labels:
      None
    • Number of attachments :
      0

      Description

      My project uses libaries for testing (jUnit, MockObjects) that aren't needed when deployed. It would be nice if the uberjar goal could not include dependencies that were marked with a property (like testTime).

        Activity

        Hide
        Ronald Holshausen added a comment -

        You can use uberjar.bundle=false to exclude a dependancy.
        Eg: <properties><uberjar.bundle>false</uberjar.bundle></properties>

        Show
        Ronald Holshausen added a comment - You can use uberjar.bundle=false to exclude a dependancy. Eg: <properties><uberjar.bundle>false</uberjar.bundle></properties>
        Hide
        Ronald Holshausen added a comment -

        The classworlds.conf velocity template from version 1.2 of the plugin
        does not exclude marked dependancies.

        Changing it to:
        main is $ubermain from app

        [app]
        #foreach ( $dep in $pom.dependencies )#if (!$dep.getProperty('uberjar.bundle') || $dep.getProperty('uberjar.bundle') == 'true')
        load $

        {classworlds.lib}/$dep.artifact
        #end#end
        load ${classworlds.lib}

        /$

        {self}

        .jar

        solves this

        Show
        Ronald Holshausen added a comment - The classworlds.conf velocity template from version 1.2 of the plugin does not exclude marked dependancies. Changing it to: main is $ubermain from app [app] #foreach ( $dep in $pom.dependencies )#if (!$dep.getProperty('uberjar.bundle') || $dep.getProperty('uberjar.bundle') == 'true') load $ {classworlds.lib}/$dep.artifact #end#end load ${classworlds.lib} /$ {self} .jar solves this

          People

          • Assignee:
            Brett Porter
            Reporter:
            Jon Strayer
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: