tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: JNDIRealm doesn't work when binding as non-admin user
Date Wed, 01 Oct 2014 22:00:36 GMT
2014-10-02 1:33 GMT+04:00 Christopher Schultz <chris@christopherschultz.net>:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Jesse,
>
> On 10/1/14 5:13 PM, Jesse Barnum wrote:
>> On Oct 1, 2014, at 8:55 AM, Mark Thomas <markt@apache.org> wrote:
>>
>>> It is likely to be at least a month before those versions are
>>> released. How do you feel about building from source? The other
>>> option is that I can make some snapshot versions available for
>>> you to test.
>>>
>>> Mark
>>
>> Sorry for the double-posting.
>
> No problem.
>
>> I tried building from the repository trunk, but I got errors on
>> the DBCP library. I'm not proficient enough with ant to
>> troubleshoot it. If you could either give me advice on the dbcp
>> errors or send a snapshot build that would be great.
>
> Tomcat 7 should be relatively foolproof.
>
> Here's a bit of the script I use to build release candidates for both
> Tomcat 7 and 8:
>
> BASE_SOURCE_DIR ends up being the root of the tarball, or the root of
> the svn checkout. BASE_DIR can be wherever you want, but my script has
> it being the parent of the directory that contains BASE_SOURCE_DIR.
> BASE_DIR is where everything goes: Tomcat source, the downloaded
> prerequisites, etc. You might be tripping-up on the (not) downloaded
> prerequisites.
>
> # Prepare for build...
> export ANT_OPTS="-Xmx512M"
> export JAVA_OPTS="-Xmx512M"
> BASE_DIR="`pwd`/tarball"
> BASE_SOURCE_DIR="${BASE_DIR}/${BASE_FILE_NAME}-src"
> /bin/echo -e
> "base.path=${BASE_DIR}/downloads\nexecute.validate=true\nexecute.validate=true"

OK, "base.path" is required.

The "execute.validate=true" enables checkstyle. It is needed when
voting for a release candidate, but it is not really necessary if
someone just rebuilds Tomcat.  I wonder what is the point of doubling
the "execute.validate=true" line.

>> "${BASE_SOURCE_DIR}/build.properties"
> ant -f "${BASE_SOURCE_DIR}/build.xml" download-compile
> download-test-compile
>
> ant -f "${BASE_SOURCE_DIR}/build.xml" deploy

I'd do a simple "cd ${BASE_SOURCE_DIR} && ant" instead of the above
two ant commands.

The "deploy" is the default target and "build.xml" (in the current
directory) is the default build file name.

The deploy" target depends on  "download-compile" and
"download-test-compile" ones and will download the files.

> See if any of that helps. If not, please post as much of the ant
> output as you are willing to post and I'll try to help.



A trick to building Tomcat 7 is that you need a Java 6 JDK ( + second
Java 7 JDK if you want to build Websocket libsrarier as well).

If you use a later version than Java 6,  DBCP would fail to compile
because of changes in Java JDBC APIs that are implemented by that
library.


Java 6 JDK should be used to run Ant. This is usually done by setting
JAVA_HOME environment variable to point to its home directory.

Additional Java 7 JDK is declared by setting java.7.home= property in
build.properties file in Tomcat sources.

E.g. my build.properties file on a Windows 7 machine is essentially
the following lines:

base.path=../../libraries/tomcat7
java.7.home=C:/Program Files (x86)/Java/jdk1.7.0_67


"ant deploy" or just "ant" build a ready-to-use version of Tomcat in
output directory.

"ant release" build a release (with all release artifacts) in output/release

Build instructions are in BUILDING.txt file.

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message