You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Andreas Schaefer (JIRA)" <ji...@apache.org> on 2019/08/12 06:06:00 UTC

[jira] [Commented] (SLING-8626) Content Package Converter is taking Group from Package Group instead of from Maven Group

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

Andreas Schaefer commented on SLING-8626:
-----------------------------------------

After further investigation I see that there is a severe problem with naming the Content Packages as the content package do not need to have a MANIFEST.MF and that the package group can but does not have to reflect the Maven group.

That said in the content of the Feature Model we can assume that Content Packages are indeed Maven Artifacts even though with just the CP file we cannot determine that.

For the case of a CP that is a Maven Artifacts we should provide the converter with the reference to the POM and the Artifact. Then the group and artifact id and the version are taken from the POM file instead of the CP file. I would propose something along these lines:
{code:java}
public void convert(CPArtifact...cpArtifacts);{code}
With a CPArtifact class like this:
{code:java}
public class CPArtifact {
private File pomFile;
private File packageFile:

public CPArtifact(File pomFile, File packageFile) {{code}
The converter would then take the Artifact Id and with it the location where it is stored from the pomFile and not from the Package Properties.

These changes should not change anything that already released.

> Content Package Converter is taking Group from Package Group instead of from Maven Group
> ----------------------------------------------------------------------------------------
>
>                 Key: SLING-8626
>                 URL: https://issues.apache.org/jira/browse/SLING-8626
>             Project: Sling
>          Issue Type: Bug
>          Components: Content-Package to Feature Model Converter
>         Environment: Sling 11, Java 8
>            Reporter: Andreas Schaefer
>            Priority: Major
>
> There are two issues with the Content Package to Feature Model Converter with respect to groups:
>  # If a group is set in the Content Package then this group will be used in the Feature Id as well as for the folder where it is created
>  # If anything changes in the Content Package Vault properties then this will not be reflected in the conversion on a Mac (10.14, Mojave). This is because the deflated file remains the same and in my testing the file did not change even though the package did.
> The issue with the group is severe as the original POM file and the 'cp2fm-converted' file are not in the same location causing issues with the launcher at least.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)