詹金斯和梅文(Jenkins and Maven)
我们正在努力为我们的项目设立一个开发人员。 在jenkins中配置maven时,请注意jkenkins没有考虑settings.xml中配置的maven存储库。
我们注意到控制台中的以下语句:
Started by user anonymous Building in workspace C:\apps\Jenkins\jobs\SCAVENGER\workspace Updating http://localhost/project1/scavenger-new at revision '2016-03-21T13:49:29.211 -0700' At revision 5 No changes for http://localhost/project1/scavenger-new since the previous build Parsing POMs Downloaded artifact https://maven-us.nuxeo.org/nexus/content/groups/public/io/dropwizard/dropwizard-bom/0.9.1/dropwizard-bom-0.9.1.pom Downloaded artifact https://maven-us.nuxeo.org/nexus/content/groups/public/io/dropwizard/dropwizard-parent/0.9.1/dropwizard-parent-0.9.1.pom Downloaded artifact https://maven-us.nuxeo.org/nexus/content/groups/public/org/glassfish/jersey/jersey-bom/2.22.1/jersey-bom-2.22.1.pom Downloaded artifact https://maven-us.nuxeo.org/nexus/content/groups/public/net/java/jvnet-parent/4/jvnet-parent-4.pom Established TCP socket on 52263 [workspace] $ C:\apps\Java\jdk1.7.0_79/bin/java -cp C:\apps\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven32-agent-1.7.jar;C:\apps\MAVEN\apache-maven-3.2.5\boot\plexus-classworlds-2.5.2.jar;C:\apps\MAVEN\apache-maven-3.2.5/conf/logging jenkins.maven3.agent.Maven32Main C:\apps\MAVEN\apache-maven-3.2.5 C:\apps\Jenkins\war\WEB-INF\lib\remoting-2.56.jar C:\apps\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven32-interceptor-1.7.jar C:\apps\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven3-interceptor-commons-1.7.jar 52263 <===[JENKINS REMOTING CAPACITY]===>channel started Executing Maven: -B -f C:\apps\Jenkins\jobs\SCAVENGER\workspace\pom.xml -Dmaven.repo.local=C:\apps\Jenkins\jobs\SCAVENGER\workspace\.repository install
我的构建失败,因为我们的本地存储库包含一些在maven中心不可用的工件。
settings.xml中的本地存储库配置:
<localRepository>C:\apps\MAVEN\repo\local</localRepository>
我们怎样才能将Jenkins配置为考虑本地存储库而不是为其创建新的存储库。 对此有任何帮助非常感谢。
We are trying to set up a devop for our project. While configuring maven in jenkins, it is noted that jkenkins is not considering the maven repository configured in the settings.xml.
We have noticed the following statements from the console:
Started by user anonymous Building in workspace C:\apps\Jenkins\jobs\SCAVENGER\workspace Updating http://localhost/project1/scavenger-new at revision '2016-03-21T13:49:29.211 -0700' At revision 5 No changes for http://localhost/project1/scavenger-new since the previous build Parsing POMs Downloaded artifact https://maven-us.nuxeo.org/nexus/content/groups/public/io/dropwizard/dropwizard-bom/0.9.1/dropwizard-bom-0.9.1.pom Downloaded artifact https://maven-us.nuxeo.org/nexus/content/groups/public/io/dropwizard/dropwizard-parent/0.9.1/dropwizard-parent-0.9.1.pom Downloaded artifact https://maven-us.nuxeo.org/nexus/content/groups/public/org/glassfish/jersey/jersey-bom/2.22.1/jersey-bom-2.22.1.pom Downloaded artifact https://maven-us.nuxeo.org/nexus/content/groups/public/net/java/jvnet-parent/4/jvnet-parent-4.pom Established TCP socket on 52263 [workspace] $ C:\apps\Java\jdk1.7.0_79/bin/java -cp C:\apps\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven32-agent-1.7.jar;C:\apps\MAVEN\apache-maven-3.2.5\boot\plexus-classworlds-2.5.2.jar;C:\apps\MAVEN\apache-maven-3.2.5/conf/logging jenkins.maven3.agent.Maven32Main C:\apps\MAVEN\apache-maven-3.2.5 C:\apps\Jenkins\war\WEB-INF\lib\remoting-2.56.jar C:\apps\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven32-interceptor-1.7.jar C:\apps\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven3-interceptor-commons-1.7.jar 52263 <===[JENKINS REMOTING CAPACITY]===>channel started Executing Maven: -B -f C:\apps\Jenkins\jobs\SCAVENGER\workspace\pom.xml -Dmaven.repo.local=C:\apps\Jenkins\jobs\SCAVENGER\workspace\.repository install
My build is failing as our local repository holds some artifacts which are not available in maven central.
The local repository configuration in our settings.xml :
<localRepository>C:\apps\MAVEN\repo\local</localRepository>
In jenkins, we configured maven as
How can can we configure the Jenkins to consider the local repository rather than creating a new one for the same. Any help on this is very much appreciated.
原文:https://stackoverflow.com/questions/36142330
最满意答案
要通过
wkhtmltopdf
将HTML转换为PDF,尽量避免woff
字体。 使用Google Web Fonts
的truetype
格式与base64
编码。最近我试图使用Google Web字体的Google Web字体。 在浏览器中,它正确显示,但在将HTML转换为PDF后不会显示。
在广泛搜索网页后,最后我发现了将字体编码为
base64
格式的工具,并且还获得了@font-face
CSS。在这里阅读解决方案。
To convert HTML to PDF by
wkhtmltopdf
try to avoidwoff
font face. Use thetruetype
format of theGoogle Web Fonts
withbase64
encode.Recently I tried to use a Google web font from Google Web Fonts. In the browser it shows correctly but it doesn't show after converting HTML to PDF.
After searching the web extensively, at last, I found tools to encode fonts to the
base64
format and also got CSS for@font-face
.Read the solution here.
相关问答
更多-
使用wkhtmltopdf从HTML生成Google Web字体和PDF(Google Web Fonts and PDF generation from HTML with wkhtmltopdf)[2022-04-08]
要通过wkhtmltopdf将HTML转换为PDF,尽量避免woff字体。 使用Google Web Fonts的truetype格式与base64编码。 最近我试图使用Google Web字体的Google Web字体。 在浏览器中,它正确显示,但在将HTML转换为PDF后不会显示。 在广泛搜索网页后,最后我发现了将字体编码为base64格式的工具,并且还获得了@font-face CSS。 在这里阅读解决方案。 To convert HTML to PDF by wkhtmltopdf try to a ... -
问题解决了。 我确实需要升级我的托管计划,以便我可以使用X11运行wkhtmltopdf静态二进制文件。 虽然Linux机器上只有一些Nimbus字体,但通过添加字体文件和使用@ font-face css规则,阿拉伯语和其他字体对我来说都很好。 附加说明:为了使用自定义阿拉伯字体文件正确呈现阿拉伯文本,我使用FontSquirrel生成了所需的字体文件和css规则,在“专家”渲染选项下使用“无子集”。 Problem solved. I did indeed need to upgrade my host ...
-
void wkhtmltopdf_add_object(wkhtmltopdf_converter * converter, wkhtmltopdf_object_settings * settings, const char * data) 您可以提供指向UTF-8编码的 HTML字符串的非null data参数,该字符串将转换为PDF而不是page设置。 Thanks you for your time looking into this. I ended up with workaro ...
-
与wkhtmltopdf的麻烦(Troubles with wkhtmltopdf)[2022-07-23]
好的,请按照本教程完成所有这些操作: http : //blog.tcs.de/install-wkhtmltopdf-on-ubuntu-server/谢谢你们的时间。 Ok, just go through all of that, following this tutorial: http://blog.tcs.de/install-wkhtmltopdf-on-ubuntu-server/ Thank you guys for your time. -
您可以使用wkhtmltopdf模块将HTML文件或字符串转换为PDF。 使用URL或内联HTML字符串调用whtmltopdf函数,它返回一个可以从中读取的流或管道到您喜欢的任何位置(例如文件或HTTP响应)。 以下是Ubuntu 13.10 Desktop(64位)的分步指南。 1.在系统上安装wkhtmltopdf命令行工具: $ sudo apt-get install wkhtmltopdf 2.创建项目目录html2pdf并安装wkhtmltopdf模块: $ mkdir html2pdf & ...
-
如何将wkhtmltopdf整合到我的java web应用程序中?(How to integrate wkhtmltopdf into my java webapplication?)[2022-08-03]
wkhtmltopdf程序以独立可执行文件的形式提供。 它使用Qt库中的Qt Webkit模块来渲染HTML并生成PDF输出。 它是用C / C ++编写的,因此你将无法找到任何JAR文件。 您可以将HTML保存为临时文件,使用Runtime.exec()或ProcessBuilder从Java中分离新进程,并在进程结束时读取PDF文件。 Qt Jambi可能会帮助你,以及它的QWebView类也可以帮助你。 或者,您可以在C中使用Qt Webkit实现您自己的包装器,并使用JNI创建Java绑定,以便从J ... -
wkhtmltopdf 0.11.0 rc1的windows版本不支持gif图像。 解决方法:预处理传入HTML中的所有图像并将其转换为jpgs。 问题描述在: http : //code.google.com/p/wkhtmltopdf/issues/detail?id=441 gifs工作在wkhtmltopdf 0.9.9。 The windows version of wkhtmltopdf 0.11.0 rc1 does not support gif images. Workaround: pr ...
-
字体在/usr/share/fonts/ 。 此命令显示命令foo访问的字体。 strace -e open -o >(sed -n '/^open("\/usr\/share\/fonts\//p') foo strace显示系统调用。 -e open表示只显示系统调用以打开文件。 -o >(sed -n '/^open("\/usr\/share\/fonts\//p')表示将输出输出到sed,它只输出系统调用以打开/usr/share/fonts/ 。 对于某些程序,打开详细输出并检查其stderr ...
-
pdfkit与谷歌网络字体(pdfkit with google web fonts)[2022-04-10]
我们在使用wkhtmltopdf的wicked_pdf时遇到了同样的问题。 我们的解决方案是下载字体并将其安装在生成pdfs的机器上。 然后像其他系统字体一样使用字体。 We just had the same problem with wicked_pdf, which uses wkhtmltopdf, too. Our solution was to download the font and install them on the machines, which generate the pdfs. ... -
在ubuntu 12.04上,wkhtmltopdf不呈现格鲁吉亚字符(Georgian charachters is not rendered by wkhtmltopdf on ubuntu 12.04)[2022-04-18]
您需要嵌入一个能够在PDF本身中呈现您的角色的字体。 在样式表中添加以下内容: @font-face { font-family: 'myFont'; src: url( '/public/inc/fonts/myFont.ttf') format('truetype'); font-weight: normal; font-style: normal; } body { font-family: myFont; } You need to embed a fon ...