Re: newbie - requesting example of working build.xml, build.properties files

2001-06-23 Thread Craig R. McClanahan



On Sat, 23 Jun 2001, Levi Cook wrote:

> As a quick confirmation on my earlier post I rolled my ant installation back
> to the 1.3 distribution. $ANT_HOME/lib now contains the following:
> Readme
> ant.jar
> jaxp.jar
> parser.jar
> 
> I then set my CLASSPATH to:
> 
> ~/tools/lib/crimson.jar:~/tools/lib/jaxp.jar:~/tools/lib/jdbc2_0-stdext.jar:
> ~/tools/lib/servlet.jar:~/tools/lib/xalan.jar
> 
> Invoking ~/tools/struts/ant -buildfile build.xml bombs out on the sealing
> violation :(
> 
> java.lang.SecurityException: sealing violation
> at etc, etc, etc..
> at org.apache.tools.ant.Main.runBuild(Compiled Code)
> at org.apache.tools.ant.Main.main(Main.java:149)
> 
> 
> Removing $ANT_HOME/lib/parser.jar & $ANT_HOME/lib/jaxp.jar and invoking ant
> again works out fine.
> 
> As a side note, I think the classpath is evil, so I usually avoid setting it
> statically-- I believe doing this preserves a little of my sanity :)
> 

I agree with you about classpaths.  I was just lazy and stopped on the
first combination that worked :-)

Could you try one thing for me?  Try sticking the JAXP/1.1 JAR files into
$ANT_HOME/lib and take them off your classpath.  That is *supposed* to
work.  If it works for most people, I'll update the instructions to
suggest that instead.

> -- Levi
> 

Craig


> 
> - Original Message -
> From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, June 22, 2001 5:51 PM
> Subject: RE: newbie - requesting example of working build.xml, build.prope
> rties files
> 
> 
> >
> >
> > On Fri, 22 Jun 2001, Cook, Levi wrote:
> >
> > > I haven't taken time to account for the variation, but walking through
> this
> > > process on a fresh RedHat 7.1 installation required an additional step.
> > >
> > > Basically, to prevent ant from failing on some jar sealing Security
> > > exception that I don't remember the details of, I had to remove
> > > $ANT_HOME/lib/parser.jar & $ANT_HOME/lib/jaxp.jar. (I think ant 1.3
> carries
> > > jaxp 1.0 with it, and the presence of Jaxp 1.1 caused the fit)
> > >
> >
> > Hmm.  You're right about Ant including JAXP 1.0.  The interesting thing is
> > that I've still got them in $ANT_HOME/lib, and I'm running on RedHat 7.1
> > (with JDK 1.3.1).  And I'm not getting sealing violations.
> >
> > > -- Levi
> > >
> >
> > Craig
> >
> >
> 
> 




RE: newbie - requesting example of working build.xml, build.properties files

2001-06-22 Thread Craig R. McClanahan



On Fri, 22 Jun 2001, Cook, Levi wrote:

> I haven't taken time to account for the variation, but walking through this
> process on a fresh RedHat 7.1 installation required an additional step.
> 
> Basically, to prevent ant from failing on some jar sealing Security
> exception that I don't remember the details of, I had to remove
> $ANT_HOME/lib/parser.jar & $ANT_HOME/lib/jaxp.jar. (I think ant 1.3 carries
> jaxp 1.0 with it, and the presence of Jaxp 1.1 caused the fit)
> 

Hmm.  You're right about Ant including JAXP 1.0.  The interesting thing is
that I've still got them in $ANT_HOME/lib, and I'm running on RedHat 7.1
(with JDK 1.3.1).  And I'm not getting sealing violations.

> -- Levi
> 

Craig




RE: newbie - requesting example of working build.xml, build.properties files

2001-06-22 Thread Cook, Levi

I haven't taken time to account for the variation, but walking through this
process on a fresh RedHat 7.1 installation required an additional step.

Basically, to prevent ant from failing on some jar sealing Security
exception that I don't remember the details of, I had to remove
$ANT_HOME/lib/parser.jar & $ANT_HOME/lib/jaxp.jar. (I think ant 1.3 carries
jaxp 1.0 with it, and the presence of Jaxp 1.1 caused the fit)

-- Levi

> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 22, 2001 5:20 PM
> To: [EMAIL PROTECTED]
> Subject: Re: newbie - requesting example of working build.xml,
> build.properties files
> 
> 
> 
> 
> On Fri, 22 Jun 2001, Michael McCafferty wrote:
> 
> > Hi all,
> > 
> > I am trying to build struts from source, and having an unexpectedly
> > difficult time of it. I have downloaded the source code 
> from CVS, and
> > followed the directions listed on
> > http://jakarta.apache.org/struts/installation.html without success.
> > 
> > I have copied the $STRUTS/build.properties.sample to 
> build.properties
> > and edited existing entries accordingly. I have also copied
> > $STRUTS/build-webapp.xml to build.xml and edited existing values
> > accordingly.  For all prerequesite properties listed in 
> build-webapp.xml
> > (lines 29-86) I am specifying a command line option to "ant." 
> > 
> > I'm probably missing something obvious, but I'm coming to 
> the conclusion
> > that the sample configuration files require a LOT of 
> customization in
> > order to build a vanilla version of struts from source. I'd 
> love to see
> > copies of build.xml and build.properties that someone has used to
> > successfully compile the software.
> > 
> 
> You should not have to modify *anything* in build.xml, 
> build-webapp.xml,
> or build-webapps.xml in order to build Struts from source.  All of the
> necessary values are inherited from properties you set inside your
> build.properties file.
> 
> The minimal set of properties you need to set in your
> "build.properties" file are:
> 
>   jdbc20ext.jar - Set this to the full pathname to your
>   "jdbc2_0-stdext.jar" file (download the
>   JDBC 2.0 Optional Package).
> 
>   servlet.jar   - Set this to the full pathname to your
>   "servlet.jar" file (normally the one you
>   got with your servlet container).
> 
> For the rest of my setup, here's what I did:
> 
> * Downloaded Ant 1.3 and installed it (and placed $ANT_HOME/bin
>   on my PATH)
> 
> * From the same place, grab Ant's "optional.jar" file and
>   place it in $ANT_HOME/lib.
> 
> * Download JAXP/1.1 and put all three JAR files on my CLASSPATH.
> 
> * Type "ant" to compile Struts, or "ant dist" to create a mirror
>   of the binary distribution.
> 
> If you are having to change other properties, then we should try to
> simplify the build scripts so that you don't have to.
> 
> > Thanks in advance,
> > 
> > Michael McCafferty
> > [EMAIL PROTECTED]
> > 
> 
> Craig McClanahan
> 
> 



Re: newbie - requesting example of working build.xml, build.properties files

2001-06-22 Thread dhay



I had some trouble, mainly with security exception.  The following worked fine
though:

build.properties:


# -
# build.properties.sample
#
# This is an example "build.properties" file, used to customize building Struts
# for your local environment.  Make any changes you need, and rename this file
# to "build.properties" in the same directory that contains the Struts
# "build.xml" file.
#
# $Id: build.properties.sample,v 1.4 2001/05/06 12:07:31 vmassol Exp $
# -

# WARNING:  The relative paths below assume that the build.xml file is in the
# top-level directory of the jakarta-struts source distribution (as it still
# is at the moment).  If build.xml moves to under the "build" subdirectory,
# we will need to add an extra level of "../" to each of these paths.

# The directory containing your binary distribution of Tomcat 4.0 ("Catalina"
# is the servlet container part of this distribution), from CVS module
# "jakarta-tomcat-4.0" at jakarta.apache.org).  This is only required
# if you are going to execute the "deploy.catalina" target.
catalina.home=../jakarta-tomcat-4.0/build

# The JAR file containing the JDBC 2.0 Optional Package extensions API
# (javax.sql).  This file will automatically be added to your class path
# when you compile Struts
jdbc20ext.jar=../jdbc20/jdbc2_0-stdext.jar

# The JAR file containing the Servlet API classes to compile against (either
# version 2.2 or 2.3)
servlet.jar=../tomcat/lib/common/servlet.jar

# The directory containing your binary distribution of Tomcat 3.2, from CVS
# module "jakarta-tomcat" (and branch "TOMCAT_32") at jakarta.apache.org.
# This is only required if you are going to execute the "deploy.tomcat" target.
tomcat.home=../tomcat

# The JAR file containing the Xerces parser.  This is only required if you are
# going to execute the "deploy.catalina" target.
xerces.jar=../xml-xerces/xerces.jar

# Properties related to Struts unit testing
# -

# Cactus jar for the Servlet API corresponding to the servlet.jar file
# selected above (either 2.2 or 2.3)
cactus.jar = ../jakarta-commons/cactus/out/servlet22/dist/lib/commons-cactus.jar


# Cactus Ant custom tasks jar
cactus.ant.jar =
../jakarta-commons/cactus/out/servlet22/dist/lib/commons-cactus-ant.jar

# JUnit jar file
junit.jar = f:/applis/jakarta-ant-1.4alpha/lib/junit.jar

# Servlet engine locations for the tests

# Note: If you don't want to run the test on a given servlet engine, just
#   comment it's home property. For example, if you don't want to run the
#   tests on Tomcat 4.0, comment the "tomcat.home.40" property.

tomcat.home.32 = f:/applis/jakarta-tomcat-3.2.1
tomcat.home.40 = f:/applis/jakarta-tomcat-4.0-b1


build.xml:














































































  
  





































  






























































































































































































=