我正在努力建立这个项目:
git clone --depth 1 --branch v1.0.19 https://github.com/jfree/jfreechart.git
使用"mvn install"命令,有以下错误:
Failed tests: testFifteenMinIncludedAndExcludedSegments(org.jfree.chart.axis.SegmentedTimelineTest)
testFifteenMinSegmentedTimeline(org.jfree.chart.axis.SegmentedTimelineTest): expected:<-2208956400000> but was:<-2208967200000>
testMondayThroughFridaySegmentedTimeline(org.jfree.chart.axis.SegmentedTimelineTest): expected:<-2208988800000> but was:<-2208999600000>
testFindDomainBounds(org.jfree.data.time.TimeSeriesCollectionTest): expected:<1.199142E12> but was:<1.1991348E12>
然后我尝试用ANT脚本构建
cd ant
ant
我得到了jfreechart-1.0.19-bundle.jar
8M的重量,这与MAVEN的jar非常不同https://repo1.maven.org/maven2/org/jfree/jfreechart/1.0.19/。请告诉我如何构建jfreechart版本1.0.19表单源?
尝试从这里找到的原始源代码发行版构建。验证校验和,解压缩文件并使用ant
进行构建:
$ java -version
java version "11.0.10" 2021-01-19 LTS…
$ md5 jfreechart-1.0.19.zip
MD5 (jfreechart-1.0.19.zip) = 69a5c88439566ac9d7e74cf34c69b7e0
$ unzip -qq jfreechart-1.0.19.zip
$ pushd jfreechart-1.0.19
$ pushd ant ; ant ; popd
…
BUILD SUCCESSFUL
对于lib/jfreechart-1.0.19.jar
,我得到1_565_109
字节的大小,与这里看到的1_565_065
字节相当。您还需要jcommon-1.0.23.jar
,它包含在lib
目录中,可以在这里找到。
附录:从存储库的克隆开始,类似的方法也可以工作,在lib
中生成1_565_051
字节的JAR和8M的jfreechart-1.0.19-bundle.jar
:
$ git clone https://github.com/jfree/jfreechart.git jfreechart
$ pushd jfreechart
$ git fetch --tags
$ git tag --list
…
v1.0.19
…
$ git checkout v1.0.19
Note: switching to 'v1.0.19'…
$ pushd ant ; ant ; popd
…
BUILD SUCCESSFUL
$ git checkout master
$ git status
…
Untracked files:
(use "git add <file>..." to include in what will be committed)
jfreechart-1.0.19-bundle.jar
jfreechart-1.0.19-javadocs.zip
jfreechart-1.0.19.tar.gz
jfreechart-1.0.19.zip
lib/
…