protected File getMarkerFile()

in src/main/java/org/apache/maven/plugins/dependency/utils/markers/UnpackFileMarkerHandler.java [52:79]


    protected File getMarkerFile() {
        /**
         * Build a hash of all include/exclude strings, to determine if an artifactItem has been unpacked using the
         * include/exclude parameters, this will allow an artifact to be included multiple times with different
         * include/exclude parameters
         */
        File markerFile;
        if (this.artifactItem == null
                || (StringUtils.isEmpty(this.artifactItem.getIncludes())
                        && StringUtils.isEmpty(this.artifactItem.getExcludes()))) {
            markerFile = super.getMarkerFile();
        } else {
            int includeExcludeHash = 0;

            if (StringUtils.isNotEmpty(this.artifactItem.getIncludes())) {
                includeExcludeHash += this.artifactItem.getIncludes().hashCode();
            }

            if (StringUtils.isNotEmpty(this.artifactItem.getExcludes())) {
                includeExcludeHash += this.artifactItem.getExcludes().hashCode();
            }

            markerFile =
                    new File(this.markerFilesDirectory, this.artifact.getId().replace(':', '-') + includeExcludeHash);
        }

        return markerFile;
    }