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

ASF GitHub Bot commented on CAMEL-11009:
----------------------------------------

GitHub user aldettinger opened a pull request:

    https://github.com/apache/camel/pull/1548

    CAMEL-11009: Corrected the generation of the 'spring.schemas' file in 
camel-blueprint

    This PR proposes a possible fix for 
[CAMEL-11009](https://issues.apache.org/jira/browse/CAMEL-11009).
    
    Actually, the file `/META-INF/spring.schemas` is filtered during the 
process-resources phase.
    However, the `camel.schema.version` property is defined too late (during 
the process-classes phase).
    
    I re-sequenced those steps, and now the file `/META-INF/spring.schemas` is 
generated as below:
    `http\://camel.apache.org/schema/spring=camel-spring.xsd`
    `http\://camel.apache.org/schema/spring/v2.19=camel-spring-v2.19.xsd`
    
    The fix needs at least maven 3.0.3, but I'm sure build servers are more 
recent ;)
    If you are ok with the fix, I would then check this issue in 
camel-blueprint and camel-spring-dm (unless deprecated).

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/aldettinger/camel master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/camel/pull/1548.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1548
    
----
commit 23545491c228997f52cfc482af17c5f48fa83348
Author: aldettinger <[email protected]>
Date:   2017-03-13T20:36:49Z

    CAMEL-11000: Issued a simple warning rather than throwing an Exception

commit 649e9cbbed41a6970bc9b5881b53f446531af4ff
Author: aldettinger <[email protected]>
Date:   2017-03-17T16:15:01Z

    Merge remote-tracking branch 'upstream/master'
    
    Merging from upstream/master

commit 1e7763d120e38322db17f9a5fbc4d3ff6b3ac183
Author: aldettinger <[email protected]>
Date:   2017-03-17T18:22:30Z

    CAMEL-11009: Set the camel.schema.version property earlier

----


> Camel spring - spring.schemas file contains unexpaned maven properties in 
> release artefact
> ------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-11009
>                 URL: https://issues.apache.org/jira/browse/CAMEL-11009
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-spring
>    Affects Versions: 2.18.0, 2.18.1, 2.18.2
>         Environment: any
>            Reporter: Niels Bertram
>            Priority: Minor
>             Fix For: 2.18.4, 2.19.0
>
>
> Looking at 
> http://search.maven.org/remotecontent?filepath=org/apache/camel/camel-spring/2.18.2/camel-spring-2.18.2.jar
> I can see that file /META-INF/spring.schemas shows non-expanded maven 
> property {{v$&#123;camel.schema.version&#125;}} in the file. This causes 
> loading a route in Karaf fail.
> {code}
> #
> # Licensed to the Apache Software Foundation (ASF) under one or more
> # contributor license agreements.  See the NOTICE file distributed with
> ...
> http\://camel.apache.org/schema/spring=camel-spring.xsd
> http\://camel.apache.org/schema/spring/v${camel.schema.version}=camel-spring-v${camel.schema.version}.xsd
> {code}
> Ok in 2.17.x and 2.16.x  but broken in 2.18.x releases.
> Stack trace from running a camel route in Karaf with camel-spring-2.18.2 
> installed:
> {code}
> 2017-03-12 23:00:39,527 | WARN  | pool-32-thread-2 | 
> NamespaceHandlerRegistryImpl     | 12 - org.apache.aries.blueprint.core - 
> 1.7.1 | Error registering NamespaceHandler
> java.lang.IllegalArgumentException: Illegal character in path at index 40: 
> http://camel.apache.org/schema/spring/v${camel.schema.version}
>         at java.net.URI.create(URI.java:852) [?:?]
>         at 
> org.apache.aries.blueprint.namespace.NamespaceHandlerRegistryImpl.getNamespaces(NamespaceHandlerRegistryImpl.java:203)
>  [12:org.apache.aries.blueprint.core:1.7.1]
>         at 
> org.apache.aries.blueprint.namespace.NamespaceHandlerRegistryImpl.registerHandler(NamespaceHandlerRegistryImpl.java:157)
>  [12:org.apache.aries.blueprint.core:1.7.1]
>         at 
> org.apache.aries.blueprint.namespace.NamespaceHandlerRegistryImpl.addingService(NamespaceHandlerRegistryImpl.java:121)
>  [12:org.apache.aries.blueprint.core:1.7.1]
>         at 
> org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941)
>  [?:?]
>         at 
> org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870)
>  [?:?]
>         at 
> org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256) 
> [?:?]
>         at 
> org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229) [?:?]
>         at 
> org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901)
>  [?:?]
>         at 
> org.apache.felix.framework.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:990)
>  [?:?]
>         at 
> org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:838)
>  [?:?]
>         at 
> org.apache.felix.framework.EventDispatcher.fireServiceEvent(EventDispatcher.java:545)
>  [?:?]
>         at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4557) 
> [?:?]
>         at org.apache.felix.framework.Felix.registerService(Felix.java:3549) 
> [?:?]
>         at 
> org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:348)
>  [?:?]
>         at 
> org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:355)
>  [?:?]
>         at 
> org.apache.aries.blueprint.spring.SpringExtension.start(SpringExtension.java:78)
>  [202:org.apache.aries.blueprint.spring:0.2.0]
>         at 
> org.apache.felix.utils.extender.AbstractExtender$1.run(AbstractExtender.java:265)
>  [202:org.apache.aries.blueprint.spring:0.2.0]
>         at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
>         at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
>  [?:?]
>         at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
>  [?:?]
>         at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>  [?:?]
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>  [?:?]
>         at java.lang.Thread.run(Thread.java:745) [?:?]
> Caused by: java.net.URISyntaxException: Illegal character in path at index 
> 40: http://camel.apache.org/schema/spring/v${camel.schema.version}
>         at java.net.URI$Parser.fail(URI.java:2848) ~[?:?]
>         at java.net.URI$Parser.checkChars(URI.java:3021) ~[?:?]
>         at java.net.URI$Parser.parseHierarchical(URI.java:3105) ~[?:?]
>         at java.net.URI$Parser.parse(URI.java:3053) ~[?:?]
>         at java.net.URI.<init>(URI.java:588) ~[?:?]
>         at java.net.URI.create(URI.java:850) ~[?:?]
>         ... 24 more
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to