Menu

New feature: Option to build jar files

2002-08-13
2002-09-20
  • Andrew Marrington

    Some have suggested that JMake be capable of building a jar file. I'd imagine that this would consist of the current directory and all subdirectories... provided you've got a clean source directory, that's fine I guess. An argument like -jar would have JMake build a .jar file.

    Thoughts?

     
    • Jason Weathered

      Jason Weathered - 2002-08-19

      It would be nice to have input from people on what exactly they want from a jar feature.

      I myself am thinking something "-jar" and a 2nd parameter that specifies the startup class file (we could also add automatic detection of startup class (looking for a Startup.class for example).

      There should proberly also be a feature to not include every file, maybe a only .java mode and an everything but .java mode?

       
      • Andrew Marrington

        We need to get an idea of what people actually want.

         
        • Jason Weathered

          Jason Weathered - 2002-09-20

          How about:

          jmake jar [jarname.jar [Startup]] [filespec-to-include]

          creates a jar file with automaticly gnerated manifest. jar filename will be guessed if possible (maybe the name of the package containing the startup class)

          The startup class will also tried to be auto detected. first, look for any classes called Startup and use the one highest in the package closed to the root. Secondly look for a package containing a single class file, starting at the default package (main dir).

          It is okay if the parameter auto-detection isn't very intelligent but if it can't find a good likely match, it should fail and output the choices to stderr instead of just choosing one arbitarially.

          Zero or more files may be specified at the end of the commmand line (and can contain relative paths and/or wildcards). Only files matching these filespecs must be included in the resulting jar file. No check is required to confirm if the startup class file is included or not, a warning can be issued but an automatic override should not happen. If no filespecs are included, all files in the current directory (recusively) should be included in the jar file.

           

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.