[prev in list] [next in list] [prev in thread] [next in thread] 

List:       groovy-user
Subject:    Re: [groovy-user] Preferred Base Directory Name for Groovy Files Organized as Packages
From:       Tim Yates <tim.yates () gmail ! com>
Date:       2012-10-25 10:46:34
Message-ID: CAFC8+Yh_oQ-0qaB4K2BdykPkE0r1YwaqHM4r=4vKcXjwyGntQQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


I go with the Gradle/Maven default these days, as it means I can use Gradle
without having to remember how to change the default ;-)

On 25 October 2012 11:38, Steve Amerige <Steve.Amerige@sas.com> wrote:

>  Hi all,
>
> I'm trying to decide if there is a "best practice" for naming the base
> directory name where Groovy files go when they're organized as packages.
> I'm trying to decide between:
>
>     <leading-path>/*classes*
>     <leading-path>/*packages*
>     <leading-path>/*source*
>
> or something else.  The full directory that ends in such a name would then
> be added to the classpath when running Groovy class code.  The "classes"
> entry sounds like the content under it is binary.  Well, it is all
> executable and it can work seamlessly with compiled .java files.  The
> "source" entry sounds like you'd have to copy the files from here to
> another place before executing.  And, someone just suggested "packages"
> without saying why.
>
> Under the above directory, you'd then have .groovy files organized such as
> in:
>
>     com/company/unit/.../ClassName.groovy
>
> Is there a base directory name that more people prefer than others?  Use *
> classes*, *packages*, *source*, or something else?
>
> Guillaume suggested:
>
> You should just use more or less the same conventions as you use for your
> Java sources.
> Except that perhaps you might want to have separate directories for
> different languages.
> For example, if you use Maven or Gradle conventions, they may suggest:
>
>  src/main/java/*
> src/main/groovy/*
> src/test/java/*
> src/test/groovy/*
>
> Any other thoughts as to what might be the most common or "best" practice?
>
> Best wishes to all,
> Steve Amerige
> SAS Institute, Senior Software Developer
>
>
>
>

[Attachment #5 (text/html)]

I go with the Gradle/Maven default these days, as it means I can use Gradle without \
having to remember how to change the default ;-)<br><br><div class="gmail_quote">On \
25 October 2012 11:38, Steve Amerige <span dir="ltr">&lt;<a \
href="mailto:Steve.Amerige@sas.com" \
target="_blank">Steve.Amerige@sas.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">  

    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Hi all,<br>
    <br>
    I&#39;m trying to decide if there is a &quot;best practice&quot; for naming the
    base directory name where Groovy files go when they&#39;re organized as
    packages.  I&#39;m trying to decide between:<br>
    <br>
        &lt;leading-path&gt;/<b>classes</b><br>
        &lt;leading-path&gt;/<b>packages</b><br>
        &lt;leading-path&gt;/<b>source</b><br>
    <br>
    or something else.  The full directory that ends in such a name
    would then be added to the classpath when running Groovy class
    code.  The &quot;classes&quot; entry sounds like the content under it is
    binary.  Well, it is all executable and it can work seamlessly with
    compiled .java files.  The &quot;source&quot; entry sounds like you&#39;d have to
    copy the files from here to another place before executing.  And,
    someone just suggested &quot;packages&quot; without saying why.<br>
    <br>
    Under the above directory, you&#39;d then have .groovy files organized
    such as in:<br>
    <br>
        com/company/unit/.../ClassName.groovy<br>
    <br>
    Is there a base directory name that more people prefer than others? 
    Use <b>classes</b>, <b>packages</b>, <b>source</b>, or something
    else?<br>
    <br>
    Guillaume suggested:<br>
    <br>
    <div>You should just use more or less the same conventions as you
      use for your Java sources.</div>
    <div>Except that perhaps you might want to have separate directories
      for different languages.</div>
    <div>For example, if you use Maven or Gradle conventions, they may
      suggest:</div>
    <div><br>
    </div>
    <div>src/main/java/*</div>
    <div>src/main/groovy/*</div>
    <div>src/test/java/*</div>
    <div>src/test/groovy/*<br>
      <br>
      Any other thoughts as to what might be the most common or &quot;best&quot;
      practice?<br>
      <br>
      Best wishes to all,<br>
      Steve Amerige<br>
      SAS Institute, Senior Software Developer<br>
      <br>
      <img alt="" src="cid:part1.00040902.00070909@sas.com" height="43" \
width="181"><br>  </div>
    <br>
  </div>

</blockquote></div><br>

--14dae9cdbf4bf1168e04ccdfeb14--


["SAS_TPTK_logo.gif" (image/gif)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic