Adding Maven build results in the Jenkins email - email

I am using Jenkins for our Maven/Tycho project and I am using Email-ext plugin to get the build reports in email. I am using a jelly script that I found here.
What I am looking for is to be able to add module build results (failed, successful, etc) instead of the build artifacts. Basically I'd like to include the table in the middle of the maven project build in my email. I looked in many places but all I found is test results or artifacts. But I'd like to get the module build result instead.

The problem was solved by modifying the artifacts table section like this:
<!-- MAVEN ARTIFACTS -->
<j:set var="mbuilds" value="${build.moduleBuilds}" />
<j:if test="${mbuilds!=null}">
<div class="content">
<h1>Module Builds</h1>
<TABLE>
<TR><TD class="bg1"><B>Bundle Name</B></TD>
<TD class="bg1"><B>Build Result</B></TD></TR>
<j:forEach var="m" items="${mbuilds}">
<tr>
<TD>${m.key.displayName}</TD>
<j:if test="${m.value==null or m.value.size()==0 }">
<td>didn't run</td>
</j:if>
<j:forEach var="mvnbld" items="${m.value}">
<td>${mvnbld.result}</td>
<td align="left">
<j:choose>
<j:when test="${mvnbld.result=='SUCCESS'}">
<img src="${rooturl}static/e59dfe28/images/16x16/blue.gif" />
</j:when>
<j:when test="${mvnbld.result=='FAILURE'}">
<img src="${rooturl}static/e59dfe28/images/16x16/red.gif" />
</j:when>
<j:when test="${mvnbld.result=='NOT_BUILT'}">
<img src="${rooturl}static/e59dfe28/images/16x16/grey.gif" />
</j:when>
<j:when test="${mvnbld.result=='UNSTABLE'}">
<img src="${rooturl}static/e59dfe28/images/16x16/yellow.gif" />
</j:when>
<j:otherwise>
<img src="${rooturl}static/e59dfe28/images/16x16/grey.gif" />
</j:otherwise>
</j:choose>
</td>
</j:forEach>
</tr>
</j:forEach>
</TABLE>
<br />
</div>
</j:if>
The main issue is however, the java docs are not good enough for jelly script or groovy implementation. I had to randomly try things because for instance you cannot find getModuleBuilds in the AbstractBuild api.

Related

Fluid TYPO3 : Error after Update : Could not analyse class:FluidTYPO3\Flux\ViewHelpers\Flexform\SheetViewHelper maybe not loaded or no autoloader?

