title: When should scripts be put in /src/main/scripts (maven standard) and when not?
body: <p>The <a href="https://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html" rel="noreferrer">Maven Standard Directory Layout</a> says that scripts should be placed in <code>src/main/scripts</code> in a maven project.  Besides the advantages of "convention over configuration" are there any other advantages of doing it this way?  I have a project that builds an executable jar-with-dependencies using the assembly plugin.  There are also some useful scripts that go along with it.  Are there any tools that take advantage of this layout in building something else, for example, an archive that includes the jar and these scripts in a reasonable location?</p>
  
  <p>[update] 
  In fact, I would go so far as to say that that putting scripts in <code>src/main/scripts</code> is <strong>disadvantageous</strong>, as far as use with the maven-assembly plugin is concerned..  It appears that EVERYTHING under <code>/src/main</code> (except <code>src/main/java</code> of course) is copied into the root directory of the jar-with-dependencies, as with <code>src/main/resources</code>, where this is useful.  But there is no good reason to have scripts in the jar, although it does no particular harm.  If, instead of placing them in <code>src/main/scripts</code>, one places them in <code>src/scripts</code> (analogously to the standard <code>src/assembly</code>, which also isn't included), then they are not copied into the jar and can be copied by a later run of the assembly plugin into a larger archive.</p>
  
  <p><strong>Update:</strong> It appears that we must distinguish between runtime scripts that are launched from within the java code and others which launch the jar or do other things.  For the former, putting them in <code>src/main/scripts</code> may be appropriate.  For the latter, inappropriate.</p>
  
  <p><strong>Update:</strong> I entered a <a href="https://issues.apache.org/jira/browse/MNGSITE-226" rel="noreferrer">bug against the maven documentation</a> about this.</p>
  
  <p><strong>Update:</strong> The <code>src/main/scripts</code> directory <a href="https://github.com/apache/maven-site/commit/4f33c893315f48a9122784d6da2513e5b31c43fa" rel="noreferrer">was removed</a> from the Standard Directory Layout documentation <a href="https://issues.apache.org/jira/browse/MNGSITE-226" rel="noreferrer">due to it being misleading</a>.  (Remnants however still remain in <a href="http://maven.apache.org/guides/introduction/introduction-to-the-pom.html" rel="noreferrer">Introduction to POM</a> as it's tied to the <code>project.build.scriptSourceDirectory</code> property.)</p>