Uploaded image for project: 'ServiceMix'
  1. ServiceMix
  2. SM-1695

Missing component descriptor

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • 4.0
    • None
    • servicemix-components
    • None

    Description

      While trying to get my own components to work under SMX4 I discovered, that the JBI descriptors are missing in my jar files.
      I investigated on this issue and found, that I missed the following plugins in my maven pom:

      <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-dependency-plugin</artifactId>
              <version>2.0</version>
              <executions>
                <execution>
                  <id>copy-legal</id>
                  <phase>generate-resources</phase>
                  <goals>
                    <goal>copy</goal>
                  </goals>
                  <configuration>
                    <artifactItems>
                      <artifactItem>
                        <groupId>org.apache.servicemix.legal</groupId>
                        <artifactId>legal</artifactId>
                        <version>${servicemix-legal-version}</version>
                        <type>xml</type>
                        <outputDirectory>target/legal/</outputDirectory>
                      </artifactItem>
                    </artifactItems>
                    <stripVersion>true</stripVersion>
                  </configuration>
                </execution>
              </executions>
              <dependencies>
                <dependency>
                  <groupId>org.apache.servicemix.legal</groupId>
                  <artifactId>legal</artifactId>
                  <version>${servicemix-legal-version}</version>
                  <type>xml</type>
                </dependency>
              </dependencies>
            </plugin>
            <plugin>
              <artifactId>maven-remote-resources-plugin</artifactId>
              <version>1.0</version>
              <dependencies>
                <dependency>
                  <groupId>org.apache.servicemix</groupId>
                  <artifactId>servicemix-build</artifactId>
                  <version>1.0</version>
                </dependency>
              </dependencies>
              <executions>
                <!-- First execution for standard (jar) packaging -->
                <execution>
                  <id>std-packaging</id>
                  <goals>
                    <goal>process</goal>
                  </goals>
                  <configuration>
                    <resourceBundles>
                      <resourceBundle>org.apache:apache-jar-resource-bundle:1.4</resourceBundle>
                    </resourceBundles>
                    <supplementalModels>
                      <supplementalModel>target/legal/legal.xml</supplementalModel>
                    </supplementalModels>
                    <properties>
                      <addLicense>true</addLicense>
                      <addArtifact>true</addArtifact>
                      <projectName>Apache ServiceMix</projectName>
                    </properties>
                  </configuration>
                </execution>
                <!-- Second execution for JBI packaging -->
                <execution>
                  <id>jbi-packaging</id>
                  <goals>
                    <goal>process</goal>
                  </goals>
                  <configuration>
                    <outputDirectory>${project.build.directory}/${project.artifactId}-${project.version}-installer</outputDirectory>
                    <resourceBundles>
                      <resourceBundle>org.apache:apache-jar-resource-bundle:1.4</resourceBundle>
                    </resourceBundles>
                    <supplementalModels>
                      <supplementalModel>target/legal/legal.xml</supplementalModel>
                    </supplementalModels>
                    <properties>
                      <addLicense>true</addLicense>
                      <addArtifact>true</addArtifact>
                      <projectName>Apache ServiceMix</projectName>
                    </properties>
                  </configuration>
                </execution>
              </executions>
            </plugin>
            <plugin>
      

      Afterwards I tried to adapt the servicemix components-pom to behave the same way as my one and removed the above plugins. After building it and then the components of SMX I found that the jbi.xml is missing now in the servicemix components as well so it seems to be correct, that these plugins are responsible for placing the jbi.xml inside the jar.

      In my eyes this is a "bug". If the jbi.xml is placed in the jar shouldn't depend on the above plugins.

      Any thoughts?

      Attachments

        Activity

          People

            lhein Lars Heinemann
            lhein Lars Heinemann
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: