[
https://issues.apache.org/jira/browse/JCRVLT-320?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16665356#comment-16665356
]
Konrad Windszus edited comment on JCRVLT-320 at 10/27/18 3:16 PM:
------------------------------------------------------------------
It seems that the order is not the same with {{maven-archiver}} 3.2.0 and 3.0.0.
For the newer version it is for package {{default-test-projects/generic}} the
following order:
# META-INF/MANIFEST.MF
# META-INF/
# META-INF/vault/
# jcr_root/
# jcr_root/apps/
# jcr_root/apps/wcm/
# jcr_root/apps/wcm/core/
# jcr_root/apps/wcm/core/content/
# jcr_root/etc/,jcr_root/etc/designs/
# jcr_root/etc/designs/some-thirdparty-libs/
# jcr_root/etc/designs/some-thirdparty-libs/clientlibs/
# jcr_root/etc/designs/some-thirdparty-libs/clientlibs/thirdparty-common/
# jcr_root/etc/cloudservices/
# jcr_root/etc/cloudservices/ooyala/
# META-INF/maven/
# META-INF/maven/org.apache.jackrabbit.filevault/
# META-INF/maven/org.apache.jackrabbit.filevault/package-plugin-test-pkg/
# META-INF/vault/settings.xml,jcr_root/apps/wcm/.content.xml
# META-INF/vault/properties.xml,jcr_root/apps/wcm/core/.content.xml,
# META-INF/vault/config.xml
# META-INF/maven/org.apache.jackrabbit.filevault/package-plugin-test-pkg/pom.xml
# META-INF/vault/filter.xml
#
META-INF/maven/org.apache.jackrabbit.filevault/package-plugin-test-pkg/pom.properties
# jcr_root/apps/wcm/core/content/.content.xml
# jcr_root/apps/wcm/core/content/siteadmin.xml
# jcr_root/_rep_policy.xml
# jcr_root/etc/designs/some-thirdparty-libs/clientlibs/thirdparty-common/js.txt
#
jcr_root/etc/designs/some-thirdparty-libs/clientlibs/thirdparty-common/.content.xml
# jcr_root/etc/designs/some-thirdparty-libs/.content.xml
# jcr_root/etc/cloudservices/ooyala/.content.xml
# jcr_root/etc/cloudservices/.content.xml
So basically first the manifest, then all folders, and afterwards the invidual
files (independent of the order in which order {{Archiver.addFile/addFileSet}}
have been called.
[~tripod] Why is it that important that the order of the entries within the ZIP
are as outlined in the IT?
was (Author: kwin):
To me the behaviour of the IT seems correct, because there is the wrong
expectation in the failing ITs. Basically only nodes covered by filter rules
are added to the package, but in those ITs also paths outside the filter roots
are expected as well.
To better make someone aware of the fact that some files are not included in
the package because they are outside of filter roots at least a WARNING should
be emitted in that case (opened JCRVLT-321 for that).
No clue though, why this logic was different (IMHO wrong) with older version of
the {{maven-archiver}}.
[~tripod] WDYT?
> filevault-package-maven-plugin:package does not work with Java >= 10
> --------------------------------------------------------------------
>
> Key: JCRVLT-320
> URL: https://issues.apache.org/jira/browse/JCRVLT-320
> Project: Jackrabbit FileVault
> Issue Type: Bug
> Components: package maven plugin
> Affects Versions: package-maven-plugin-1.0.3
> Reporter: Konrad Windszus
> Priority: Major
> Fix For: package-maven-plugin-1.0.4
>
>
> When executing the goal {{package}} of {{filevault-package-maven-plugin}}
> with Maven running on Java 10+ the following exception is thrown
> {code}
> [ERROR] Failed to execute goal
> org.apache.jackrabbit:filevault-package-maven-plugin:1.0.3:package
> (default-package) on project ...: Execution default-package of goal
> org.apache.jackrabbit:filevault-package-maven-plugin:1.0.3:package failed: An
> API incompatibility was encountered while executing
> org.apache.jackrabbit:filevault-package-maven-plugin:1.0.3:package:
> java.lang.ExceptionInInitializerError: null
> [ERROR] -----------------------------------------------------
> ....
> {code}
> When executing with {{-X}} the following stacktrace is being exposed
> {code}
> at
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:181)
> ... 21 more
> Caused by: java.lang.ExceptionInInitializerError
> at
> org.apache.jackrabbit.filevault.maven.packaging.VaultMojo.execute(VaultMojo.java:192)
> at
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
> ... 21 more
> Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
> at
> org.codehaus.plexus.archiver.zip.AbstractZipArchiver.<clinit>(AbstractZipArchiver.java:116)
> ... 23 more
> {code}
> The reason for that is this line in {{plexus-archiver}} 2.9.1:
> https://github.com/codehaus-plexus/plexus-archiver/blob/b6f3f79da02d5d238843038a774b8b2a313c8f2e/src/main/java/org/codehaus/plexus/archiver/zip/AbstractZipArchiver.java#L116
> This should be fixed in more recent versions:
> https://github.com/codehaus-plexus/plexus-archiver/commit/c0357c5234fedb958bc2dd93a8397424bdcea7cf#diff-fc3ccce5d0e801c14a494428ab189152.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)