mavenpom.xmljdeveloperoracle-service-bus

service bus maven error - unknown packaging sbar


I am new to maven / pom.xml and am following the below link to create an oracle service bus project and package it into custom packaging type "sbar".

https://docs.oracle.com/middleware/1213/core/MAVEN/osb_maven_project.htm#MAVEN8971

The Project gets generated properly (from the command --> mvn archetype:generate ... ) but when I execute the below command I get an error

mvn package -DoracleHome=/path/to/osbhome 

[ERROR] Unknown packaging: sbar @ line 16, column 16

project 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>

I am using JDeveloper 12.1.3.0.0 and Maven 3.0.5. (I get the same error if I run it either from JDeveloper or from command promt)

Please help me solve this error.

Thanks in Advance !


Solution

  • I haven't really sat down to work with any of the Maven POM's for OSB, SOA, etc., but I do know that your maven plugin probably isn't on the default M2 repository. It probably can't find your packaging type of sbar because it's not included in your repository. I'm assuming you're using their supplied maven and maven repo following this guide: https://docs.oracle.com/middleware/1213/core/MAVEN/config_maven.htm#MAVEN8853