I have the following error when trying to generate classes from my wsdl:
Failed to execute goal org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.12.3:generate (CreateWebServiceAccountV1) on project hblws.test: Execution CreateWebServiceAccountV1 of goal org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.12.3:generate failed: can't parse argument number: ''http://java.sun.com/xml/ns/jaxb'': For input string: "''http://java.sun.com/xml/ns/jaxb''" -> [Help 1]
I have one wsdl file and multiple XSD/XJB. XJB have following namespace : xmlns="http://java.sun.com/xml/ns/jaxb"
Here is the code of pom.xml that execute the JAXB/XJC generation :
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.12.3</version>
<executions>
<!-- CreateWebServiceAccount V1 -->
<execution>
<id>CreateWebServiceAccountV1</id>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<sourceDestDir>
${project.build.directory}/generated-sources
</sourceDestDir>
<wsdlFiles>
<wsdlFile>CreateWebServiceAccountV1.wsdl</wsdlFile>
</wsdlFiles>
<wsdlDirectory>${basedir}/src/main/webapp/WEB-INF/wsdl/</wsdlDirectory>
<verbose>true</verbose>
<bindingFiles>
<bindingFile>${basedir}/src/main/webapp/META-INF/wsdl/CreateWebServiceAccountV1.xjb</bindingFile>
<bindingFile>${basedir}/src/main/webapp/META-INF/wsdl/CreateWebServiceAccountV1Model.xjb</bindingFile>
<bindingFile>${basedir}/src/main/webapp/META-INF/wsdl/SystemFault-v1.xjb</bindingFile>
</bindingFiles>
<staleFile>${project.build.directory}/jaxws/stale/wsdl.CreateWebServiceAccountV1.done</staleFile>
<schemaDirectory>${basedir}/src/main/webapp/META-INF/wsdl/</schemaDirectory>
</configuration>
</execution>
</executions>
</plugin>
Thanks in advance for your help !
This is a bug of JDK,see JDK-8204933.
Solution, change locale to en, the others will fail:
<configuration>
<locale>en</locale>
<configuration>
The English (and portuguese) version correctly quote
, all other localizations replace this with the faulty
For me, this plugin tell me the true cause:
org.xml.sax.SAXParseException: not an external binding file. The root element must be {http://java.sun.com/xml/ns/jaxb}bindings but it is {https://java.sun.com/xml/ns/jaxb}bindings
Related
I want to use wagon-maven-plugin with download-single goal from a correct url but maven says:
Error handling resource: Resource missing at http://myurl/from/file%3FWSDL 404 Not Found -> [Help 1]
Here is the plugin definition:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>wagon-maven-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<id>fetch-wsdl</id>
<phase>initialize</phase>
<goals>
<goal>download-single</goal>
</goals>
<configuration>
<url>http://myurl</url>
<fromFile>from/file?WSDL</fromFile>
<toFile>${project.basedir}/src/main/resources/wsdl/Consumer.wsdl</toFile>
</configuration>
</execution>
</executions>
</plugin>
The problem here is I have a query symbol in my url but wagon-maven-plugin replace it by %3F.
for example: It converts http://myurl/from/file?WSDL to http://myurl/from/file%3FWSDL
Are there anyone who face this issue as well?
Note: If I use with another url without query symbol it works.
Well, It is a known issue that it does not work with query symbol. I am going to use another plugin maven-download-plugin.
I have such plugin configuration in my pom.xml
<plugins>
<plugin>
<groupId>com.lazerycode.jmeter</groupId>
<artifactId>jmeter-maven-plugin</artifactId>
<version>${jmeter.maven.plugin.version}</version>
<configuration>
<jmeterExtensions>
<artifact>kg.apc:jmeter-plugins-json:2.4</artifact>
<artifact>kg.apc:jmeter-plugins-casutg:2.1</artifact>
</jmeterExtensions>
<junitLibraries>
<artifact>com.microsoft.sqlserver:sqljdbc4:4.0</artifact>
</junitLibraries>
<testFilesIncluded>
<jMeterTestFile>${tests.include}</jMeterTestFile>
</testFilesIncluded>
<jMeterProcessJVMSettings>
<xms>2048</xms>
<xmx>2048</xmx>
</jMeterProcessJVMSettings>
<customPropertiesFiles>
<!-- Custom property file -->
</customPropertiesFiles>
<propertiesJMeter>
<!-- Some properties that I pass into jmeter -->
</propertiesJMeter>
</configuration>
<executions>
<execution>
<id>jmeter-tests</id>
<phase>verify</phase>
<goals>
<goal>jmeter</goal>
</goals>
</execution>
</executions>
</plugin>
After I run mvn clean verify I get such libsat /target/jmeter/lib/:
json-path-2.1.0.jar
json-path-2.2.0.jar
and in log file I see that jmeter fails from time to time with such exception:
jmeter.extractor.json.jsonpath.JSONPostProcessor: Error processing JSON content in Select Team Name, message:Could not compile inline filter : [?(#.id=="29011")]
Note that this [?(#.id=="29011")] is only a part of expression. Full expression is looks like similar to this: $.teamData[?(#.id=="29011")].name
I expect that this error somehow related to this multiple libs
Use last version of the plugin which has solved this issue as described in release notes:
https://github.com/jmeter-maven-plugin/jmeter-maven-plugin/blob/master/CHANGELOG.md
I do some test with SoapUI Plugin :
I want to integrate this test with Maven / Jenkins. Test are ok when I used the SoapUI tool. But when I used the following pom file
<plugin>
<groupId>com.github.redfish4ktc.soapui</groupId>
<artifactId>maven-soapui-extension-plugin</artifactId>
<version>4.6.4.2</version>
<executions>
<execution>
<id>SoapUITestOnDITx</id>
<phase>integration-test</phase>
<goals>
<goal>test-multi</goal>
</goals>
<configuration>
<projectFiles>
<scan>
<baseDirectory>src/test/ressources</baseDirectory>
<includes>
<include>*.xml</include>
</includes>
<excludes>
<exclude>*ToExclude*.xml</exclude>
</excludes>
</scan>
</projectFiles>
<outputFolder>target/soapui/</outputFolder>
<junitReport>true</junitReport>
<useOutputFolderPerProject>true</useOutputFolderPerProject>
<exportAll>true</exportAll>
<junitHtmlReport>false</junitHtmlReport>
<testFailIgnore>true</testFailIgnore>
<host>${soapui.host}</host>
<username>${soapui.username}</username>
<password>${soapui.password}</password>
</configuration>
</execution>
</executions>
</plugin>
But when I run my test with maven` I got the following error :
ASSERTION FAILED -> XPathContains assertion failed for path [count(//initialInfos/item)>0] : RuntimeException: Trying XBeans path engine... Trying XQRL... Trying delegated path engine...
FAILED on count(//initialInfos/item)>0
whereas my response is good (at least one item is present in the response)
It seems that an dependency is missing but what's the dependency ?
I am trying to overwrite the following property in maven using gmaven:
<build>
<plugins>
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>gmaven-plugin</artifactId>
<executions>
<execution>
<id>setproperty</id>
<phase>validate</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<source>
pom.properties['main.build.directory']=project.parent.build.directory.absolutePath.replace('\\','/');
</source>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
But I get this error:;
[ERROR] Failed to execute goal org.codehaus.gmaven:gmaven-plugin:1.5:execute (setproperty) on project my-project: startup failed, script139276
2592853.groovy: 1: expecting ''', found '<EOF>' # line 1, column 84.
[ERROR] 1 error
What is wrong with the above groovy snippet?
Value of a property which is set using gmavenplus-plugin displays correctly when accessed using the plugin. It will display correctly even if it is accessed using different instances of the same plugin.
Problem arises when value of a property which is already initialized outside the plugin is altered by the plugin and it is accessed outside the plugin. Now the value of the property is not the value as updated by plugin. The updated value is now scoped within the plugin. As a workaround to solve this issue if a property has to be updated by the plugin and is required to be accessed outside the scope of plugin: do not declare or initialize it, in case it needs to be then declare and initialize the property through the plugin.
I agree with #khmarbaise that this is a little weird to do, but if you must...I'm not sure offhand why it isn't working. That plugin isn't really maintained anymore. <shamelessPlug>I think this should work:
<plugin>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<id>setproperty</id>
<phase>validate</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<scripts>
<script><![CDATA[project.properties['main.build.directory']=project.parent.build.directory.replace('\\','/')]]></script>
</scripts>
</configuration>
</execution>
</executions>
</plugin>
For more info on this mojo, check out http://groovy.github.io/GMavenPlus/execute-mojo.html.
</shamelessPlug>. However, be aware that I believe this will be scoped within the plugin.
This is part of my pom.xml of my .ear file
<plugin>
<groupId>com.oracle.weblogic</groupId>
<artifactId>wls-maven-plugin</artifactId>
<version>12.1.1.0</version>
<configuration>
<adminurl>${adminURL}</adminurl>
<user>${username}</user>
<password>${pswrd}</password>
<upload>true</upload>
<remote>false</remote>
<verbose>true</verbose>
<source>${project.build.directory}/${project.build.finalName}.${project.packaging}</source>
<name>${project.build.finalName}</name>
<targets>${serverName}</targets>
<noExit>true</noExit>
<middlewareHome>${middlewareH}</middlewareHome>
<domainHome>${domainH}</domainHome>
</configuration>
<executions>
<execution>
<id>stopserver</id>
<phase>install</phase>
<goals>
<goal>stop-server</goal>
</goals>
<configuration>
<action>stopserver</action>
<workingDir>${stopScriptDirectory}</workingDir>
<command>stopScript.sh</command>
</configuration>
</execution>
</executions>
</plugin>
I am trying to stop the server by running the stopScript.sh
This is the error I am getting when it is trying to execute the stop-server goal:
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.oracle.weblogic:wls-maven-plugin:12.1.1.0:stop-server (stopserver) on project OventusEAR2: Unable to parse configuration of mojo com.oracle.weblogic:wls-maven-plugin:12.1.1.0:stop-server for parameter command: Cannot assign configuration entry 'command' with value 'stopScript.sh' of type java.lang.String to property of type java.lang.String[]
Any ideas?
Though I am not familiar with this particular plugin, however I have seen similar issues before, I guess command parameter is expecting an array instead.
Please try replacing
<command>stopScript.sh</command>
with
<command>
<value>stopScript.sh</value>
</command>
and test again.