[
https://issues.apache.org/jira/browse/KARAF-5372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16280119#comment-16280119
]
Grzegorz Grzybek commented on KARAF-5372:
-----------------------------------------
First, I implemented a bit easier configuration of startup KARs - instead of
four default {{<framework>}} values (which may possibly be implied from the KAR
dependency in POM), I added fifth {{custom}} value. It works like this (to be
documented soon):
h3. Explicit <framework>, no type=kar, scope=compile dependency
{noformat}
[INFO] --- karaf-maven-plugin:4.2.0-SNAPSHOT:assembly (default-assembly) @
test-karaf-plugins ---
[INFO] Using repositories: https://repo.maven.apache.org/maven2@id=central
[INFO] Creating work directory
[INFO] Loading direct kar and features repositories dependencies
[INFO] Standard startup Karaf KAR implied from framework
(static-framework-logback): \
mvn:org.apache.karaf.features/static/4.2.0-SNAPSHOT/kar
[INFO] Generating karaf assembly:
/data/sources/_testing/grgr-test-karaf-plugins/target/assembly
{noformat}
h3. No <framework>, no type=kar, scope=compile dependency
{noformat}
[INFO] --- karaf-maven-plugin:4.2.0-SNAPSHOT:assembly (default-assembly) @
test-karaf-plugins ---
[INFO] Using repositories: https://repo.maven.apache.org/maven2@id=central
[INFO] Creating work directory
[INFO] Loading direct kar and features repositories dependencies
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.217 s
[INFO] Finished at: 2017-11-09T14:31:50+01:00
[INFO] Final Memory: 17M/360M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.karaf.tooling:karaf-maven-plugin:4.2.0-SNAPSHOT:assembly
(default-assembly) \
on project test-karaf-plugins: Unable to build assembly: Can't determine
framework to use (framework, framework-logback, \
static-framework, static-framework-logback, custom). Please specify valid
"framework" option or add Maven dependency with \
"kar" type and "compile" scope for one of standard Karaf KARs. -> [Help 1]
{noformat}
h3. <framework>x</framework>
{noformat}
[ERROR] Failed to execute goal
org.apache.karaf.tooling:karaf-maven-plugin:4.2.0-SNAPSHOT:assembly
(default-assembly) on \
project test-karaf-plugins: Unable to build assembly: Unsupported
framework: x -> [Help 1]
{noformat}
h3. <framework>custom</framework>, no type=kar, scope=compile dependency
{noformat}
[ERROR] Failed to execute goal
org.apache.karaf.tooling:karaf-maven-plugin:4.2.0-SNAPSHOT:assembly
(default-assembly) on \
project test-karaf-plugins: Unable to build assembly: Custom KAR was
declared, but there's no Maven dependency with \
type=kar and scope=compile. Please specify at least one KAR for custom
assembly. -> [Help 1]
{noformat}
h3. <framework>custom</framework> and type=kar, scope=compile dependency, but
no explicit startup feature
{noformat}
[ERROR] Failed to execute goal
org.apache.karaf.tooling:karaf-maven-plugin:4.2.0-SNAPSHOT:assembly
(default-assembly) on \
project test-karaf-plugins: Unable to build assembly: Custom KAR was
declared, but there's no startup feature decleard. \
Please specify at least one startup feature defined in custom KAR. -> [Help
1]
{noformat}
h3. <framework>custom</framework> and type=kar, scope=compile dependency,
explicit startup feature
{noformat}
[INFO] --- karaf-maven-plugin:4.2.0-SNAPSHOT:assembly (default-assembly) @
test-karaf-plugins ---
[INFO] Using repositories: https://repo.maven.apache.org/maven2@id=central
[INFO] Creating work directory
[INFO] Loading direct kar and features repositories dependencies
[INFO] Custom startup KAR found: \
mvn:grgr.test.karaf.plugins/my-kar/0.1.0.BUILD-SNAPSHOT/kar
[INFO] Generating karaf assembly:
/data/sources/_testing/grgr-test-karaf-plugins/target/assembly
{noformat}
> startup.properties doesn't respect overrides
> --------------------------------------------
>
> Key: KARAF-5372
> URL: https://issues.apache.org/jira/browse/KARAF-5372
> Project: Karaf
> Issue Type: Bug
> Components: karaf-tooling
> Affects Versions: 4.1.2
> Reporter: J. Brébec
> Assignee: Grzegorz Grzybek
>
> The karaf-maven-plugin doesn't take into account bundles overrides. The karaf
> main doesn't use it either. As a consequence, it is not possible to override
> core bundle as fileinstall or features-core
> For a real usecase, I was trying to patch locally KARAF-5371 (which is a
> blocker issue in my context), but it's not possible to override the
> feature-core bundle. I have to overwrite the jar with a patched version after
> the assembly goal..
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)