Uploaded image for project: 'Maven Project Web Site'
  1. Maven Project Web Site
  2. MNGSITE-226

Maven standard directory layout documentation about /src/main/scripts is misleading or incomplete

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None

    Description

      The Maven Standard Directory layout (https://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html) is misleading with regard to the src/main/scripts directory. It says this is the proper directory for "Application/Library scripts". It is not entirely clear what this means.

      In my case, I build an executable jar-with-dependencies using the assembly plugin. I also want to include a shell script that launches this jar. If I place this script in src/main/scripts, it goes into the root level of the jar, where it is useless. Instead, I want to run a second maven assembly after the jar is created, that will bundle this executable jar and the scripts into a tar.gz file. To do this, it is better to put this script into src/scripts, analogously with src/assembly. It seems that maven copies EVERYTHING under /src/main (except src/main/java, of course) into the jar, and this is not appropriate except in the case of scripts that might be launched by the java code in the jar. For other scripts, such as my jar launcher, using src/scripts or src/bin or something is better because it does not make useless copies of the script in the jar.

      Attachments

        Activity

          People

            michael-o Michael Osipov
            scohen@javactivity.org Steve Cohen
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: