I'm trying out apachecxf 2.3.0 and i'm having problems using the wsdlToJava tool. No matter what, i get an WSDLToJava Error: java.lang.reflect.UndeclaredThrowableException. Tried an older version 2.1 and it works fine on the same WSDL.
Are anyone else having the same problem with this version?
Add -frontend jaxws21 as jdk6 has 2.1 jaxb builtin while 2.3 is trying to use 2.2 jaxb(or put 2.2 jaxb into your jdk so it uses that instead of 2.1)....
<java classname="org.apache.cxf.tools.wsdlto.WSDLToJava" fork="true" failonerror="true">
<arg value="-impl"/>
<arg value="-d"/>
<arg value="${gen.src}"/>
<arg value="-frontend"/>
<arg value="jaxws21"/>
<arg value="${input}/schemas/enrollment.wsdl"/>
<classpath>
<path refid="cxf.classpath"/>
</classpath>
</java>
Related
When I try to run the following Ant script, which executes the "npm" command:
<target name ="test">
<exec executable="npm" failonerror="true">
<arg value="install" />
</exec>
</target>
It fails with this error:
Execute failed: java.io.IOException: Cannot run program "npm"
(in directory "C:\Development\workspace\traqpath\WebSource"):
CreateProcess error=2, The system cannot find the file specified
The same happens when I try to run the Angular-CLI "ng" command:
<target name ="test">
<exec executable="ng" failonerror="true">
<arg value="build"/>
<arg value="--prod"/>
<arg value="--bh"/>
</exec>
</target>
With the same error message, but for "ng":
Execute failed: java.io.IOException: Cannot run program "ng"
(in directory "C:\Development\workspace\traqpath\WebSource"):
CreateProcess error=2, The system cannot find the file specified
Both commands run without problems in the Windows Command Line, which means NodeJS installation is right, and NodeJS path is properly configured in the PATH system variable.
I solved the problem by modifying the Ant script to specify the full name of the "npm" executable, (and the "ng" command in the second case):
My new Ant Scripts look like this now:
<target name ="test">
<exec executable="npm.cmd" failonerror="true">
<arg value="install" />
</exec>
</target>
<target name ="test">
<exec executable="ng.cmd" failonerror="true">
<arg value="build"/>
<arg value="--prod"/>
<arg value="--bh"/>
</exec>
</target>
Notice that I used "npm.cmd" instead of "npm", and "ng.cmd" instead of "ng".
I solved it similar to your solution, except I invoked "npm build" which is included by default in the package.json under "scripts" section.
<target name="build_windows">
<exec executable="npm.cmd" failonerror="true">
<arg value="run-script"/>
<arg value="build"/>
</exec>
</target>
I even introduced another npm script line similar to "build" named "buildprod" like this:
"scripts": {
"build": "ng build -bh /context/",
"buildprod": "ng build --prod --aot -bh /context/"
}
And then introduced a similar target in my ant build.xml file for the production build something like this:
<target name="build_prod_windows">
<exec executable="npm.cmd" failonerror="true">
<arg value="run-script"/>
<arg value="buildprod"/>
</exec>
</target>
That way, you can keep the same ant script in other angular projects, and don't have to worry about keeping different arguments in your build.xml file. Instead, you'll need to ensure your package.json has correct scripts.
<target name ="test">
<exec executable="ng" failonerror="true">
<arg value="build"/>
<arg value="--prod"/>
<arg value="--bh"/>
</exec>
</target>
When i try to run in linux , its again give the same error, saying
Execute failed: java.io.IOException: Cannot run program "ng" ....
How to run in linux env through ANT
I am trying to integrate my Jenkins with SOAP UI through Ant.
Below is my build.xml file.
<project name="RegressionTests" default="soapui-tests" basedir=".">
<description>Run the soapUI Regression Tests</description>
<!-- <property file="build.properties"/> -->
<property name="soapUITest.home" value="C:\Regression_Test"/>
<property name="SOAP_UI_PROJ_FILE" value="${SOAP_UI_PROJ_FILE}" />
<property name="SOAP_UI_TEST_SUITE" value="${SOAP_UI_TEST_SUITE}" />
<property name="SOAP_UI_TEST_CASE" value="${SOAP_UI_TEST_CASE}" />
<property name="SOAP_UI_TEST_REPORT" value="${SOAP_UI_TEST_REPORT}" />
<target name="checkos">
<condition property="testrunner.cmd" value="${soapUITest.home}\bin\testrunner.bat">
<os family="windows" />
</condition>
</target>
<target name="soapui-tests" depends="checkos">
<exec executable="${testrunner.cmd}"
failonerror="yes"
failifexecutionfails="yes" >
<arg value="${SOAP_UI_PROJ_FILE}"/>
<arg value="${SOAP_UI_TEST_SUITE}"/>
<arg value="${SOAP_UI_TEST_CASE}"/>
<arg value="${SOAP_UI_TEST_REPORT}"/>
</exec>
</target>
</project>
Now testrunner.bat calls SOAPUI testrunner batch file.
#echo off
set SOAP_UI_PROJ_FILE=%1
set SOAP_UI_TEST_SUITE=%2
set SOAP_UI_TEST_CASE=%3
set SOAP_UI_TEST_REPORT=%4
#echo off
set RESOURCE_HOME="C:\Regression_Test\resources"
set SOAP_UI_RESOURCE_FILE="%RESOURCE_HOME%/%SOAP_UI_PROJ_FILE%"
"C:\Program Files\SmartBear\SoapUI-5.2.1\bin\testrunner.bat" -s%SOAP_UI_TEST_SUITE% -c%SOAP_UI_TEST_CASE% -r -a -f"%SOAP_UI_TEST_REPORT%" %SOAP_UI_RESOURCE_FILE%
While I try to run from Jenkins
I see below SOAP UI is running for indefinite time but no error
Jenkins Log
I ran the same from command line argument and completed within seconds.
Can anyone suggest why the SOAPUI tests are running indefinitely in Jenkins
Thanks,
Ayan Bhattacharyya
I had the same issue. Check where the soapui-settings is being loaded from. When I ran from Jenkins, it was looking at C:\soapui-settings.xml which does not exist, as compared to running from the command prompt which was pointing to the correct file. After copying soapui-settings.xml to the C:\ drive, the Jenkins build completed successfully. Hope this helps.
11:42:45,088 INFO [DefaultSoapUICore] initialized soapui-settings from [C:\soapui-settings.xml]
I am successful in writing the Nant script to Publish the code for Database.
<project name="Local-Deploy" basedir="." default="publish_code">
<property name="MSBuildPath" value="C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe"/>
<property name="Solution_file_path" value="xxx.WebUI/xxxWebUI.csproj"/>
<property name="Published_path" value="C:\demo\Publish_code"/>
<target name="publish_code">
<exec program="${MSBuildPath}">
<arg line='"${Solution_file_path}"'/>
<arg line='/property:Configuration="TEST";DeployOnBuild=true;PublishProfile=Local-Deploy;_PackageTempDir=${Published_path}'/>
<arg value="/target:Build" />
</exec>
</target>
</project>
How can I write Nant script for publish the code to target Database connection should be xxx.amazonaws.com and it should use SQL server authentication with username XXX and Password xxx.
Please suggest me.
Thanks is advance. :)
As per : Using NAnt to deploy the database:
<target name="test">
<property name="test.script" value="${dir.sql}/test.sql"/>
<property name="test.connstring"
value="Provider=SQLOLEDB;Server=localhost;Database=nHello;User ID=nHelloUser;Password=showme"/>
<echo file="${test.script}" message="execute p_GetMessage;"/>
<echo message="* Connecting to ${test.connstring}"/>
<echo message="* Executing ${path::get-file-name(test.script)}"/>
<sql connstring="${test.connstring}" delimiter=";" delimstyle="Normal" source="${test.script}"/>
</target>
While upgrading our production server to ubuntu 14 the solr/jetty broke.
To fix i tried:
- upgraded java version to 8.
- upgraded solr to 5.3
My earlier config used .war files. realized that now its stopped supporting .war files, so now cannot use my earlier config.
This was the steps i used earlier:
copy the solr.war file from the downloaded and untarred solr to the webapps folder, and make jetty owner:
sudo cp ~/x/apache-solr-3.6.1/dist/apache-solr-3.6.1.war /usr/share/jetty/webapps/solr.war
sudo chown jetty:jetty /usr/share/jetty/webapps/solr.war
create a context file in JETTY_HOME/contexts (sudo vim /usr/share/jetty/contexts/solr.xml)
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
<!-- Set the solr.solr.home system property -->
<Configure class="org.mortbay.jetty.webapp.WebAppContext">
<Call name="setProperty" class="java.lang.System">
<Arg type="String">solr.solr.home</Arg>
<Arg type="String">/usr/share/solr</Arg>
</Call>
</Configure>
tell solr how many cores we have and what those are in SOLR_HOME (sudo vim /usr/share/solr/solr.xml):
<solr persistent="true" sharedLib="lib">
<cores adminPath="/admin/cores">
<core name="demo" instanceDir="demo" />
<core name="dev" instanceDir="dev" />
<core name="qa" instanceDir="qa" />
<core name="www" instanceDir="www" />
</cores>
</solr>
etc.
Don't want to use the solr instance that comes with rsolr (4), if i can help it. But can't find corresponding info for solr 5.3
Running rails 3.2.21. and solr_sunspot gem 2.2.0
Thanks in advance!
I'm able to deploy my App Engine project from the command line using appcfg.sh without a problem. I'd like to get this to work in Jenkins but the problem is the deploy utility prompts for my Google password. I can pass in the email using the --email parameter but there's no way to pass in the password (please don't suggest using --passin b/c that's not what it's for).
The best case senario I can think of is that when someone runs the Jenkins job it asks for the username/password then and runs the deploy using that.
But I'd settle for any way to get it working at this point. Thanks.
If you don't mind your password to be visible in plaintext, this is what I use on my build XML to auto-deploy my app from Jenkins:
<target name="update"
depends="enhance"
description="Uploads the application, including indexes">
<java classname="com.google.appengine.tools.admin.AppCfg"
inputstring="<YOUR_PASSWORD>"
classpath="${appengine.sdk}\lib\appengine-tools-api.jar">
<classpath>
<fileset dir="${war.dir}/WEB-INF/lib" includes="**/*.jar" />
</classpath>
<arg value="--email=<YOUR_EMAIL>" />
<arg value="--passin" />
<arg value="update" />
<arg value="war" />
</java>
</target>
Where appengine.sdk points to your GAE folder, i.e.
<property name="appengine.sdk" location="D:\libs\appengine-java-sdk-1.5.1"/>.