wso2 / msf4j

WSO2 Microservices Framework for Java (MSF4J)
http://wso2.com/products/microservices-framework-for-java/
Apache License 2.0
401 stars 349 forks source link

missing "Microservices:" in META-INF #550

Open antonioluzzi opened 5 years ago

antonioluzzi commented 5 years ago

I m developing a microservice and I have used maven to generate my project: mvn archetype:generate -DarchetypeGroupId=org.wso2.msf4j \ -DarchetypeArtifactId=msf4j-microservice -DarchetypeVersion=2.6.4 \ -DgroupId=it.telcolab -DartifactId=CMIS-Service -Dversion=0.1-SNAPSHOT \ -Dpackage=it.telcolab.service -DserviceClass=CmisService

When I execute maven install, the generated .jar have a Manifest with main class and no Microsevices element. This is my pom:

4.0.0 it.telcolab CMIS-Service 0.0.1-SNAPSHOT org.wso2.msf4j msf4j-service 2.6.4 org.apache.httpcomponents httpmime 4.5.6 test org.testng testng 6.14.3 test UTF-8 1.8 it.telcolab.service.Application it.telcolab.service.CmisService

I can't deploy my microservice because the manifest isn't correct: I have the following exception:

Caused by: org.wso2.msf4j.internal.deployer.MicroserviceDeploymentException: Manifest entry 'microservices' not found: /usr/lib/wso2/wso2ei/6.4.0/wso2/msf4j/deployment/microservices/CMIS-Service-0.0.1-SNAPSHOT.jar

The manifest is the following:

_Manifest-Version: 1.0 Implementation-Title: CMIS-Service Implementation-Version: 0.0.1-SNAPSHOT Archiver-Version: Plexus Archiver Built-By: ubuntu18 Specification-Vendor: WSO2 Specification-Title: CMIS-Service Implementation-Vendor-Id: it.telcolab Implementation-Vendor: WSO2 Main-Class: it.telcolab.service.Application Created-By: Apache Maven 3.3.9 Build-Jdk: 1.8.0_171 Specification-Version: 0.0.1-SNAPSHOT Implementation-URL: http://www.wso2.org/CMIS-Service/_

Can you help me? Please. Regards Antonio

thusithathilina commented 5 years ago

I believe this is somewhat related to your issue #551. Hope the answer over there clear out your issues. Basically, if you use maven archtype to create a msf4j application, it is in standalone mode. Standalone mode MSF4J apps can't be deployed in EI.