You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by jo...@apache.org on 2002/03/29 21:25:29 UTC

cvs commit: jakarta-velocity-dvsl default.properties build.xml

jon         02/03/29 12:25:29

  Modified:    .        build.xml
  Added:       .        default.properties
  Log:
  cleaned up the build system.
  
  -jon
  
  Revision  Changes    Path
  1.18      +9 -75     jakarta-velocity-dvsl/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-velocity-dvsl/build.xml,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- build.xml	17 Mar 2002 21:09:11 -0000	1.17
  +++ build.xml	29 Mar 2002 20:25:29 -0000	1.18
  @@ -3,68 +3,13 @@
   
   <!-- ========== Initialize Properties ===================================== -->
   
  -  <property file="build/build.properties"/>          <!-- Component local   -->
  -  <property file="../build.properties"/>             <!-- Commons local     -->
  -  <property file="${user.home}/build.properties"/>  <!-- User local        -->
  -
  -<!-- ========== External Dependencies ===================================== -->
  -
  - <!-- the local repository -->
  - <property name="local.repository"            value="./lib" />
  -
  -<!-- ========== Component Declarations ==================================== -->
  -
  -  <!-- The name of this component -->
  -  <property name="project.name"          value="velocity-dvsl" />
  -
  -  <!-- The title of this component -->
  -  <property name="project.title"         value="DVSL"/>
  -
  -  <!-- The current version number of this component -->
  -  <property name="project.version"       value="0.43"/>
  -
  -  <!-- The base directory for compilation targets -->
  -  <property name="build.home"              value="target"/>
  -
  -  <!-- The base directory for distribution targets -->
  -  <property name="dist.home"               value="dist"/>
  -
  -  <!-- The base directory for component sources -->
  -  <property name="source.home"             value="src"/>
  -
  -  <!-- The base directory for component sources -->
  -  <property name="conf.home"             value="src/conf"/>
  -
  -  <!-- The docs source directory -->
  -  <property name="docs.src"             value="xdocs"/>
  -
  -  <!-- The docs destination directory  -->
  -  <property name="docs.dest"             value="docs"/>
  -
  -  <!-- The printdocs destination directory  -->
  -  <property name="docs-printable.dest"             value="docs_print"/>
  -
  -  <!-- Name of generated dvsl.jar file -->
  -  <property name="dvsl.jar"
  -            value="${project.name}-${project.version}.jar" />
  -
  -  <!-- Location of ant.jar -->
  -  <property name="ant.jar" value="${ant.home}/lib/ant.jar" />
  +  <property file="${user.home}/${project.name}.build.properties" /> 
  +  <property file="${user.home}/build.properties" />
  +  <property file="${basedir}/build.properties" />
  +  <property file="${basedir}/default.properties" />
   
   <!-- ========== Compiler Defaults ========================================= -->
   
  -
  -  <!-- Should Java compilations set the 'debug' compiler option? -->
  -  <property name="compile.debug"           value="true"/>
  -
  -  <!-- Should Java compilations set the 'deprecation' compiler option? -->
  -  <property name="compile.deprecation"     value="true"/>
  -
  -  <!-- Should Java compilations set the 'optimize' compiler option? -->
  -  <property name="compile.optimize"        value="true"/>
  -
  -
  -
     <!-- Construct compile classpath -->
     <path id="classpath">
       <fileset dir="${local.repository}">
  @@ -73,11 +18,6 @@
       <pathelement location="${ant.jar}"/>
     </path>
   
  -
  -
  -<!-- ========== Test Execution Defaults =================================== -->
  -
  -
     <!-- Construct unit test classpath -->
     <path id="test.classpath">
       <pathelement location="${build.home}/classes"/>
  @@ -85,20 +25,13 @@
       <path refid="classpath" />
     </path>
   
  -  <!-- Should all tests fail if one does? -->
  -  <property name="test.failonerror"        value="true"/>
  -
  -  <!-- The test runner to execute -->
  -  <property name="test.runner"             value="junit.textui.TestRunner"/>
  -
  -
   <!-- ========== Executable Targets ======================================== -->
   
     <!-- ================================================================== -->
     <!-- I N I T                                                            -->
     <!-- ================================================================== -->
     <target name="init">
  -    <echo message="-------- ${project.name} ${project.version} --------"/>
  +    <echo message="-------- ${final.name} --------"/>
       <filter  token="name"                  value="${project.name}"/>
       <filter  token="version"               value="${project.version}"/>
     </target>
  @@ -124,7 +57,6 @@
       </copy>
     </target>
   
  -
     <!-- ================================================================== -->
     <!--  C O M P I L E                                                     -->
     <!-- ================================================================== -->
  @@ -149,7 +81,6 @@
   
     </target>
   
  -
     <!-- ================================================================== -->
     <!--  C O M P I L E - T E S T                                           -->
     <!-- ================================================================== -->
  @@ -176,7 +107,10 @@
     <target name="clean"
      description="Clean build and distribution directories">
       <delete    dir="${build.home}"/>
  -    <delete    file="${dvsl.jar}"/>
  +    <delete>
  +      <fileset dir="${basedir}" includes="**/${project.name}*.jar"/>
  +    </delete>
  +    <delete    file="velocity.log"/>
       <delete    dir="${dist.home}"/>
       <delete    dir="${docs-printable.dest}"/>
     </target>
  
  
  
  1.1                  jakarta-velocity-dvsl/default.properties
  
  Index: default.properties
  ===================================================================
  # the local repository
  local.repository = ./lib
  
  # The name of this project
  project.name = velocity-dvsl
  
  # The title of this project
  project.title = DVSL
  
  # version number
  project.version = 0.43
  
  # The name that is used to create the jar file
  final.name = ${project.name}-${project.version}
  
  # Name of generated dvsl.jar file
  dvsl.jar = ${final.name}.jar
  
  # The base directory for compilation targets
  build.home = target
  
  # The base directory for distribution targets
  dist.home = dist
  
  # The base directory for component sources
  source.home = src
  
  # The base directory for config files
  conf.home = src/conf
  
  # The docs source directory
  docs.src = xdocs
  
  # The docs destination directory
  docs.dest = docs
  
  # The printdocs destination directory
  docs-printable.dest = docs_print
  
  # Location of ant.jar
  ant.jar = ${ant.home}/lib/ant.jar
  
  # Should Java compilations set the 'debug' compiler option?
  compile.debug = true
  
  # Should Java compilations set the 'deprecation' compiler option?
  compile.deprecation = true
  
  # Should Java compilations set the 'optimize' compiler option?
  compile.optimize = true
  
  # Should all tests fail if one does?
  test.failonerror = true
  
  # The test runner to execute
  test.runner = junit.textui.TestRunner
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: cvs commit: jakarta-velocity-dvsl default.properties build.xml