Aargh! My TYPO3 6.2.11 worked fine! Then I was updated all of my FLUIDTYPO3-Extensions and now I'll get an error:
Could not analyse class:FluidTYPO3\Flux\ViewHelpers\Flexform\SheetViewHelper maybe not loaded or no autoloader?
Here's the changelog, but there is no obvious problem for me? FluidTYPO3:
flux 7.1.2 => 7.2.0
fluidcontent_core 1.0.3 => 1.1.0
fluidcontent 4.1.1 => 4.1.2
fluidpages 3.1.2 => 3.2.0
vhs 2.3.0 => 2.3.1
I change my namespaces at all templates and FLUX-FCEs xmlns:f but that won't help. From
xmlns:f="http://typo3.org/ns/TYPO3/Fluid/ViewHelpers"
to
<div xmlns="http://www.w3.org/1999/xhtml" lang="en"
xmlns:f="http://typo3.org/ns/FluidTYPO3/Flux/ViewHelpers"
f:schemaLocation="https://fluidtypo3.org/schemas/fluid-master.xsd"
xmlns:flux="http://typo3.org/ns/FluidTYPO3/Flux/ViewHelpers"
flux:schemaLocation="https://fluidtypo3.org/schemas/flux-master.xsd">
Nothing.
It's a disaster ... my Website is crashed with that error.
I hope someone can help me ... (Never update later then 10pm ;)
There is no longer a Flexform Namespace in Flux.
Change your ViewHelper to
<flux:form.sheet .... >
...
</flux:form.sheet .... >
This has to be done for all ViewHelpers that use the old <flux:flexform... namespace.
On my 6.2 system with
fluidpages 3.2.3
flux 7.2.1
vhs 2.3.3
it finally worked with:
<div xmlns="http://www.w3.org/1999/xhtml" lang="en"
xmlns:f="http://typo3.org/ns/TYPO3/Fluid/ViewHelpers"
xmlns:v="http://typo3.org/ns/FluidTYPO3/Vhs/ViewHelpers"
xmlns:flux="http://typo3.org/ns/FluidTYPO3/Flux/ViewHelpers">
I got this out of the extension built with the builder extension - the code given in the documentation did not work. (I only used Fluid pages, no Fluid content)
Some additional example to the above for the whole template:
<div xmlns="http://www.w3.org/1999/xhtml" lang="en"
xmlns:f="http://typo3.org/ns/TYPO3/Fluid/ViewHelpers"
xmlns:v="http://typo3.org/ns/FluidTYPO3/Vhs/ViewHelpers"
xmlns:flux="http://typo3.org/ns/FluidTYPO3/Flux/ViewHelpers">
<f:layout name="Default" />
<f:section name="Configuration">
<flux:form id="default">
<!-- Input field for Fluid variable 'pageClass' -->
<flux:field.input name="settings.pageClass" default="onecol"/>
<!-- Backend layout grid (TYPO3 6.x and greater only) -->
<flux:grid>
<flux:grid.row>
<flux:grid.column colPos="0" name="Main" style="width: 75%" colspan="4" />
</flux:grid.row>
</flux:grid>
</flux:form>
</f:section>
<f:section name="Body">
<div class="container content">
<div class="col-full">
<!-- Render colPos=0 in this section -->
<v:content.render column="0"/>
</div>
</div>
</f:section>
</div>
I don't wanna know how many hours of developer time these changes in conventions burn every time...
Good luck!

how to use tablelayout in zk framework

I am new to ZK framework and i am using its latest version.I am trying to use tablelayout in zul but its giving error.tried importing zkmax.jar but it did not work for me.can somebody help?
here is the sample code:
<tablelayout columns="2">
<tablechildren>
<panel title="Table 1" border="normal" maximizable="true"
collapsible="true" width="200px" height="200px">
<panelchildren>Panel Content</panelchildren>
</panel>
</tablechildren>
<tablechildren>
<panel title="Table 2" border="normal" maximizable="true"
collapsible="true" width="200px" height="200px">
<panelchildren>Panel Content</panelchildren>
</panel>
</tablechildren>
<tablechildren>
<panel title="Table 3" border="normal" maximizable="true"
collapsible="true" width="200px" height="200px">
<panelchildren>Panel Content</panelchildren>
</panel>
</tablechildren>
<tablechildren>
<panel title="Table 4" border="normal" maximizable="true"
collapsible="true" width="200px" height="200px">
<panelchildren>Panel Content</panelchildren>
</panel>
</tablechildren>
</tablelayout>
Error:
java.lang.ClassNotFoundException: org.zkoss.zul.impl.api.XulElement
XulElement is normally under zul-x.x.x.jar.
Example :
zul.6.5.3.jar contains org.zkoss.zul.impl.XulElement.
As you can see its on another path.
Same for zk 7.x.x => http://www.zkoss.org/javadoc/latest/zk/org/zkoss/zul/impl/XulElement.html
Now you have clashing dependencies, where a version of zul is to high for another dependencie.
For further help I need to know what zk jars you all use.
As you can see in this fiddle, there is nothing wrong with your code.
that is true, i checked it later.but i found that suggestion in zk forum and so i tried.I have found the solution. I am actually using free edition and those components are available in PE & EE not in CE. :) For reference http://www.zkoss.org/whyzk/Features .
Thanks Anyway..!!

MySampleApplication clickme button does not appear when deployed to container

