Skip installation of artifacts which files are not regular files
- Resolves: rhbz#1078967
This commit is contained in:
parent
22eaa6ee63
commit
06af4ec1f1
@ -0,0 +1,46 @@
|
|||||||
|
From 6beaea7bae7bbe5fb17b1d9c9b13bb2d4072bc08 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mikolaj Izdebski <mizdebsk@redhat.com>
|
||||||
|
Date: Fri, 28 Mar 2014 16:56:12 +0100
|
||||||
|
Subject: [PATCH] Don't install artifacts which are not regular files
|
||||||
|
|
||||||
|
This fixes rhbz#1078967
|
||||||
|
---
|
||||||
|
.../maven/rpminstall/plugin/InstallMojo.java | 15 +++++++++++++++
|
||||||
|
1 file changed, 15 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/xmvn-mojo/src/main/java/org/fedoraproject/maven/rpminstall/plugin/InstallMojo.java b/xmvn-mojo/src/main/java/org/fedoraproject/maven/rpminstall/plugin/InstallMojo.java
|
||||||
|
index 67f34d3..0e64792 100644
|
||||||
|
--- a/xmvn-mojo/src/main/java/org/fedoraproject/maven/rpminstall/plugin/InstallMojo.java
|
||||||
|
+++ b/xmvn-mojo/src/main/java/org/fedoraproject/maven/rpminstall/plugin/InstallMojo.java
|
||||||
|
@@ -130,6 +130,13 @@ public class InstallMojo
|
||||||
|
logger.debug( "Installing main artifact " + mainArtifact );
|
||||||
|
logger.debug( "Artifact file is " + mainArtifact.getFile() );
|
||||||
|
|
||||||
|
+ if ( !mainArtifact.getFile().isFile() )
|
||||||
|
+ {
|
||||||
|
+ logger.info( "Skipping installation of artifact " + mainArtifact.getFile()
|
||||||
|
+ + ": artifact file is not a regular file" );
|
||||||
|
+ mainArtifact = mainArtifact.setFile( null );
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
Path rawPom = project.getFile().toPath();
|
||||||
|
Path effectivePom = saveEffectivePom( project.getModel() );
|
||||||
|
logger.debug( "Raw POM path: " + rawPom );
|
||||||
|
@@ -142,6 +149,14 @@ public class InstallMojo
|
||||||
|
Artifact attachedArtifact = aetherArtifact( mavenArtifact );
|
||||||
|
attachedArtifact = attachedArtifact.setFile( mavenArtifact.getFile() );
|
||||||
|
logger.debug( "Installing attached artifact " + attachedArtifact );
|
||||||
|
+ logger.debug( "Artifact file is " + mavenArtifact.getFile() );
|
||||||
|
+
|
||||||
|
+ if ( !mavenArtifact.getFile().isFile() )
|
||||||
|
+ {
|
||||||
|
+ logger.info( "Skipping installation of attached artifact " + attachedArtifact
|
||||||
|
+ + ": artifact file is not a regular file" );
|
||||||
|
+ continue;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
deployArtifact( attachedArtifact, null, null );
|
||||||
|
}
|
||||||
|
--
|
||||||
|
1.8.5.3
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
Name: xmvn
|
Name: xmvn
|
||||||
Version: 1.5.0
|
Version: 1.5.0
|
||||||
Release: 0.22.gitcb3a0a6%{?dist}
|
Release: 0.23.gitcb3a0a6%{?dist}
|
||||||
Summary: Local Extensions for Apache Maven
|
Summary: Local Extensions for Apache Maven
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
URL: http://mizdebsk.fedorapeople.org/xmvn
|
URL: http://mizdebsk.fedorapeople.org/xmvn
|
||||||
@ -11,6 +11,8 @@ BuildArch: noarch
|
|||||||
# (cd ./%{name} && git archive --format tar --prefix %{name}-%{version}/ cb3a0a6 | xz) >%{name}-%{version}-SNAPSHOT.tar.xz
|
# (cd ./%{name} && git archive --format tar --prefix %{name}-%{version}/ cb3a0a6 | xz) >%{name}-%{version}-SNAPSHOT.tar.xz
|
||||||
Source0: %{name}-%{version}-SNAPSHOT.tar.xz
|
Source0: %{name}-%{version}-SNAPSHOT.tar.xz
|
||||||
|
|
||||||
|
Patch0: 0001-Don-t-install-artifacts-which-are-not-regular-files.patch
|
||||||
|
|
||||||
BuildRequires: maven >= 3.1.1-13
|
BuildRequires: maven >= 3.1.1-13
|
||||||
BuildRequires: maven-local
|
BuildRequires: maven-local
|
||||||
BuildRequires: beust-jcommander
|
BuildRequires: beust-jcommander
|
||||||
@ -38,6 +40,7 @@ This package provides %{summary}.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
# remove dependency plugin maven-binaries execution
|
# remove dependency plugin maven-binaries execution
|
||||||
# we provide apache-maven by symlink
|
# we provide apache-maven by symlink
|
||||||
@ -148,6 +151,10 @@ end
|
|||||||
%doc LICENSE NOTICE
|
%doc LICENSE NOTICE
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Mar 28 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.5.0-0.23.gitcb3a0a6
|
||||||
|
- Skip installation of artifacts which files are not regular files
|
||||||
|
- Resolves: rhbz#1078967
|
||||||
|
|
||||||
* Mon Mar 17 2014 Michal Srb <msrb@redhat.com> - 1.5.0-0.22.gitcb3a0a6
|
* Mon Mar 17 2014 Michal Srb <msrb@redhat.com> - 1.5.0-0.22.gitcb3a0a6
|
||||||
- Add missing BR: modello-maven-plugin
|
- Add missing BR: modello-maven-plugin
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user