Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
X
xwiki-platform
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
XWiki
xwiki-platform
Commits
42820362
Commit
42820362
authored
9 years ago
by
Thomas Mortagne
Browse files
Options
Downloads
Patches
Plain Diff
XWIKI-13147: Package plugin import mojo does not keep dependency order
parent
cf914d78
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
xwiki-platform-tools/xwiki-platform-tool-packager-plugin/src/main/java/com/xpn/xwiki/tool/backup/ImportMojo.java
+2
-2
2 additions, 2 deletions
...n/src/main/java/com/xpn/xwiki/tool/backup/ImportMojo.java
with
2 additions
and
2 deletions
xwiki-platform-tools/xwiki-platform-tool-packager-plugin/src/main/java/com/xpn/xwiki/tool/backup/ImportMojo.java
+
2
−
2
View file @
42820362
...
...
@@ -22,7 +22,7 @@
import
java.io.File
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.HashSet
;
import
java.util.
Linked
HashSet
;
import
java.util.List
;
import
java.util.Set
;
...
...
@@ -173,7 +173,7 @@ private void importDependencies(Importer importer, String databaseName, File hib
// We have to create our own Set because Maven changes the fields from the dependency Artifacts (e.g. resolves
// their version) after they are added to the Set of dependencies and this causes the hash code to change. As a
// result the #contains(Artifact) method doesn't work as expected because it uses the new hash code.
Set
<
Artifact
>
directDependencies
=
new
HashSet
<>(
this
.
project
.
getDependencyArtifacts
());
Set
<
Artifact
>
directDependencies
=
new
Linked
HashSet
<>(
this
.
project
.
getDependencyArtifacts
());
// Reverse artifact order to have dependencies first (despite the fact that it's a Set it's actually an ordered
// LinkedHashSet behind the scene)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment