You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Chris Wolf (JIRA)" <ji...@apache.org> on 2013/05/17 18:19:16 UTC

[jira] [Commented] (CAMEL-3773) Apache Camel version banner is wrong in uber-jar

    [ https://issues.apache.org/jira/browse/CAMEL-3773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13660831#comment-13660831 ] 

Chris Wolf commented on CAMEL-3773:
-----------------------------------

I was able to create an uber-jar.  My Shade plugin configuration is similar to Arkadi Shishlov's, but since some of my dependencies are signed jars, I needed to filter out the signatures.  Here's my configuration:

{code:xml|borderStyle=solid}
      <plugin>
        <!-- create single, executable Jumbo Jar containing all the dependencies -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <version>1.5</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <transformers>
                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                  <mainClass>demo.camel.tools.JMSWebMonitor</mainClass>
                </transformer>
                <!-- prevents multiple spring.handlers and spring.schemas from over-writing each other (will append instead) -->
                <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
                  <resource>META-INF/spring.handlers</resource>
                </transformer>
                <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
                  <resource>META-INF/spring.schemas</resource>
                </transformer>
              </transformers>
              <filters>
                <!-- filter out jar signatures from shaded jars -->
                <filter>
                  <artifact>*:*</artifact>
                  <excludes>
                    <exclude>META-INF/*.SF</exclude>
                    <exclude>META-INF/*.DSA</exclude>
                    <exclude>META-INF/*.RSA</exclude>
                  </excludes>
                </filter>
              </filters>             
            </configuration>
          </execution>
        </executions>
      </plugin>
{code}

                
> Apache Camel version banner is wrong in uber-jar
> ------------------------------------------------
>
>                 Key: CAMEL-3773
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3773
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.6.0
>            Reporter: Arkadi Shishlov
>            Assignee: Claus Ibsen
>            Priority: Minor
>              Labels: uber-jar
>             Fix For: 2.7.0
>
>         Attachments: camel-getVersion-uber-jar.diff
>
>
> At context start a version banner is printed to the log:
> Apache Camel 2.6.0 (CamelContext: camel) started in 2.436 seconds
> The version string is calculated by ServiceSupport.getVersion():
> {code}
> Package aPackage = getClass().getPackage();
> if (aPackage != null) {
>     version = aPackage.getImplementationVersion();
>     if (version == null) {
>         version = aPackage.getSpecificationVersion();
>     }
> }
> {code}
> but, in Maven shade-plugin packaged project (to create single uber-jar for distribution to SE environment), the Manifest versions are project version, not Camel. So the wrong version is printed. It would be nice to have this improved to print real Camel version.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira