Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tomszt/hang on commit #1387

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
8426cc0
1.Changed the way ANT build script asks JAVAC to display to user
TomaszSzt Nov 2, 2021
81270e6
Added version indicator. Possibly in wrong place since it is
TomaszSzt Nov 2, 2021
3f9015a
1.Noticed that there is no ANT target to generate javadocs for GITBLI…
TomaszSzt Nov 2, 2021
6508c64
Added missing JavaDoc. Due to lack of good documentation of
TomaszSzt Nov 2, 2021
cbe758f
1.Added javadoc creation to build-xml to allow easier code
TomaszSzt Nov 2, 2021
5b9df26
1.Added some notes to build.xml to inform users about
TomaszSzt Nov 3, 2021
1f3210a
1.Finished GitBlitServer code responsible for full blown
TomaszSzt Nov 3, 2021
ffb83de
Non Compiling.
TomaszSzt Nov 3, 2021
b7dc1fc
Compiling.
TomaszSzt Nov 3, 2021
375b4fc
1.Added some comments about multithread safety in BasePage javadocs.
TomaszSzt Nov 3, 2021
82ee8ee
1.Updated some comments in BasePage according to logging.
TomaszSzt Nov 3, 2021
dac46a4
1.Armed CommitPage with trace logs which will help pin-point
TomaszSzt Nov 3, 2021
a8f0236
1.Detected a potential problem with loggers initialization.
TomaszSzt Nov 3, 2021
a53a5e9
Moved logging system initialization to static code
TomaszSzt Nov 3, 2021
d70c8a9
Made sure that web app in deployment mode do use default resource value
TomaszSzt Nov 4, 2021
3301fea
Basically a question expained in commit.
TomaszSzt Nov 4, 2021
db81e86
Gosh.... I know why now. All due to DataView API which needs
TomaszSzt Nov 4, 2021
91898b8
1.Added some logging code
TomaszSzt Nov 4, 2021
3f83aaf
1.Fixed comment in panel
TomaszSzt Nov 4, 2021
44fc7c1
Detected some test errors
TomaszSzt Nov 4, 2021
2bcad9b
1.Fixed gitblit issue https://github.com/gitblit/gitblit/issues/1389
TomaszSzt Nov 5, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
tags
\#*\#
/temp
/lib
/ext
Expand Down Expand Up @@ -30,3 +31,10 @@ tags
/**/init.lua
/**/session
/nbproject/private
# backup files from most of editors
*.java~
*.html~
*.properties~
*.xml~
# Generated javadoc files for "javadoc" target.
/javadoc
2 changes: 1 addition & 1 deletion build.moxie
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ name: Gitblit
description: pure Java Git solution
groupId: com.gitblit
artifactId: gitblit
version: 1.9.2-SNAPSHOT
version: 1.9.2-TomaszSzt.1.01
inceptionYear: 2011

# Current stable release
Expand Down
63 changes: 56 additions & 7 deletions build.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="gitblit" default="compile" xmlns:mx="antlib:org.moxie" xmlns:jacoco="antlib:org.jacoco.ant">

<!--
Note: 1.Some of targets do require that JAVA_HOME environment variable
is set to point to JDK home folder, ie:

Windows:
set JAVA_HOME=c:\jdk7

2.There are compatibility issues with SSL and git hub if jdk7 pre 1.171
release is used. See setEnv.bat for information which environement
variables needs to be set to enable compilation in mixed environments
when different JRE is used to run ANT and build processing code
-->
<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Retrieve Moxie Toolkit
Expand All @@ -26,7 +37,8 @@
</taskdef>

<!-- Project directories -->
<property name="project.src.dir" value="${basedir}/src/main/java" />
<property name="project.src.dir" value="${basedir}/src/main/java" />
<property name="project.src.javadoc.dir" value="${basedir}/javadoc" />
<property name="project.resources.dir" value="${basedir}/src/main/resources" />
<property name="project.distrib.dir" value="${basedir}/src/main/distrib" />

Expand All @@ -37,6 +49,11 @@
<!-- GitHub user/organization name -->
<property name="gh.org" value="gitblit" />

<!-- Avoid ant 'includeantruntime' not set warning (ant>1.10) -->
<presetdef name="javac">
<javac includeantruntime="false" />
</presetdef>

<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Initialize Moxie and setup build properties
Expand Down Expand Up @@ -74,9 +91,10 @@

<!-- Report Java version -->
<echo>JDK version: ${ant.java.version}</echo>
<exec executable="javac">
<arg value="-version" />
</exec>
<echo>Calling compiler to show version:</echo>
<javac srcdir="./" includes="empty.java">
<compilerarg value="-version"/>
</javac>
<echo>Java/JVM version: ${java.version}</echo>
</target>

Expand Down Expand Up @@ -133,7 +151,8 @@

<!-- Compile project -->
<mx:javac scope="compile" clean="true" />

<!-- Comment above, uncoment below for faster, repetitive compilation
<mx:javac scope="compile" clean="false" /> -->
</target>


Expand Down Expand Up @@ -1085,7 +1104,8 @@ GB_RELEASE_TAG=${project.tag}
<include name="users.conf" />
<include name="projects.conf" />
<include name="defaults.properties" />
<include name="gitblit.properties" />
<include name="gitblit.properties" />
<include name="log4j*.properties" />
</fileset>
</copy>
<mkdir dir="@{toDir}/git" />
Expand Down Expand Up @@ -1296,4 +1316,33 @@ GB_RELEASE_TAG=${project.tag}
</exec>
</target>


<!--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Build javadocs for GitBlit source code
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
<!-- Note: This target requires that JAVA_HOME enviromental variable is
set to point to main JDK folder
-->
<target name="javadoc">
<javadoc
maxmemory="480m"
sourcepath="${project.src.dir}"
destdir="${project.src.javadoc.dir}"
classpath="${basedir}/ext/*;${basedir}/build/classes"
additionalparam=" -version"
linksource="yes"
includenosourcepackages="yes"
charset="UTF-8"
access="private"
encoding="UTF-8"
Use="yes"
>
<arg value="-Xmaxwarns"/>
<arg value="1800"/>
<arg value="-Xmaxerrs"/>
<arg value="800"/>
</javadoc>
</target>
</project>
4 changes: 4 additions & 0 deletions empty.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/*
Nothing. Just to force ANT compiler to show version.
See build.xml "prepare" target.
*/
37 changes: 37 additions & 0 deletions setEnv.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
@rem A mininum environmental set-up to allow console to
@rem run different ANT and different JDK than rest of the build system.
@rem Run this batch script ONCE per console.

@rem Prequisites:
@rem - JDK 7 needs to be used to compile and provide class files.
@rem - either ANT 1.9 line needs to be used to handle compilation
@rem when JRE from JDK 7 is to be used or
@rem - java must be pointed out directly to version which is compatible
@rem with Your ANT system.

@echo Seting up path to java jdk home folder
@SET JAVA_HOME=c:\jdk1.7.0_80

@echo Seting up path to java.exe in JRE home folder
@SET JAVACMD=c:\jdk8\jre\bin\java.exe

@echo Removing old ANT path from
@set PATH=%PATH:C:\ant\bin=%

@echo Adding new ANT path
@set PATH=c:\ant\bin;%PATH%

@echo --------------------------
@echo JAVA_HOME is "%JAVA_HOME%"
@echo --------------------------
@echo PATH is "%PATH%"
@echo --------------------------
@echo JRE version which will be running all non-ANT jobs is:
@java -version
@echo --------------------------
@echo JRE version which will be running ANT is:
@%JAVACMD% -version
@echo --------------------------
@echo Check if JRE version is at least 7.171, 8.161, or 9.148
@echo Otherwise You may expect some SSL exceptions when scripts will
@echo attempt to connect to github to fetch dependencies.
33 changes: 31 additions & 2 deletions src/main/distrib/data/defaults.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1484,9 +1484,29 @@ web.binaryExtensions = 7z arc arj bin dll doc docx exe gz jar lib lzh odg odf od
# SINCE 0.5.0
web.aggressiveHeapManagement = false

# Run the webapp in debug mode
# Run the webapp in debug mode.
# Allowed values are:
# false - INFO reporting level
# true - DEBUG reporting level
#
# SINCE 0.5.0
# If more precise tuning is necessary ${baseFolder}/log4j.properties file
# should be used to override default settings AND this value should be left
# as "false".
#
# To enable full detailed logging create ${baseFolder}/log4j.properties text file
# with a single line:
#
# log4j.rootLogger=ALL, S
#
# to debug to console or start server with --dailyLogFile to redirect
# logging to "${baseFolder}/log/gitblit.log" file.
#
# Alternatively a more readable debug level can be achived by:
#
# log4j.rootLogger=INFO, S
# log4j.logger.com.gitblit=ALL
#
# SINCE 1.9.2
# RESTART REQUIRED
web.debugMode = false

Expand Down Expand Up @@ -1532,6 +1552,15 @@ web.maxDiffLinesPerFile = 4000
# SINCE 1.7.0
web.maxDiffLines = 20000

# Maximum number of changed files in single commit to process and display
# on commit page. Set to -1 to disable limit.
#
# Keeping this limit at -1 may cause lags and memory overloads if huge
# commits with many files are present in system.
#
# SINCE 1.9.2
web.maxCommitPaths=-1

# Enable/disable global regex substitutions (i.e. shared across repositories)
#
# SINCE 0.5.0
Expand Down
59 changes: 59 additions & 0 deletions src/main/distrib/data/log4j-debug-example.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#
# In this example we show how to override
# debugging settings to provide detailed information
# about what and where have happen in GIT blit
#
# Settings made with this file do CONFLICT with --dailyLogFile command line
# and web.debugMode option overriding their effects.
#
# To activate this example rename it to "log4j.properties"
# and restart server.
#

#
# In below example we are saying that globally we are interested
# in messages on the level INFO and are going to output it to
# console.
#
# If output to a file is expected use:
#
# log4j.rootLogger=INFO, R
#
# Note: The --dailyLogFile server command line parameter is an
# another option to output to a file, but
# we should not use it with conjunction with this settings.
#
# Other levels You may use are ERROR,WARN,INFO,DEBUG,ALL, from most important
# (ERROR) to less (ALL).
#
log4j.rootLogger=INFO, S

#
# In this line we are telling that all JAVA classes which come from
# any com.gitblit.* package should report everything they can do.
#
log4j.logger.com.gitblit=ALL
#
# Now, since we are doing a bug hunt we do enable
# full blow formatting which will tell us not only a message, but also where
# exactly it was made in code. Notice, this hurts performance.

#
# Below line ensures, that specified layout is used for file storage
#
log4j.appender.R.layout = org.apache.log4j.PatternLayout
#
# And what exactly the layout is. The %d means the date of message,
# with up to 1ms accuracy.
# The %l means source information
# %p means priority (the -5) means "left pad with spaces up to 5 chars long
# %m means "message"
# %n means "end of line"
#
log4j.appender.R.layout.ConversionPattern = %d{yyyy-MM-dd HH:mm:ss.SSS} [%-5p] %n %l %n %m%n

#
# We do repeat it for console output.
#
log4j.appender.S.layout = org.apache.log4j.PatternLayout
log4j.appender.S.layout.ConversionPattern = %d{yyyy-MM-dd HH:mm:ss.SSS} %l [%-5p] %n %l %n %m%n
Loading