wso2esb - CAR file un-deployment does not remove artifacts with custom ServerRole - WSO2 ESB 5.0.0 -


i building car files maven. sample artifact file of esb config project

<?xml version="1.0" encoding="utf-8"?> <artifacts>  <artifact name="local-ep" groupid="com.example.sample.endpoint" version="1.0.0" type="synapse/endpoint" serverrole="localrole">         <file>src/main/synapse-config/endpoints/local/sample-ep.xml</file>   </artifact> 

this sample pom file of carbon application project

<?xml version="1.0" encoding="utf-8"?> <project xsi:schemalocation="http://maven.apache.org/pom/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"   xmlns="http://maven.apache.org/pom/4.0.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance">   <modelversion>4.0.0</modelversion>   <groupid>com.example.samplecompositeapplication</groupid>   <artifactid>samplecompositeapplication</artifactid>   <packaging>carbon/application</packaging>   <name>samplecompositeapplication</name>   <description>samplecompositeapplication</description>   <parent>         <groupid>com.example</groupid>         <artifactid>rootesb</artifactid>         <relativepath>../rootesb/pom.xml</relativepath>         <version>1.0.0</version>   </parent>   <properties>         <artifact.types>jaggery/app=zip,synapse/priority-executor=xml,synapse/inbound-endpoint=xml,service/rule=aar,synapse/message-store=xml,event/stream=json,service/meta=xml,synapse/proxy-service=xml,bpel/workflow=zip,synapse/sequence=xml,synapse/endpointtemplate=xml,carbon/application=car,wso2/gadget=dar,synapse/api=xml,synapse/event-source=xml,synapse/message-processors=xml,event/receiver=xml,lib/dataservice/validator=jar,synapse/template=xml,synapse/endpoint=xml,lib/carbon/ui=jar,lib/synapse/mediator=jar,event/publisher=xml,synapse/local-entry=xml,synapse/task=xml,webapp/jaxws=war,registry/resource=zip,synapse/configuration=xml,service/axis2=aar,synapse/lib=zip,synapse/sequencetemplate=xml,event/execution-plan=siddhiql,service/dataservice=dbs,web/application=war,lib/library/bundle=jar</artifact.types>          <!-- local endpoints -->         <com.example.sample.endpoint_._local-ep>capp/localrole</com.example.sample.endpoint_._local-ep> <dependencies>         <dependency>               <groupid> com.example.sample.endpoint</groupid>               <artifactid>local-ep</artifactid>               <version>1.0.0</version>               <type>zip</type>         </dependency>   </dependencies> <repositories>         <repository>               <releases>                     <enabled>true</enabled>                     <updatepolicy>daily</updatepolicy>                     <checksumpolicy>ignore</checksumpolicy>               </releases>               <id>wso2-nexus</id>               <url>http://maven.wso2.org/nexus/content/groups/wso2-public/</url>         </repository>         <repository>               <id>wso2-maven2-repository-1</id>               <url>http://dist.wso2.org/maven2</url>         </repository>         <repository>               <id>wso2-nexus-repository-1</id>               <url>http://maven.wso2.org/nexus/content/groups/wso2-public/</url>         </repository>   </repositories>   <pluginrepositories>         <pluginrepository>               <releases>                     <enabled>true</enabled>                     <updatepolicy>daily</updatepolicy>                     <checksumpolicy>ignore</checksumpolicy>               </releases>               <id>wso2-nexus</id>               <url>http://maven.wso2.org/nexus/content/groups/wso2-public/</url>         </pluginrepository>         <pluginrepository>               <id>wso2-maven2-repository-1</id>               <url>http://dist.wso2.org/maven2</url>         </pluginrepository>         <pluginrepository>               <id>wso2-nexus-repository-1</id>               <url>http://maven.wso2.org/nexus/content/groups/wso2-public/</url>         </pluginrepository>   </pluginrepositories>   <build>         <plugins>               <plugin>                     <artifactid>maven-eclipse-plugin</artifactid>                     <version>2.9</version>                     <configuration>                           <buildcommands />                           <projectnatures>                           <projectnature>org.wso2.developerstudio.eclipse.distribution.project.nature</projectnature>                           </projectnatures>                     </configuration>               </plugin>               <plugin>                     <groupid>org.wso2.maven</groupid>                     <artifactid>maven-car-plugin</artifactid>                     <version>2.1.1</version>                     <extensions>true</extensions>                     <executions>                           <execution>                                 <id>car</id>                                 <phase>package</phase>                                 <goals>                                       <goal>car</goal>                                 </goals>                           </execution>                     </executions>                     <configuration />               </plugin>               <plugin>                     <groupid>org.wso2.maven</groupid>                     <artifactid>maven-car-deploy-plugin</artifactid>                     <version>1.1.1</version>                     <extensions>true</extensions>                     <configuration>                           <carbonservers>                                 <carbonserver>                                      <truststorepath>src/main/resources/wso2carbon.jks</truststorepath>                                       <truststorepassword>wso2carbon</truststorepassword>                                       <truststoretype>jks</truststoretype>                                       <serverurl>https://${serverhost}:${esbport}</serverurl>                                       <username>admin</username>                                       <password>***</password>                                       <operation>deploy</operation>                                 </carbonserver>                           </carbonservers>                     </configuration>               </plugin>         </plugins>   </build> </project> 

i have added localrole esb. when deploy car file, see local-ep getting deployed correctly. when click carbon application in management console, under carbon applications->list, not able see endpoint in artifacts list. when undeploy carbon application management console, gets undeployed endpoint not removed. if try delete management console, doesn’t deleted. if restart esb, automatically removed.

i see accepted answer here -removing application in wso2 esb not remove components can't have different component names endpoints defeats purpose of having server roles. esb call sample-ep time. local-ep or test-ep depending on server role.

could please let me know if missing or if bug in esb? pain because affects automated deployments. when try mvn deploy, fails in re-deploying car file says duplicate endpoint found. requires restart everytime fix issue. appreciated.


Comments