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
25536ad6
Commit
25536ad6
authored
5 years ago
by
Thomas Mortagne
Browse files
Options
Downloads
Patches
Plain Diff
[misc] Fix error reporting
parent
7303d8f7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
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
+8
-8
8 additions, 8 deletions
...in/src/main/java/org/xwiki/tool/packager/PackageMojo.java
with
8 additions
and
8 deletions
xwiki-platform-tools/xwiki-platform-tool-packager-plugin/src/main/java/org/xwiki/tool/packager/PackageMojo.java
+
8
−
8
View file @
25536ad6
...
@@ -95,7 +95,7 @@ public class PackageMojo extends AbstractOldCoreMojo
...
@@ -95,7 +95,7 @@ public class PackageMojo extends AbstractOldCoreMojo
private
File
outputClassesDirectory
;
private
File
outputClassesDirectory
;
/**
/**
* Used to look up Artifacts in the remote repository.
*
*
Used to look up Artifacts in the remote repository.
*/
*/
@Component
@Component
protected
RepositorySystem
repositorySystem
;
protected
RepositorySystem
repositorySystem
;
...
@@ -606,7 +606,7 @@ private Set<Artifact> getMandatoryJarArtifacts() throws MojoExecutionException
...
@@ -606,7 +606,7 @@ private Set<Artifact> getMandatoryJarArtifacts() throws MojoExecutionException
// Required to load macros.vm by default
// Required to load macros.vm by default
mandatoryTopLevelArtifacts
.
add
(
this
.
repositorySystem
.
createArtifact
(
"org.xwiki.platform"
,
mandatoryTopLevelArtifacts
.
add
(
this
.
repositorySystem
.
createArtifact
(
"org.xwiki.platform"
,
"xwiki-platform-velocity-webapp"
,
getXWikiPlatformVersion
(),
null
,
"jar"
));
"xwiki-platform-velocity-webapp"
,
getXWikiPlatformVersion
(),
null
,
"jar"
));
// Required Plugins
// Required Plugins
mandatoryTopLevelArtifacts
.
add
(
this
.
repositorySystem
.
createArtifact
(
"org.xwiki.platform"
,
mandatoryTopLevelArtifacts
.
add
(
this
.
repositorySystem
.
createArtifact
(
"org.xwiki.platform"
,
...
@@ -759,8 +759,8 @@ private Set<Artifact> resolveTransitively(Set<Artifact> artifacts) throws MojoEx
...
@@ -759,8 +759,8 @@ private Set<Artifact> resolveTransitively(Set<Artifact> artifacts) throws MojoEx
.
setManagedVersionMap
(
getManagedVersionMap
()).
setResolveRoot
(
false
);
.
setManagedVersionMap
(
getManagedVersionMap
()).
setResolveRoot
(
false
);
ArtifactResolutionResult
resolutionResult
=
this
.
repositorySystem
.
resolve
(
request
);
ArtifactResolutionResult
resolutionResult
=
this
.
repositorySystem
.
resolve
(
request
);
if
(
resolutionResult
.
hasExceptions
())
{
if
(
resolutionResult
.
hasExceptions
())
{
throw
new
MojoExecutionException
(
throw
new
MojoExecutionException
(
String
.
format
(
"Failed to resolve artifacts [%s]"
,
artifacts
),
String
.
format
(
"Failed to resolve artifacts [%s]"
,
artifacts
,
resolutionResult
.
getExceptions
().
get
(
0
))
)
;
resolutionResult
.
getExceptions
().
get
(
0
));
}
}
return
resolutionResult
.
getArtifacts
();
return
resolutionResult
.
getArtifacts
();
...
@@ -855,7 +855,7 @@ private void copyDirectory(File sourceDirectory, File targetDirectory) throws Mo
...
@@ -855,7 +855,7 @@ private void copyDirectory(File sourceDirectory, File targetDirectory) throws Mo
FileUtils
.
copyDirectoryStructureIfModified
(
sourceDirectory
,
targetDirectory
);
FileUtils
.
copyDirectoryStructureIfModified
(
sourceDirectory
,
targetDirectory
);
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
throw
new
MojoExecutionException
(
throw
new
MojoExecutionException
(
String
.
format
(
"Failed to copy directory [%] to [%]"
,
sourceDirectory
,
targetDirectory
),
e
);
String
.
format
(
"Failed to copy directory [%
s
] to [%
s
]"
,
sourceDirectory
,
targetDirectory
),
e
);
}
}
}
}
...
@@ -864,7 +864,7 @@ private void copyFile(File source, File targetDirectory) throws MojoExecutionExc
...
@@ -864,7 +864,7 @@ private void copyFile(File source, File targetDirectory) throws MojoExecutionExc
try
{
try
{
FileUtils
.
copyFileToDirectoryIfModified
(
source
,
targetDirectory
);
FileUtils
.
copyFileToDirectoryIfModified
(
source
,
targetDirectory
);
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
throw
new
MojoExecutionException
(
String
.
format
(
"Failed to copy file [%] to [%]"
,
source
,
targetDirectory
),
throw
new
MojoExecutionException
(
String
.
format
(
"Failed to copy file [%
s
] to [%
s
]"
,
source
,
targetDirectory
),
e
);
e
);
}
}
}
}
...
@@ -903,8 +903,8 @@ private void resolveArtifact(Artifact artifact) throws MojoExecutionException
...
@@ -903,8 +903,8 @@ private void resolveArtifact(Artifact artifact) throws MojoExecutionException
.
setRemoteRepositories
(
this
.
remoteRepositories
).
setLocalRepository
(
this
.
localRepository
);
.
setRemoteRepositories
(
this
.
remoteRepositories
).
setLocalRepository
(
this
.
localRepository
);
ArtifactResolutionResult
resolutionResult
=
this
.
repositorySystem
.
resolve
(
request
);
ArtifactResolutionResult
resolutionResult
=
this
.
repositorySystem
.
resolve
(
request
);
if
(
resolutionResult
.
hasExceptions
())
{
if
(
resolutionResult
.
hasExceptions
())
{
throw
new
MojoExecutionException
(
throw
new
MojoExecutionException
(
String
.
format
(
"Failed to resolve artifact [%s]"
,
artifact
),
String
.
format
(
"Failed to resolve artifact [%s]"
,
artifact
,
resolutionResult
.
getExceptions
().
get
(
0
))
)
;
resolutionResult
.
getExceptions
().
get
(
0
));
}
}
}
}
...
...
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