【发布时间】:2014-12-26 12:37:42
【问题描述】:
API MyProject 链接(由 HTML Publisher Jenkins 插件生成)给出 404。
访问 /job/MyProject /API_MyProject/index.html 时出现问题。原因:未找到
我检查了配置部分、作业项和发布 HTML 报告配置中的输入,我看到以下内容:
要归档的 HTML 目录:build/api 索引页[s]:index.html 报告标题:API MyProject
将我踢到 api 文档的 url 如下:
http://jenkins.dev:8080/job/MyProject/API_MyProject/
然后,我检查了 build/api 文件夹中是否生成了文档,我看到了两个文件夹:
docs/xml/
没有 index.html,但是无论我手动生成一个虚拟 index.html 文件,我仍然得到同样的错误......另一个奇怪的行为是当我编辑报告标题时,它会将链接更改为仍然找不到api 文档..
phpdox.xml 文件:
<?xml version="1.0" encoding="utf-8" ?>
<phpdox xmlns="http://xml.phpdox.net/config" silent="false">
<project name="MyProject" source="${basedir}/protected/models" workdir="${basedir}/build/api/xml">
<collector publiconly="false">
<include mask="*.php" />
</collector>
<generator output="${basedir}/build/api/docs">
<build engine="html" enabled="true" output="api">
<file extension="html" />
</build>
</generator>
</project>
</phpdox>
Jenkins 最终控制台输出:
phpdox:
[exec] phpDox 0.7.0 - Copyright (C) 2010 - 2014 by Arne Blankerts
[exec]
[exec] [26.12.2014 - 05:57:27] Using config file './phpdox.xml'
[exec] [26.12.2014 - 05:57:27] Registered collector backend 'parser'
[exec] [26.12.2014 - 05:57:27] Registered enricher 'build'
[exec] [26.12.2014 - 05:57:27] Registered enricher 'git'
[exec] [26.12.2014 - 05:57:27] Registered enricher 'checkstyle'
[exec] [26.12.2014 - 05:57:27] Registered enricher 'phpcs'
[exec] [26.12.2014 - 05:57:27] Registered enricher 'pmd'
[exec] [26.12.2014 - 05:57:27] Registered enricher 'phpunit'
[exec] [26.12.2014 - 05:57:27] Registered enricher 'phploc'
[exec] [26.12.2014 - 05:57:27] Registered output engine 'xml'
[exec] [26.12.2014 - 05:57:27] Registered output engine 'html'
[exec] [26.12.2014 - 05:57:27] Starting to process project 'MyProject'
[exec] [26.12.2014 - 05:57:27] Starting collector
[exec] [26.12.2014 - 05:57:27] Scanning directory '/var/lib/jenkins/jobs/MyProject/workspace/protected/models' for files to process
[exec]
[exec] ................ [16]
[exec]
[exec] [26.12.2014 - 05:57:34] Saving results to directory '/var/lib/jenkins/jobs/MyProject/workspace/build/api/xml'
[exec] [26.12.2014 - 05:57:39] Resolving inheritance
[exec]
[exec] ................ [16]
[exec]
[exec] [26.12.2014 - 05:57:39] The following unit(s) had missing dependencies during inheritance resolution:
[exec] [26.12.2014 - 05:57:39] - Category (missing CActiveRecord)
[exec] [26.12.2014 - 05:57:39] - LoginForm (missing CFormModel)
[exec] [26.12.2014 - 05:57:39] - Mimetype (missing CActiveRecord)
[exec] [26.12.2014 - 05:57:39] - ContactForm (missing CFormModel)
[exec] [26.12.2014 - 05:57:39] - File (missing CActiveRecord)
[exec] [26.12.2014 - 05:57:39] - UserAccountReference (missing CActiveRecord)
[exec] [26.12.2014 - 05:57:39] - Currency (missing CActiveRecord)
[exec] [26.12.2014 - 05:57:39] - Account (missing CActiveRecord)
[exec] [26.12.2014 - 05:57:39] Collector process completed
[exec]
[exec] [26.12.2014 - 05:57:39] Starting generator
[exec] [26.12.2014 - 05:57:39] Loading enrichers
[exec] [26.12.2014 - 05:57:39] Starting event loop.
[exec]
[exec] .................................................. [50]
[exec] .................................................. [100]
[exec] .................................................. [150]
[exec] .................................................. [200]
[exec] .................................................. [250]
[exec] ............ [262]
[exec]
[exec] [26.12.2014 - 05:57:41] Generator process completed
[exec] [26.12.2014 - 05:57:41] Processing project 'MyProject' completed.
[exec]
[exec]
[exec] Time: 13 seconds, Memory: 12.75Mb
[exec]
build:
BUILD SUCCESSFUL
Total time: 1 minute 57 seconds
[CHECKSTYLE] Collecting checkstyle analysis files...
[CHECKSTYLE] Finding all files that match the pattern build/logs/checkstyle.xml
[CHECKSTYLE] Parsing 1 file in /var/lib/jenkins/jobs/MyProject/workspace
[CHECKSTYLE] Successfully parsed file /var/lib/jenkins/jobs/MyProject/workspace/build/logs/checkstyle.xml with 67 unique warnings and 0 duplicates.
[PMD] Collecting PMD analysis files...
[PMD] Finding all files that match the pattern build/logs/pmd.xml
[PMD] Parsing 1 file in /var/lib/jenkins/jobs/MyProject/workspace
[PMD] Successfully parsed file /var/lib/jenkins/jobs/MyProject/workspace/build/logs/pmd.xml with 61 unique warnings and 0 duplicates.
[DRY] Collecting duplicate code analysis files...
[DRY] Finding all files that match the pattern build/logs/pmd-cpd.xml
[DRY] Parsing 1 file in /var/lib/jenkins/jobs/MyProject/workspace
[DRY] Successfully parsed file /var/lib/jenkins/jobs/MyProject/workspace/build/logs/pmd-cpd.xml with 0 unique warnings and 0 duplicates.
Recording plot data
Publishing Clover coverage report...
Clover xml file does not exist in: /var/lib/jenkins/jobs/MyProject/workspace called: build/logs/clover.xml and will not be copied to: /var/lib/jenkins/jobs/MyProject/builds/2014-12-26_11-55-21/cloverphp/clover.xml
Could not find 'build/coverage/build/logs/clover.xml'. Did you generate the XML report for Clover?
[htmlpublisher] Archiving HTML reports...
[htmlpublisher] Archiving at BUILD level /var/lib/jenkins/jobs/MyProject/workspace/build/api to /var/lib/jenkins/jobs/MyProject/builds/2014-12-26_11-55-21/htmlreports/API_Unnamed
[JDepend] JDepend plugin is ready
[JDepend] Found 16 classes in 2 packages
Finished: SUCCESS
【问题讨论】:
标签: jenkins