-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added flatpack component support #1541
- Loading branch information
1 parent
9ad9c59
commit 99711ad
Showing
16 changed files
with
294 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
extensions/flatpack/runtime/src/main/doc/configuration.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Beyond standard usages described above, a trick is needed when using flatpack mappings from classpath resources in native mode. In such a situation, one needs to explicitly embed the resources in the native executable by specifying the `include-patterns` option. | ||
|
||
For instance, the route below would load the flatpack mapping from a classpath resource named _mappings/simple.pzmap.xml_: | ||
[source,java] | ||
---- | ||
from("direct:start").to("flatpack:delim:mappings/simple.pzmap.xml"); | ||
---- | ||
|
||
In order to work in native mode the `include-patterns` configuration should be set. For instance, in the `application.properties` file as below : | ||
[source,properties] | ||
---- | ||
quarkus.camel.native.resources.include-patterns = mappings/*.pzmap.xml | ||
---- | ||
More information about selecting resources for inclusion in the native executable could be found at xref:user-guide/native-mode.adoc#embedding-resource-in-native-executable[Embedding resource in native executable]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
40 changes: 40 additions & 0 deletions
40
integration-tests/flatpack/src/main/resources/PEOPLE-HeaderAndTrailer.pzmap.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?xml version='1.0'?> | ||
<!-- | ||
Licensed to the Apache Software Foundation (ASF) under one or more | ||
contributor license agreements. See the NOTICE file distributed with | ||
this work for additional information regarding copyright ownership. | ||
The ASF licenses this file to You under the Apache License, Version 2.0 | ||
(the "License"); you may not use this file except in compliance with | ||
the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<!DOCTYPE PZMAP SYSTEM "flatpack.dtd" > | ||
|
||
<PZMAP> | ||
<RECORD id="header" startPosition="1" endPosition="3" indicator="HBT"> | ||
<COLUMN name="INDICATOR" length="3"/> | ||
<COLUMN name="DATE" length="8"/> | ||
</RECORD> | ||
|
||
<COLUMN name="FIRSTNAME" length="35" /> | ||
<COLUMN name="LASTNAME" length="35" /> | ||
<COLUMN name="ADDRESS" length="100" /> | ||
<COLUMN name="CITY" length="100" /> | ||
<COLUMN name="STATE" length="2" /> | ||
<COLUMN name="ZIP" length="5" /> | ||
|
||
<RECORD id="trailer" startPosition="1" endPosition="3" indicator="FBT"> | ||
<COLUMN name="INDICATOR" length="3"/> | ||
<COLUMN name="STATUS" length="7"/> | ||
</RECORD> | ||
|
||
</PZMAP> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
4 changes: 4 additions & 0 deletions
4
integration-tests/flatpack/src/test/resources/PEOPLE-FixedLength-Invalid.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
JOHN-LONG DOE 1234 CIRCLE CT ELYRIA OH44035* | ||
JIMMY-LONG SMITH 180 SOME ST AVON OH44011* | ||
JANE-LONG DOE 111 MILKY WY AMHERST OH44001* | ||
FRED-LONG FLINTSTONE 123 ROCKY WY BEDROCK AZ12345* |
File renamed without changes.
6 changes: 6 additions & 0 deletions
6
integration-tests/flatpack/src/test/resources/PEOPLE-HeaderAndTrailer.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
HBT20080817 | ||
JOHN DOE 1234 CIRCLE CT ELYRIA OH44035 | ||
JIMMY SMITH 180 SOME ST AVON OH44011 | ||
JANE DOE 111 MILKY WY AMHERST OH44001 | ||
FRED FLINTSTONE 123 ROCKY WY BEDROCK AZ12345 | ||
FBTSUCCESS |
Oops, something went wrong.