Posted by Jon Scott Stevens <jo...@latchkey.com>.
on 3/31/02 12:28 PM, "Geir Magnusson Jr." <ge...@optonline.net> wrote:

> This is really irrelevant, because you have a set of defaults for configure,
> and then you generate make files - if we had a system to generate platform
> specific build.xml files, then I agree with you.

    <http://jakarta.apache.org/turbine/maven/>

> But in this case, we have one build.xml, and that is our makefile, so to
> speak.  There are properties that can be *overridden* via a
> build.properties.  But having the defaults external as well is a bit
> superfluous.  It sort of like having the velocity configuration defaults
> outside of the vel jar and us forcing people to put that file in the
> classpath too...

It isn't superfluous. You forgot my main point which is that I don't expect
*USERS* to look at a build.xml and know how to read it.

> How about an ant target that dumps out the default properties file?  Then
> both problems are solved...  One file for maintainability, and then for
> people who want to override the defaults, it spits out a default.props for
> them to start with.

Hmmm...that might work...I could go for that...it solves the problem of not
making users look inside of a build.xml file.

-jon


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: cvs commit: jakarta-velocity-dvsl default.properties build.xml

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On 3/31/02 3:14 PM, "Jon Scott Stevens" <jo...@latchkey.com> wrote:

> on 3/31/02 11:52 AM, "Geir Magnusson Jr." <ge...@optonline.net> wrote:
> 
>> On some platforms.  There is no requirement to use configure.
> 
> There is if you want to write easily portable C code. You need to use
> automake/autoconf/aclocal...
> 
> FYI, I wrote a large majority of JServ's build system...

This is really irrelevant, because you have a set of defaults for configure,
and then you generate make files - if we had a system to generate platform
specific build.xml files, then I agree with you.

But in this case, we have one build.xml, and that is our makefile, so to
speak.  There are properties that can be *overridden* via a
build.properties.  But having the defaults external as well is a bit
superfluous.  It sort of like having the velocity configuration defaults
outside of the vel jar and us forcing people to put that file in the
classpath too...


