[
https://issues.apache.org/jira/browse/FELIX-2329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12865049#action_12865049
]
Bengt Rodehav commented on FELIX-2329:
--------------------------------------
Attached to this issue is a modified version of
AddFeaturesToRepoMojo.java. I added two configuration parameters:
- skipNonMavenProtocols: Setting this to true (false is default)
causes the plugin to look for the first occurence of "mvn:" and start
passing the url from there. This enables url's like
"<bundle>ipojo:mvn:com.acme/artifact/1.0</bundle>".
- skipUrlParameters: Setting this to true (false is default) causes
the plugin to truncate the url if a "#" or a "?" is encountered. This
enables url's like:
"<bundle>war:mvn:com.acme/war-artifact/1.0/war?Webapp-Context=my_context</bundle>"
I haven't contributed to Apache before so you might want to check the
code extra carefully. Note that I haven't modified
ValidateFeaturesMojo.java. I understand that it implements the
validate-features goal. Does it need to be changed too? I haven't used
it so I wouldn't know.
Anyway, the attached version solves the problems I've had so far.
> Improve the URL handling in features-maven-plugin regarding the
> add-features-to-repo goal
> -----------------------------------------------------------------------------------------
>
> Key: FELIX-2329
> URL: https://issues.apache.org/jira/browse/FELIX-2329
> Project: Felix
> Issue Type: Improvement
> Components: Karaf
> Affects Versions: karaf-1.4.0
> Reporter: Bengt Rodehav
>
> Presently the fatures-maven-plugin cannot handle URL's starting with anything
> else than "mvn:" and "wrap:". As long as "mvn:" exists later on in the URL,
> the protocols before "mvn:" could be skipped since they are not used for the
> add-features-to-repo goal. E g the following bundle definition should be
> possible to handle:
> <bundle>ipojo:mvn:com.acme/artifact/1.0</bundle>
> A similar problem arises when references (beginning with "#") and
> parameters/queries (beginning with "?") are appended to the URL. E g the
> following bundle definition should be possible to handle:
> <bundle>war:mvn:com.acme/war-artifact/1.0/war?Webapp-Context=my_context</bundle>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.