【问题标题】:How to build jfreechart-1.0.19 from sources?如何从源代码构建 jfreechart-1.0.19?
【发布时间】:2021-10-18 18:42:51
【问题描述】:

我正在尝试构建这个项目:

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 的罐子 https://repo1.maven.org/maven2/org/jfree/jfreechart/1.0.19/ 非常不同。请告诉我如何构建 1.0.19 版本的表单源?

【问题讨论】:

    标签: jfreechart java ant jfreechart


    【解决方案1】:

    尝试从找到here 的原始源代码分发版构建。验证校验和,解压文件并使用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 字节的大小,与here 看到的1_565_065 字节相当。您还需要jcommon-1.0.23.jar,包含在lib 目录中并找到here

    附录:从repository 的克隆开始,类似的方法也有效,在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/
     …
    

    【讨论】:

    • 出于好奇,我尝试了与您的方法类似的方法。我看到了 8M 捆绑包以及 lib 文件。更多内容。
    猜你喜欢
    • 2021-12-07
    • 2010-11-17
    • 2021-10-07
    • 2012-01-21
    • 2012-06-13
    • 2012-08-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多