Class ExecutableJarExporter

  • All Implemented Interfaces:
    Exporter

    public class ExecutableJarExporter
    extends java.lang.Object
    implements Exporter
    Exports a project or run file to an executable JAR.

    This exporter supports 2 types for backward compatibility. This exporter used the project launcher's execute function. However, there also was an -export instruction that used the Project.pack(String) method. This method was a bit more powerful. Since both exports were used, the EXECUTABLE_JAR was used from Gradle and bndtools while the EXECUTABLE_PACK was used from bnd build, we needed to handle them slightly differently since it is difficult to ensure backward compatibility.

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map.Entry<java.lang.String,​Resource> export​(java.lang.String type, Project project, java.util.Map<java.lang.String,​java.lang.String> options)  
      java.lang.String[] getTypes()  
      static Jar pack​(Project project, java.lang.String profile)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ExecutableJarExporter

        public ExecutableJarExporter()
    • Method Detail

      • getTypes

        public java.lang.String[] getTypes()
        Specified by:
        getTypes in interface Exporter
      • export

        public java.util.Map.Entry<java.lang.String,​Resource> export​(java.lang.String type,
                                                                           Project project,
                                                                           java.util.Map<java.lang.String,​java.lang.String> options)
                                                                    throws java.lang.Exception
        Specified by:
        export in interface Exporter
        Throws:
        java.lang.Exception
      • pack

        public static Jar pack​(Project project,
                               java.lang.String profile)
                        throws java.lang.Exception
        Throws:
        java.lang.Exception