Hi Devs,
I have tried to build the patch-release pom with a clean repo and realized
there are some stubs which has failed during the code gen time. But we do
not notice it because the build does not fail (an exception is thrown and
the build goes on).
As a solution pradeep has suggested to add axis2-client, axiom and axis2
dependencies. Following is a segment extracted from a stub pom.xml
<configuration>
<tasks>
<path id="wsdl2java.classpath">
<pathelement
location="${settings.localRepository}/org/apache/ws/commons/axiom/wso2/axiom/
*${orbit.version.axiom}/axiom-${orbit.version.axiom}.jar*"/>
<pathelement
location="${settings.localRepository}/org/apache/axis2/wso2/axis2-client/*
${orbit.version.axis2}/axis2-client-${orbit.version.axis2}.jar*"/>
<pathelement
location="${settings.localRepository}/org/apache/axis2/wso2/axis2/*
${orbit.version.axis2}/axis2-${orbit.version.axis2}.jar*"/>
</path>
<java
classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
<arg line="-uri
src/main/resources/CEPStatisticsAdmin.wsdl -u -uw -o target/generated-code
-p org.wso2.carbon.cep.statistics.stub -ns2p
http://data.internal.statistics.cep.carbon.wso2.org/xsd=org.wso2.carbon.cep.statistics.stub.types.carbon,http://statistics.cep.carbon.wso2.org=org.wso2.carbon.cep.statistics.stub.types.carbon,http://org.apache.axis2/xsd=org.wso2.carbon.cep.statistics.stub.types.carbon
"/>
<classpath refid="wsdl2java.classpath"/>
*<classpath
refid="maven.dependency.classpath"/>
<classpath
refid="maven.compile.classpath"/>
<classpath
refid="maven.runtime.classpath"/>*
</java>
</tasks>
</configuration>
Pradeep, did you mean to upgrade the versions which I have higlighted in *
black*?
I also realized, if I put the lines in red, code gen is working fine (but I
dont know what are those classpaths).
Can you please advice on the correct way to fix this?
thanks,
AmilaM.
---------- Forwarded message ----------
From: Pradeep Fernando <[email protected]>
Date: Wed, Aug 22, 2012 at 5:21 PM
Subject: Re: [Dev] rest-api stub build failure
To: dev <[email protected]>
hi,
the root cause of this error:
People have copy-pasted the stub generation pom files. However the
axis2-client / axiom / axis2 dependencies still refers to old versions.
However, those will not get downloaded in to your local repo, until you
refer them as a dependency.
hence build failure (Only in a clean repo). Please update all the new stub
generation pom files with new versions.
here is the list of stub jars.
<module>../../../service-stubs/org.wso2.carbon.rest.api.stub/4.0.1</module>
<module>../../../service-stubs/org.wso2.carbon.mediation.library.stub/4.0.1</module>
<module>../../../service-stubs/org.wso2.carbon.analytics.hive.stub/4.0.1</module>
<module>../../../service-stubs/org.wso2.carbon.bam.toolbox.deployer.stub/4.0.1</module>
<module>../../../service-stubs/org.wso2.carbon.webapp.mgt.stub/4.0.1</module>
<module>../../../service-stubs/org.wso2.carbon.identity.sso.saml.stub/4.0.1</module>
<module>../../../service-stubs/org.wso2.carbon.cloud.gateway.stub/4.0.1</module>
<module>../../../service-stubs/org.wso2.carbon.cloud.gateway.agent.stub/4.0.1</module>
<module>../../../service-stubs/org.wso2.carbon.cep.stub/4.0.1</module>
@Maheshika : are we building the packs with a clean repo, if so, why the
bamboo builder does not encounter these issues. It is really important to
build the patch-releases with a clean repo in each and every build.
thanks,
--Pradeep
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev
--
*Amila Maharachchi*
Technical Lead
Member, Management Committee - Cloud & Platform TG
WSO2, Inc.; http://wso2.com
Blog: http://maharachchi.blogspot.com
Mobile: +94719371446
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev