WSO2 MSF4J - Maven 编译器示例
WSO2 MSF4J - Maven Compiler Sample
我对 Maven Compiler Hellow-Service 示例有疑问。
响应:Unable to add module to the current project as it is not of packaging type 'pom' -> [Help 1]
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building WSO2 MSF4J Microservice 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:2.4:generate (default-cli) @ Hello-Service >>>
[INFO]
[INFO] <<< maven-archetype-plugin:2.4:generate (default-cli) @ Hello-Service <<<
[INFO]
[INFO] --- maven-archetype-plugin:2.4:generate (default-cli) @ Hello-Service ---
[INFO] Generating project in Interactive mode
[INFO] Archetype repository not defined. Using the one from [org.wso2.msf4j:msf4j-microservice:1.0.0] found in catalog remote
[INFO] Using property: groupId = org.example
[INFO] Using property: artifactId = Hello-Service
[INFO] Using property: version = 1.0.0-SNAPSHOT
[INFO] Using property: package = br.teste.service
[INFO] Using property: serviceClass = HelloService
Confirm properties configuration:
groupId: org.example
artifactId: Hello-Service
version: 1.0.0-SNAPSHOT
package: br.teste.service
serviceClass: HelloService
Y: : y
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Archetype: msf4j-microservice:1.0.0
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: org.example
[INFO] Parameter: artifactId, Value: Hello-Service
[INFO] Parameter: version, Value: 1.0.0-SNAPSHOT
[INFO] Parameter: package, Value: br.teste.service
[INFO] Parameter: packageInPathFormat, Value: br/teste/service
[INFO] Parameter: package, Value: br.teste.service
[INFO] Parameter: version, Value: 1.0.0-SNAPSHOT
[INFO] Parameter: groupId, Value: org.example
[INFO] Parameter: serviceClass, Value: HelloService
[INFO] Parameter: artifactId, Value: Hello-Service
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Skipping WSO2 MSF4J Microservice
[INFO] This project has been banned from the build due to previous failures.
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.359s
[INFO] Finished at: Wed Mar 16 15:05:44 BRT 2016
[INFO] Final Memory: 22M/265M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.4:generate (default-cli) on project Hello-Service: org.apache.maven.archetype.exception.InvalidPackaging: Unable to add module to the current project as it is not of packaging type 'pom' -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
POM.XML
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.wso2.msf4j</groupId>
<artifactId>msf4j-service</artifactId>
<version>1.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.example</groupId>
<artifactId>Hello-Service</artifactId>
<version>1.0.0-SNAPSHOT</version>
<name>WSO2 MSF4J Microservice</name>
<properties>
<microservice.mainClass>org.example.service.Application</microservice.mainClass>
</properties>
</project>
您使用的是旧版本的源代码。我可以从您的模块工件名称中识别它。可以找到相关的pom文件here
我可以毫无问题地编译最新的源代码。
我对 Maven Compiler Hellow-Service 示例有疑问。
响应:Unable to add module to the current project as it is not of packaging type 'pom' -> [Help 1]
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building WSO2 MSF4J Microservice 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:2.4:generate (default-cli) @ Hello-Service >>>
[INFO]
[INFO] <<< maven-archetype-plugin:2.4:generate (default-cli) @ Hello-Service <<<
[INFO]
[INFO] --- maven-archetype-plugin:2.4:generate (default-cli) @ Hello-Service ---
[INFO] Generating project in Interactive mode
[INFO] Archetype repository not defined. Using the one from [org.wso2.msf4j:msf4j-microservice:1.0.0] found in catalog remote
[INFO] Using property: groupId = org.example
[INFO] Using property: artifactId = Hello-Service
[INFO] Using property: version = 1.0.0-SNAPSHOT
[INFO] Using property: package = br.teste.service
[INFO] Using property: serviceClass = HelloService
Confirm properties configuration:
groupId: org.example
artifactId: Hello-Service
version: 1.0.0-SNAPSHOT
package: br.teste.service
serviceClass: HelloService
Y: : y
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Archetype: msf4j-microservice:1.0.0
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: org.example
[INFO] Parameter: artifactId, Value: Hello-Service
[INFO] Parameter: version, Value: 1.0.0-SNAPSHOT
[INFO] Parameter: package, Value: br.teste.service
[INFO] Parameter: packageInPathFormat, Value: br/teste/service
[INFO] Parameter: package, Value: br.teste.service
[INFO] Parameter: version, Value: 1.0.0-SNAPSHOT
[INFO] Parameter: groupId, Value: org.example
[INFO] Parameter: serviceClass, Value: HelloService
[INFO] Parameter: artifactId, Value: Hello-Service
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Skipping WSO2 MSF4J Microservice
[INFO] This project has been banned from the build due to previous failures.
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.359s
[INFO] Finished at: Wed Mar 16 15:05:44 BRT 2016
[INFO] Final Memory: 22M/265M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.4:generate (default-cli) on project Hello-Service: org.apache.maven.archetype.exception.InvalidPackaging: Unable to add module to the current project as it is not of packaging type 'pom' -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
POM.XML
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.wso2.msf4j</groupId>
<artifactId>msf4j-service</artifactId>
<version>1.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.example</groupId>
<artifactId>Hello-Service</artifactId>
<version>1.0.0-SNAPSHOT</version>
<name>WSO2 MSF4J Microservice</name>
<properties>
<microservice.mainClass>org.example.service.Application</microservice.mainClass>
</properties>
</project>
您使用的是旧版本的源代码。我可以从您的模块工件名称中识别它。可以找到相关的pom文件here
我可以毫无问题地编译最新的源代码。