> 
>> And there is
>> nothing that generates the defaults.properties.
> 
> No need. It is a static file of defaults. :-)

For which there is no need either.
 
>> If there was, it could just as well generate the build.properties for the
>> user.  I think having the ability to be externally generated with something
>> like configure would be great - however, it doesn't mean build.xml can't
>> have it's own defaults for us primitives that like stuff in one place...
> 
> If you have it in build.xml and default.properties, then it has to be
> maintained in two places.
> 

How about an ant target that dumps out the default properties file?  Then
both problems are solved...  One file for maintainability, and then for
people who want to override the defaults, it spits out a default.props for
them to start with.

If you are not overriding anything, there is no need to have this stuff
external to build.xml

-- 
Geir Magnusson Jr.                                     geirm@optonline.net
System and Software Consulting
Java : the speed of Smalltalk with the simple elegance of C++... 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: cvs commit: jakarta-velocity-dvsl default.properties build.xml

Posted by Jon Scott Stevens <jo...@latchkey.com>.
on 3/31/02 11:52 AM, "Geir Magnusson Jr." <ge...@optonline.net> wrote:

> On some platforms.  There is no requirement to use configure.

There is if you want to write easily portable C code. You need to use
automake/autoconf/aclocal...

FYI, I wrote a large majority of JServ's build system...

> And there is
> nothing that generates the defaults.properties.

No need. It is a static file of defaults. :-)
 
> If there was, it could just as well generate the build.properties for the
> user.  I think having the ability to be externally generated with something
> like configure would be great - however, it doesn't mean build.xml can't
> have it's own defaults for us primitives that like stuff in one place...

If you have it in build.xml and default.properties, then it has to be
maintained in two places.

-jon


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: cvs commit: jakarta-velocity-dvsl default.properties build.xml

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On 3/31/02 2:44 PM, "Jon Scott Stevens" <jo...@latchkey.com> wrote:

> on 3/31/02 11:07 AM, "Geir Magnusson Jr." <ge...@optonline.net> wrote:
> 
>> I equate build.xml to be a smart make file, which is complete.
> 
> What generates a Makefile's defaults? A ./configure script.

On some platforms.  There is no requirement to use configure.  And there is
nothing that generates the defaults.properties.

If there was, it could just as well generate the build.properties for the
user.  I think having the ability to be externally generated with something
like configure would be great - however, it doesn't mean build.xml can't
have it's own defaults for us primitives that like stuff in one place...

> 
> -jon
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 

-- 
Geir Magnusson Jr.                                     geirm@optonline.net
System and Software Consulting
The obvious solutions are challenging


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: cvs commit: jakarta-velocity-dvsl default.properties build.xml

Posted by Jon Scott Stevens <jo...@latchkey.com>.
on 3/31/02 11:07 AM, "Geir Magnusson Jr." <ge...@optonline.net> wrote:

> I equate build.xml to be a smart make file, which is complete.

What generates a Makefile's defaults? A ./configure script.

-jon


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: cvs commit: jakarta-velocity-dvsl default.properties build.xml

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On 3/31/02 1:56 PM, "Jon Scott Stevens" <jo...@latchkey.com> wrote:

> on 3/31/02 10:27 AM, "Geir Magnusson Jr." <ge...@optonline.net> wrote:
> 
>> Why didn't you leave the defaults in place in there?  Makes it much easier
>> to read...
> 
> I have been through this a bazillion times now on other lists...
> 
> Essentially, I equate a build.xml to a ./configure. You wouldn't expect
> someone to cat/more/edit/pico/emacs a ./configure script in order to figure
> out the defaults, now would you? Why would you expect anyone to look inside
> a build.xml? With a ./configure, people will ./configure --help to figure
> out the defaults.
> 
> If you want to print the defaults, then we should have a <target> that
> prints out the defaults in a nice format from the default.properties. Just
> like ./configure --help.

I equate build.xml to be a smart make file, which is complete.  Now, it's
not complete because the damn defaults are in another file.  It think that
it's good to have the default.properties to its easy for a user to copy that
to their own build.properties, but the build.xml should be complete.

The point is that when reading or modifying, you have no clue what the
defaults are because they are in a different file.  I can't search for
anything - I need to have the other file also in the editor and switch back
and forth.  Not a major problem, of course, but I can't see the downside to
having the build.xml self contained and complete, extensible via the
build.properties file specified by the user if desired.

> 
> Also, to you they are easier to read in the build.xml...to me, they aren't.
> To me, it is easier to read in the default.properties...to someone else, it
> may be another way...

Are you kidding?

-- 
Geir Magnusson Jr.                                     geirm@optonline.net
System and Software Consulting
My inner cowboy needs to yodel.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: cvs commit: jakarta-velocity-dvsl default.properties build.xml

Posted by Jon Scott Stevens <jo...@latchkey.com>.
on 3/31/02 10:27 AM, "Geir Magnusson Jr." <ge...@optonline.net> wrote:

> Why didn't you leave the defaults in place in there?  Makes it much easier
> to read...

I have been through this a bazillion times now on other lists...

Essentially, I equate a build.xml to a ./configure. You wouldn't expect
someone to cat/more/edit/pico/emacs a ./configure script in order to figure
out the defaults, now would you? Why would you expect anyone to look inside
a build.xml? With a ./configure, people will ./configure --help to figure
out the defaults.

If you want to print the defaults, then we should have a <target> that
prints out the defaults in a nice format from the default.properties. Just
like ./configure --help.

Also, to you they are easier to read in the build.xml...to me, they aren't.
To me, it is easier to read in the default.properties...to someone else, it
may be another way...

-jon


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: cvs commit: jakarta-velocity-dvsl default.properties build.xml

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On 3/29/02 3:25 PM, "jon@apache.org" <jo...@apache.org> wrote:

> jon         02/03/29 12:25:29
> 
> Modified:    .        build.xml
> Added:       .        default.properties
> Log:
> cleaned up the build system.

"cleaned up" is a rather large stretch of the english language.

Why didn't you leave the defaults in place in there?  Makes it much easier
to read...

