我是maven / pom.xml的新手,并按照以下链接创建一个oracle服务总线项目并将其打包成自定义包装类型“sbar”。
https://docs.oracle.com/middleware/1213/core/MAVEN/osb_maven_project.htm#MAVEN8971
项目生成正确(从命令 - > mvn archetype:generate ...)但是当我执行以下命令时出现错误
mvn package -DoracleHome=/path/to/osbhome
[错误]未知包装:sbar @第16行,第16栏
项目pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_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>
<parent>
<groupId>com.oracle.servicebus.plugin</groupId>
<artifactId>oracle-servicebus-plugin</artifactId>
<version>12.1.3-0-0</version>
</parent>
<groupId>my-servicebus-application</groupId>
<artifactId>my-project</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>sbar</packaging> <!--getting error on this line-->
<build>
<plugins>
<plugin>
<groupId>com.oracle.servicebus.plugin</groupId>
<artifactId>oracle-servicebus-plugin</artifactId>
<version>12.1.3-0-0</version>
<executions>
<execution>
<id>package</id>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
application pom.xml
<project>
...
<modelVersion>4.0.0</modelVersion>
<groupId>my-servicebus-application</groupId>
<artifactId>my-servicebus-application</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>System</module>
<module>my-project</module>
</modules>
...
</project>
system pom.xml
<project>
...
<modelVersion>4.0.0</modelVersion>
<groupId>org.mycompany</groupId>
<artifactId>System</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>sbar</packaging>
<parent>
<groupId>com.oracle.servicebus</groupId>
<artifactId>sbar-system-common</artifactId>
<version>12.1.3-0-0</version>
<relativePath></relativePath>
</parent>
...
</project>
我正在使用JDeveloper 12.1.3.0.0和Maven 3.0.5。 (如果我从JDeveloper或命令promt运行它,我会得到同样的错误)
请帮我解决这个错误。
提前致谢!
答案 0 :(得分:0)
我还没有真正坐下来与OSB,SOA等任何Maven POM一起工作,但我知道你的maven插件可能不是默认的M2 repository。它可能找不到您的包装类型sbar
,因为它未包含在您的存储库中。我假设你按照本指南使用他们提供的maven和maven repo:https://docs.oracle.com/middleware/1213/core/MAVEN/config_maven.htm#MAVEN8853