I have built a new project using GWT. If I run the project from the Intellij IDEA IDE after a few seconds the 'clickme' control appears in the browser and everything works as expected.
I have created an artifact for a application war file, which is created in the expected ../out/artifact folder.
When I deploy the .war file to apache tomcat, and click on the webapp in the apache tomcat manager I just get the list of files under the webapps/MySampleApplication file location.
If I select the MySampleAppliacation.html file I see the text in that html file but the 'clickme' button never appears.
I have done a lot of googling but have not solved the problem. I checked and the gwt-user.jar file is in the lib folder of the webapp.
This is the GWT control file
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.0//EN"
"http://google-web-toolkit.googlecode.com/svn/releases/2.0/distro-source/core/src /gwt-module.dtd">
<module rename-to="MySampleApplication">
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User'/>
<!-- Specify the app entry point class. -->
<entry-point class='com.mySampleApplication.client.MySampleApplication'/>
<!-- Specify the app servlets. -->
<servlet path='/MySampleApplicationService' class='com.mySampleApplication.server.MySampleApplicationServiceImpl'/>
</module>
This is the project html page
<html>
<head>
<title>Wrapper HTML for App</title>
<link type="text/css" rel="stylesheet" href="MySampleApplication.css">
<!-- -->
<!-- This script is required bootstrap stuff. -->
<!-- -->
<script type="text/javascript" language="javascript"
src="MySampleApplication/MySampleApplication.nocache.js"></script>
</head>
<body>
<h1>Sample Application</h1>
<p>
This is an example of a host page for the App application.
You can attach a Web Toolkit module to any HTML page you like,
making it easy to add bits of AJAX functionality to existing pages
without starting from scratch.
</p>
<table align="center">
<tr>
<td id="slot1"></td>
<td id="slot2"></td>
</tr>
</table>
</body>
</html>
For good measure, here are all the files under webapps for this project
MySampleApplication\index.html
MySampleApplication\MySampleApplication
MySampleApplication\MySampleApplication.css
MySampleApplication\MySampleApplication.html
MySampleApplication\WEB-INF
MySampleApplication\MySampleApplication\0651E8A6D149EEF5E6386F087426CF0A.cache.html
MySampleApplication\MySampleApplication\0CE0D511D927FEB65BA6F6D96F24D2D4.cache.html
MySampleApplication\MySampleApplication\3C8C88AE707243315A0D688BD60B8CCA.cache.html
MySampleApplication\MySampleApplication\4A4AEE91A97252CBA376B9B27863F6ED.cache.html
MySampleApplication\MySampleApplication\644584634D68B773C08A73FA726669A5.gwt.rpc
MySampleApplication\MySampleApplication\clear.cache.gif
MySampleApplication\MySampleApplication\D003F7646BFEF3B8BE562132E77EFE59.cache.html
MySampleApplication\MySampleApplication\hosted.html
MySampleApplication\MySampleApplication\MySampleApplication.nocache.js
MySampleApplication\WEB-INF\classes
MySampleApplication\WEB-INF\web.xml
MySampleApplication\WEB-INF\classes\com
MySampleApplication\WEB-INF\classes\com\mySampleApplication
MySampleApplication\WEB-INF\classes\com\mySampleApplication\client
MySampleApplication\WEB-INF\classes\com\mySampleApplication\MySampleApplication.gwt.xml
MySampleApplication\WEB-INF\classes\com\mySampleApplication\server
MySampleApplication\WEB-INF\classes\com\mySampleApplication\client\MySampleApplication$1.class
MySampleApplication\WEB-INF\classes\com\mySampleApplication\client\MySampleApplication$MyAsyncCallback.class
MySampleApplication\WEB-INF\classes\com\mySampleApplication\client\MySampleApplication.class
MySampleApplication\WEB-INF\classes\com\mySampleApplication\client\MySampleApplicationService$App.class
MySampleApplication\WEB-INF\classes\com\mySampleApplication\client\MySampleApplicationService.class
MySampleApplication\WEB-INF\classes\com\mySampleApplication\client\MySampleApplicationServiceAsync.class
MySampleApplication\WEB-INF\classes\com\mySampleApplication\server\MySampleApplicationServiceImpl.class
About the only other thing would be the IDEA project module settings......
I am VERY appreciative or your help Andy.

Eclipse not rendering jsf?

