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
6c7ead4f
Commit
6c7ead4f
authored
10 years ago
by
Guillaume Delhumeau
Browse files
Options
Downloads
Patches
Plain Diff
XWIKI-11777: The PackageMojo should install XAR dependencies first.
parent
c52cfd19
No related branches found
No related tags found
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/org/xwiki/tool/packager/PackageMojo.java
+9
-2
9 additions, 2 deletions
...in/src/main/java/org/xwiki/tool/packager/PackageMojo.java
with
9 additions
and
2 deletions
xwiki-platform-tools/xwiki-platform-tool-packager-plugin/src/main/java/org/xwiki/tool/packager/PackageMojo.java
+
9
−
2
View file @
6c7ead4f
...
@@ -32,6 +32,7 @@
...
@@ -32,6 +32,7 @@
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.HashSet
;
import
java.util.LinkedHashSet
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Properties
;
import
java.util.Properties
;
...
@@ -429,7 +430,13 @@ private void importXARs(File webInfDirectory) throws MojoExecutionException
...
@@ -429,7 +430,13 @@ private void importXARs(File webInfDirectory) throws MojoExecutionException
throw
new
MojoExecutionException
(
"Failed to create context to import XAR files"
,
e
);
throw
new
MojoExecutionException
(
"Failed to create context to import XAR files"
,
e
);
}
}
for
(
Artifact
xarArtifact
:
xarArtifacts
)
{
// Reverse artifact order to have dependencies first (despite the fact that it's a Set it's actually an
// ordered LinkedHashSet behind the scene)
List
<
Artifact
>
dependenciesFirstArtifacts
=
new
ArrayList
<
Artifact
>(
xarArtifacts
);
Collections
.
reverse
(
dependenciesFirstArtifacts
);
// Import the xars
for
(
Artifact
xarArtifact
:
dependenciesFirstArtifacts
)
{
getLog
().
info
(
" ... Importing XAR file: "
+
xarArtifact
.
getFile
());
getLog
().
info
(
" ... Importing XAR file: "
+
xarArtifact
.
getFile
());
try
{
try
{
...
@@ -467,7 +474,7 @@ private void importXARs(File webInfDirectory) throws MojoExecutionException
...
@@ -467,7 +474,7 @@ private void importXARs(File webInfDirectory) throws MojoExecutionException
private
Set
<
Artifact
>
resolveXARs
()
throws
MojoExecutionException
private
Set
<
Artifact
>
resolveXARs
()
throws
MojoExecutionException
{
{
Set
<
Artifact
>
xarArtifacts
=
new
HashSet
<
Artifact
>();
Set
<
Artifact
>
xarArtifacts
=
new
Linked
HashSet
<>();
Set
<
Artifact
>
artifacts
=
this
.
project
.
getArtifacts
();
Set
<
Artifact
>
artifacts
=
this
.
project
.
getArtifacts
();
if
(
artifacts
!=
null
)
{
if
(
artifacts
!=
null
)
{
...
...
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