Invalid jbi.xml when using maven. no description element
---------------------------------------------------------
Key: SM-738
URL: https://issues.apache.org/activemq/browse/SM-738
Project: ServiceMix
Issue Type: Bug
Components: tooling
Affects Versions: 3.0
Reporter: Christian Schneider
Priority: Minor
When I created a service assembly using maven install I got a jbi.xml like
this. The xml schema requires to jbi.xml to include a description element in
serviceunit identification. In my case it was not present. I think the maven
task should at least create an empty element.
Best regards
Christian
<?xml version="1.0" encoding="UTF-8"?>
<jbi xmlns="http://java.sun.com/xml/ns/jbi" version="1.0">
<service-assembly>
<identification>
<name>myservice-sa</name>
<description>A custom project</description>
</identification>
<service-unit>
<identification>
<name>myservice</name>
>>>>> Here should be a <description></description> element.
</identification>
<target>
<artifacts-zip>myservice-1.0-SNAPSHOT.zip</artifacts-zip>
<component-name>servicemix-jsr181</component-name>
</target>
</service-unit>
</service-assembly>
</jbi>
---
This was my pom.xml
---
<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>myservice-sa</artifactId>
<packaging>jbi-service-assembly</packaging>
<version>1.0-SNAPSHOT</version>
<name>A custom project</name>
<url>http://www.myorganization.org</url>
<pluginRepositories>
<pluginRepository>
<id>logicblaze</id>
<name>LogicBlaze Repository</name>
<url>http://repo.logicblaze.com/maven2-all/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</pluginRepository>
</pluginRepositories>
<repositories>
<repository>
<id>logicblaze</id>
<name>LogicBlaze Repository</name>
<url>http://repo.logicblaze.com/maven2-all/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
<properties>
<servicemix-version>3.0.1-incubating</servicemix-version>
</properties>
<dependencies>
<dependency>
<groupId>net.enbw</groupId>
<artifactId>myservice</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.servicemix.tooling</groupId>
<artifactId>jbi-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<type>service-assembly</type>
</configuration>
</plugin>
</plugins>
</build>
</project>
I just tested again with my service unit pom containing a description element.
In this case it was included in the jbi.xml and the file was valid. So the
issue only seems to occur if you do not have a description element in your
service unit pom. Still I would consider this to be a bug as the description
element is optional in the su pom.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira