So I have a jenkins job to update a copy of my code and generate the phpdoc for my library, this is all done with phing
When I use these line in de build.xml it generates jsut fine (but with phpdocumentor 1.4.4)
<target name="phpdoc">
<echo msg="PHP Documentor..." />
<phpdoc title="API Documentation"
destdir="/var/www/corelib"
sourcecode="yes"
output="HTML:Smarty:PHP">
<fileset dir="./library/Core">
<include name="**/*.php" />
</fileset>
</phpdoc>
</target>
I want to use the new version of phpdocumentor so i installed it with pear
pear install phpdoc/phpDocumentor-alpha
But when I run this command (I found this in the phing docs), jenkins prints "PHP documentor" and then directly marks the build as failed
<target name="phpdoc">
<echo msg="PHP Documentor..." />
<phpdoc2 title="API Documentation" destdir="/var/www/corelib" template="responsive">
<fileset dir="./library/Core">
<include name="**/*.php" />
</fileset>
</phpdoc2>
</target>
I have zendserver installed on this server but that can't be a problem because phpdoc 1.4.4 runs fine
So how do i solve this?
Ok i found the solution, so i post it for future reference
With some help of the people on the irc channel of phpdocumentor
so this a bug with the latest build of phing in combination with the latest version of phpdocumentor. To fix this problem just revert the instalation of phpdocumentor2 to this version
phpDocumentor 2.0.0a3
This will fix the problem with phing and the documentation gets generated with no problem
Related
Since the most recent .NET Core (I am actually using AspNetCore 1.1.2) has replace the project.json file with *.csproj it is still not clear to me where to put the "dotnet bundle", precompile option.
"scripts": {
"precompile": ["dotnet bundle"]
}
Prior the above block of json was found in the project.json file. Any clue where this goes? Is it already in some other configuration file? Below is a link that explains this change, and shows what the *.csproj file equivalent is to the project.json file:
https://learn.microsoft.com/en-us/dotnet/core/tools/project-json-to-csproj
As always, apologies for any incorrect vernacular here, .NET Core is new to me.
You can use Target and Exec to accomplish this in .csproj:
<Target Name="PrepublishScript" BeforeTargets="PrepareForPublish">
<Exec Command=”bower install” EnvironmentVariables=”Path=$(ExternalToolsPath)” />
<Exec Command="dotnet bundle" />
</Target>
See this answer on how to get dotnet bundle to work with new .csproj format.
I have been at it for days. Basically I want to create a HTML report from JMeter test file, using Ant. I am using Linux Ubuntu 16.04.1. Here is my build.xml :
<project name="performance-tests" default="run-performance-tests" basedir=".">
<property name="testpath" value="${user.dir}"/>
<poperty name="jmeter.home" value="/home/richard/Asjad/apache-jmeter-3.0"/>
<!-- Name of test (without .jmx) -->
<property name="test" value="Test"/>
<path id="jmeter.path">
<fileset dir="${basedir}" includes="/*.jar" />
</path>
<target name="run-performance-tests">
<delete dir="${basedir}/target" quiet="true" failonerror="false"/>
<mkdir dir="${basedir}/target"/>
<!-- Allow jar to be picked up locally -->
<path id="jmeter.classpath">
<fileset dir="${basedir}">
<include name="ant-jmeter*.jar"/>
</fileset>
</path>
<taskdef name="jmeter"
classpathref="jmeter.classpath"
classname="org.programmerplanet.ant.taskdefs.jmeter.JMeterTask" />
<echo message="Running load tests in testing.xml"/>
<jmeter
jmeterhome="${jmeter.home}"
testplan ="${testpath}/${test}.jmx"
resultlog="${basedir}/target/JMeterResults.xml">
<jvmarg value="-Xincgc"/>
<jvmarg value="-Xmx512m"/>
<jvmarg value="-Dproperty=value"/>
<property name="request.threads" value="5"/>
<property name="request.loop" value="50"/>
<property name="jmeter.save.saveservice.assertion_results" value="all"/>
<property name="jmeter.save.saveservice.output_format" value="xml"/>
</jmeter>
<xslt in="${basedir}/target/JMeterResults.xml"
out="${basedir}/target/Test.html"
style="${basedir}/jmeter-results-detail-report.xsl"/>
</target>
This is what I see when I run the script:
Buildfile: /home/richard/Asjad/apache-jmeter-3.0/extras/build.xml
run-performance-tests:
[delete] Deleting directory /home/richard/Asjad/apache-jmeter-3.0/extras/target
[mkdir] Created dir: /home/richard/Asjad/apache-jmeter-3.0/extras/target
[echo] Running load tests in testing.xml
[jmeter] Executing test plan: /home/richard/Asjad/apache-jmeter-3.0/extras/TestPlan/Test.jmx ==> /home/richard/Asjad/apache-jmeter-3.0/extras/target/JMeterResults.xml
[jmeter] Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
[jmeter] Writing log file to: /home/richard/Asjad/apache-jmeter-3.0/bin/jmeter.log
[jmeter] Creating summariser <summary>
[jmeter] Created the tree successfully using /home/richard/Asjad/apache-jmeter-3.0/extras/TestPlan/Test.jmx
[jmeter] Starting the test # Fri Jul 29 11:57:25 EEST 2016 (1469782645099)
[jmeter] Waiting for possible Shutdown/StopTestNow/Heapdump message on port 4445
[jmeter] summary = 10 in 00:00:02 = 4.6/s Avg: 214 Min: 105 Max: 344 Err: 0 (0.00%)
[jmeter] Tidying up ... # Fri Jul 29 11:57:27 EEST 2016 (1469782647345)
[jmeter] ... end of run
[xslt] Processing /home/richard/Asjad/apache-jmeter-3.0/extras/target/JMeterResults.xml to /home/richard/Asjad/apache-jmeter-3.0/extras/target/Result_One.html
[xslt] Loading stylesheet /home/richard/Asjad/apache-jmeter-3.0/extras/jmeter-results-detail-report.xsl
BUILD SUCCESSFUL
Total time: 3 seconds
The build succeeds and then it gives me a HTML file and when I open it I see this:
HTML report
I would be really thankful if someone could at least tell me my mistake or direction I am supposed to go.
It looks like JMeter developers broke jmeter-results-detail-report.xsl file, bug was reported here:
https://bz.apache.org/bugzilla/show_bug.cgi?id=59918
It will be fixed in next Apache JMeter version 3.1.
In order to revert to previous behaviour take the following steps:
Download apache-jmeter-2.13.zip
Extract jmeter-results-detail-report_21.xsl file from apache-jmeter-2.13/extras folder and drop it to "extras" folder of your JMeter 3.0 installation
Modify your build.xml file to use jmeter-results-detail-report_21.xsl file like:
<xslt in="${basedir}/target/JMeterResults.xml"
out="${basedir}/target/Test.html"
style="${basedir}/jmeter-results-detail-report_21.xsl"/>
Alternatively you can get XSLT file i.e. from here
See Visualizing JMeter .jtl Files Viewed as An .xsl Stylesheet article for more details on transforming JMeter XML result files to HTML format.
It's a bug that I reported here:
https://bz.apache.org/bugzilla/show_bug.cgi?id=59918
It will be fixed in next Apache JMeter version 3.1 or 3.0.1.
You can test if it's ok by using nightly build present here:
http://jmeter.apache.org/nightly.html
Why still use Ant + xslt to generate a report while since 3.0 you have a new web report with lots of dynamic graphsand tables with significant metrics.
See :
https://jmeter.apache.org/usermanual/generating-dashboard.html
I wanted to create an ANT Script to create build in one click for my Flex Mobile Project.
My app using some native extension file (.ane file). When I tried to run the ANT script it saying -
An implementation for native extension 'com.example.mobile.extensions.NativeFeature' required by the application was not found for the target platform
I'm using the following code to include ane file in ANT Script.
<compiler.external-library-path dir="${basedir}/ane" append="true">
<include name="**/*.ane"/>
</compiler.external-library-path>
Also added the same extensionId in myApp-app.xml file which I used in my extension.xml file.
Solved this problem. Basically I need to add -extdr argument in ADT command. By adding -extdir ${basedir}/ane in ADT command I am able to resolve the problem. Added sample code below.
<target name="package.android" >
<echo message="Packaging for Android"/>
<exec executable="${ADT}" dir="${build.dir}/android">
<arg line="-package
-target apk
-storetype ${build.storetype}
-keystore ${android.cert}
-storepass ${android.cert.password}
${app.name}
${app.name}-app.xml
${app.name}.swf
-extdir ${basedir}/ane
"/>
</exec>
</target>
I am using Flash Builder 4.6 and I am trying to setup up and Ant task to build and run my Flash application. I can get the Ant task to both build and run my application, but it doesn't trace to the console and breakpoints don't work.
I followed the advice of this Stack Overflow post but I keep getting the error:
[exec] Another Flash debugger is probably running; please close it. Details: 'Unrecognized Windows Sockets error: 0: JVM_Bind'.
I also followed this post's advice to properly configure my Ant script in Flash Builder but it doesn't seem to make a difference.
My AS file:
package
{
import flash.display.Sprite;
import flash.text.TextField;
public class HelloAnt extends Sprite
{
public function HelloAnt()
{
var label : TextField = new TextField();
label.text = "Hello World!";
addChild(label);
trace ("Hello World!");
}
}
}
My ANT script:
<?xml version="1.0" encoding="utf-8"?>
<project name="HelloAnt" basedir=".">
<property name="FLEX_HOME" value="C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.6\sdks\4.6.0"/>
<property name="src" value="${basedir}\src"/>
<property name="bin" value="${basedir}\bin"/>
<property name="application" value="${bin}\swf\HelloAnt.swf" />
<taskdef resource="flexTasks.tasks" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar" />
<target name="run">
<echo file="${basedir}/build/.fdbinit">
run ${application}
</echo>
<exec executable="${FLEX_HOME}/bin/fdb.exe" spawn="false" dir="build">
<arg line="-unit"/>
</exec>
</target>
<target name="build">
<mxmlc output="${application}"
file="${src}/HelloAnt.as"
actionscript-file-encoding="UTF-8"
keep-generated-actionscript="false"
optimize="true"
fork="true"
debug="true"
maxmemory="1024m"
static-link-runtime-shared-libraries="true">
<source-path path-element="${FLEX_HOME}/frameworks" />
<source-path path-element="${src}" />
</mxmlc>
</target>
<target name="build-run">
<sequential>
<antcall target="build" />
<antcall target="run" />
</sequential>
</target>
</project>
I am out of ideas. Does anybody have any insight?
If you are using FDB to debug your application then the output will be sent to the terminal window FDB is running in. You can open FDB in Terminal (on Mac) and type "run /path/to/your/application" to connect. Using ANT to call FDB the way you are doing it now, I would think it would run the command and then immediately disconnect. You would need to keep FDB open or debug through Flash Builder (to use it's console).
I'm still checking if there's a way to connect the output to Eclipse's console.
You can see a list of commands available if you double click on fdb in terminal and type help.
More info on FDB here http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7ffb.html#WS2db454920e96a9e51e63e3d11c0bf62063-7ff3
I'm getting the following error when I try to execute WinRT MSTests from the command line:
EXEC : error : Could not start test run for unit tests for Windows Store app: No valid developer license found for running unit tests for Windows Store apps. Please install/renew your developer license..
This used to work, but has suddenly started failing. The odd thing is that they execute fine from within visual studio.
I'm using the following MSBuild task.
<Target Name="UnitTest" DependsOnTargets="Compile" >
<ItemGroup>
<TestAppx Include="$(SolutionDir)\**\*x86*\**\*Tests*.appx" />
</ItemGroup>
<Message Importance="high" Text="Running tests for %(TestAppx.Identity)" />
<Exec Command='"$(VSINSTALLDIR)\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" %(TestAppx.Identity) /InIsolation /platform:x86 /Logger:trx /UseVsixExtensions:true'
WorkingDirectory="$(SolutionDir)"/>
</Target>
Still not exactly sure why VisualStudio and vstest were out-of-sync, but I found a solution.
Open PowerShell as an administrator
Execute: Unregister-WindowsDeveloperLicense
Open the solution in visual studio
Log in to your live account when prompted to re-create your developer licence
Source: http://msdn.microsoft.com/en-us/library/windows/apps/hh974578.aspx#getting_a_developer_license_at_a_command_prompt