only tomcat server will display the .jsf pages correctly. When I try to add project through eclipse and view and test it doesn't render the .jsf code but instead displays it as source code. I have eclipse configured for tomcat and that works fine but can't get the .jsf pages to render it just displays the source code when added to the server through eclipse but if I export the .war file and run it on tomcat/webapps then it works fine.
source code example from eclipse:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html">
<h:head>
<title>PCC Accounts Login</title>
</h:head>
<h:body>
<h:outputStylesheet name="style.css"></h:outputStylesheet>
<h:outputText>testing output text tag WITHOUT using value attributeHELLo ????</h:outputText>
<h:outputText value="testing outputText WITH using the value attribute" />
<h:form>
<h:inputText id="user_id" title="User Name" value="User Name" action="#{loginBean.setUsername}">User Name</h:inputText>
<h:inputText id="password" title="Password" value="Password" action="#{loginBean.setPassword}">Password</h:inputText>
<!-- <h:commandButton id="login" value="Login" action="accounts.jsf">Login Now</h:commandButton> -->
<h:commandButton id="login" value="Login" action="accounts.jsf" />
</h:form>
</h:body>
</html>
source code example exported from eclipse and ran on tomcat:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="j_idt2">
<title>PCC Accounts Login</title>
<link type="text/css" rel="stylesheet" href="/assign05_test/javax.faces.resource/style.css.jsf" />
</head>
<body>
<input type="hidden" name="j_idt9" value="j_idt9" />
<input id="j_idt9:user_id" type="text" name="j_idt9:user_id" value="User Name" title="User Name" />
<input id="j_idt9:password" type="text" name="j_idt9:password" value="Password" title="Password" />
<input id="j_idt9:login" type="submit" name="j_idt9:login" value="Login" />
</form>
</body>
</html>
SO, Eclipse is obviously not rendering the JSF pages but I added the correct file to the Preferences/Java/BuildPath/UserLibraries. So I'm not sure why it's not working but for now I'm testing by exporting the .war then running it on tomcat server which is very tedious process. Anybody else run into this problem? Any help would be greatly appreciated, thanks in advance.
Respectfully,
Martin Hand
Had this for servlet-mapping in web.xml:
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
Changed it to this and it's fixed:
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
Funny though that it only affected it when trying to run through Eclipse but if exported .war then added to /webapps in tomcat it was fine but that's a very tedious and annoying process when trying to develope an application. Also read this helpful article if your having trouble - JSF tags not being rendered as HTML

HTML-email line-height for Outlook Web App

I'm working on a HTML e-mail template.
The line-height in the html code below seems to work fine in Gmail and Outlook.
However, in the Outlook Web App the line height is increased.
I tried some fixes I found on the internet/stackoverflow: the css code in the header and the inline css code.
However, this doesnt do the trick.
Does anybody know how to fix the line-height in the Outlook Web App for the example below?
Thanks! Mark
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style>
.ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div {line-height: 100% !important;}
</style>
</head>
<body>
<table cellpadding="0" cellspacing="0" width="400">
<tr>
<td width="400" style="display:block;padding:0px;margin:0px;font-size:12px;font-family:Arial, Helvetica, sans-serif;color:#000000;mso-line-height-rule:exactly;line-height:12px;">
Test copy Test copy Test copy Test copy Test copy
Test copy Test copy Test copy Test copy Test copy
Test copy Test copy Test copy Test copy Test copy
Test copy Test copy Test copy Test copy Test copy
Test copy Test copy Test copy Test copy Test copy
Test copy Test copy Test copy Test copy Test copy
Test copy Test copy Test copy Test copy Test copy
Test copy Test copy Test copy Test copy Test copy
Test copy Test copy Test copy Test copy
Test copy Test copy Test copy Test copy Test copy
Test copy Test copy Test copy Test copy Test copy
</td>
</tr>
</table>
</body>
</html>
This is the fix we've used but it looks like that may be similar to yours already.
<tr>
<td width="100%" height="15"
style="font-size:15px; line-height:15px; mso-line-height-rule: exactly;"
class="hide"> </td>
</tr>