> 
> -jon
> 
> Revision  Changes    Path
> 1.18      +9 -75     jakarta-velocity-dvsl/build.xml
> 
> Index: build.xml
> ===================================================================
> RCS file: /home/cvs/jakarta-velocity-dvsl/build.xml,v
> retrieving revision 1.17
> retrieving revision 1.18
> diff -u -r1.17 -r1.18
> --- build.xml    17 Mar 2002 21:09:11 -0000    1.17
> +++ build.xml    29 Mar 2002 20:25:29 -0000    1.18
> @@ -3,68 +3,13 @@
>  
>  <!-- ========== Initialize Properties =====================================
> -->
>  
> -  <property file="build/build.properties"/>          <!-- Component local
> -->
> -  <property file="../build.properties"/>             <!-- Commons local
> -->
> -  <property file="${user.home}/build.properties"/>  <!-- User local
> -->
> -
> -<!-- ========== External Dependencies =====================================
> -->
> -
> - <!-- the local repository -->
> - <property name="local.repository"            value="./lib" />
> -
> -<!-- ========== Component Declarations ====================================
> -->
> -
> -  <!-- The name of this component -->
> -  <property name="project.name"          value="velocity-dvsl" />
> -
> -  <!-- The title of this component -->
> -  <property name="project.title"         value="DVSL"/>
> -
> -  <!-- The current version number of this component -->
> -  <property name="project.version"       value="0.43"/>
> -
> -  <!-- The base directory for compilation targets -->
> -  <property name="build.home"              value="target"/>
> -
> -  <!-- The base directory for distribution targets -->
> -  <property name="dist.home"               value="dist"/>
> -
> -  <!-- The base directory for component sources -->
> -  <property name="source.home"             value="src"/>
> -
> -  <!-- The base directory for component sources -->
> -  <property name="conf.home"             value="src/conf"/>
> -
> -  <!-- The docs source directory -->
> -  <property name="docs.src"             value="xdocs"/>
> -
> -  <!-- The docs destination directory  -->
> -  <property name="docs.dest"             value="docs"/>
> -
> -  <!-- The printdocs destination directory  -->
> -  <property name="docs-printable.dest"             value="docs_print"/>
> -
> -  <!-- Name of generated dvsl.jar file -->
> -  <property name="dvsl.jar"
> -            value="${project.name}-${project.version}.jar" />
> -
> -  <!-- Location of ant.jar -->
> -  <property name="ant.jar" value="${ant.home}/lib/ant.jar" />
> +  <property file="${user.home}/${project.name}.build.properties" />
> +  <property file="${user.home}/build.properties" />
> +  <property file="${basedir}/build.properties" />
> +  <property file="${basedir}/default.properties" />
>  
>  <!-- ========== Compiler Defaults =========================================
> -->
>  
> -
> -  <!-- Should Java compilations set the 'debug' compiler option? -->
> -  <property name="compile.debug"           value="true"/>
> -
> -  <!-- Should Java compilations set the 'deprecation' compiler option? -->
> -  <property name="compile.deprecation"     value="true"/>
> -
> -  <!-- Should Java compilations set the 'optimize' compiler option? -->
> -  <property name="compile.optimize"        value="true"/>
> -
> -
> -
>    <!-- Construct compile classpath -->
>    <path id="classpath">
>      <fileset dir="${local.repository}">
> @@ -73,11 +18,6 @@
>      <pathelement location="${ant.jar}"/>
>    </path>
>  
> -
> -
> -<!-- ========== Test Execution Defaults ===================================
> -->
> -
> -
>    <!-- Construct unit test classpath -->
>    <path id="test.classpath">
>      <pathelement location="${build.home}/classes"/>
> @@ -85,20 +25,13 @@
>      <path refid="classpath" />
>    </path>
>  
> -  <!-- Should all tests fail if one does? -->
> -  <property name="test.failonerror"        value="true"/>
> -
> -  <!-- The test runner to execute -->
> -  <property name="test.runner"             value="junit.textui.TestRunner"/>
> -
> -
>  <!-- ========== Executable Targets ========================================
> -->
>  
>    <!-- ================================================================== -->
>    <!-- I N I T                                                            -->
>    <!-- ================================================================== -->
>    <target name="init">
> -    <echo message="-------- ${project.name} ${project.version} --------"/>
> +    <echo message="-------- ${final.name} --------"/>
>      <filter  token="name"                  value="${project.name}"/>
>      <filter  token="version"               value="${project.version}"/>
>    </target>
> @@ -124,7 +57,6 @@
>      </copy>
>    </target>
>  
> -
>    <!-- ================================================================== -->
>    <!--  C O M P I L E                                                     -->
>    <!-- ================================================================== -->
> @@ -149,7 +81,6 @@
>  
>    </target>
>  
> -
>    <!-- ================================================================== -->
>    <!--  C O M P I L E - T E S T                                           -->
>    <!-- ================================================================== -->
> @@ -176,7 +107,10 @@
>    <target name="clean"
>     description="Clean build and distribution directories">
>      <delete    dir="${build.home}"/>
> -    <delete    file="${dvsl.jar}"/>
> +    <delete>
> +      <fileset dir="${basedir}" includes="**/${project.name}*.jar"/>
> +    </delete>
> +    <delete    file="velocity.log"/>
>      <delete    dir="${dist.home}"/>
>      <delete    dir="${docs-printable.dest}"/>
>    </target>
> 
> 
> 
> 1.1                  jakarta-velocity-dvsl/default.properties
> 
> Index: default.properties
> ===================================================================
> # the local repository
> local.repository = ./lib
> 
> # The name of this project
> project.name = velocity-dvsl
> 
> # The title of this project
> project.title = DVSL
> 
> # version number
> project.version = 0.43
> 
> # The name that is used to create the jar file
> final.name = ${project.name}-${project.version}
> 
> # Name of generated dvsl.jar file
> dvsl.jar = ${final.name}.jar
> 
> # The base directory for compilation targets
> build.home = target
> 
> # The base directory for distribution targets
> dist.home = dist
> 
> # The base directory for component sources
> source.home = src
> 
> # The base directory for config files
> conf.home = src/conf
> 
> # The docs source directory
> docs.src = xdocs
> 
> # The docs destination directory
> docs.dest = docs
> 
> # The printdocs destination directory
> docs-printable.dest = docs_print
> 
> # Location of ant.jar
> ant.jar = ${ant.home}/lib/ant.jar
> 
> # Should Java compilations set the 'debug' compiler option?
> compile.debug = true
> 
> # Should Java compilations set the 'deprecation' compiler option?
> compile.deprecation = true
> 
> # Should Java compilations set the 'optimize' compiler option?
> compile.optimize = true
> 
> # Should all tests fail if one does?
> test.failonerror = true
> 
> # The test runner to execute
> test.runner = junit.textui.TestRunner
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 

-- 
Geir Magnusson Jr.                                     geirm@optonline.net
System and Software Consulting
"Now what do we do?"


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>