import xmvn-3.0.0-21.module+el8+2598+06babf2e

This commit is contained in:
CentOS Sources 2019-08-01 22:45:09 -04:00 committed by Stepan Oksanichenko
commit 230a713eec
10 changed files with 2633 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
SOURCES/xmvn-3.0.0.tar.xz

1
.xmvn.metadata Normal file
View File

@ -0,0 +1 @@
d887a65c5649459f513dd70c688b080e47afc691 SOURCES/xmvn-3.0.0.tar.xz

View File

@ -0,0 +1,58 @@
From 336cbdc97f3c7055ebdf858141bfc160fd4d412b Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Fri, 8 Dec 2017 18:00:54 +0100
Subject: [PATCH] Don't use JAXB for converting bytes to hex string
---
.../java/org/fedoraproject/xmvn/resolver/impl/CacheManager.java | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/xmvn-core/src/main/java/org/fedoraproject/xmvn/resolver/impl/CacheManager.java b/xmvn-core/src/main/java/org/fedoraproject/xmvn/resolver/impl/CacheManager.java
index 1d6c193b..0902aa88 100644
--- a/xmvn-core/src/main/java/org/fedoraproject/xmvn/resolver/impl/CacheManager.java
+++ b/xmvn-core/src/main/java/org/fedoraproject/xmvn/resolver/impl/CacheManager.java
@@ -16,14 +16,13 @@
package org.fedoraproject.xmvn.resolver.impl;
import java.io.IOException;
+import java.math.BigInteger;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
-import javax.xml.bind.annotation.adapters.HexBinaryAdapter;
-
/**
* @author Mikolaj Izdebski
*/
@@ -31,8 +30,6 @@ class CacheManager
{
private static final String DIGEST_ALGORITHM = "SHA-1";
- private final HexBinaryAdapter hexAdapter;
-
private final MessageDigest digest;
private static volatile Path cacheHome;
@@ -41,7 +38,6 @@ class CacheManager
{
try
{
- hexAdapter = new HexBinaryAdapter();
digest = MessageDigest.getInstance( DIGEST_ALGORITHM );
}
catch ( NoSuchAlgorithmException e )
@@ -53,7 +49,7 @@ class CacheManager
private String hash( Path path )
throws IOException
{
- return hexAdapter.marshal( digest.digest( Files.readAllBytes( path ) ) );
+ return new BigInteger( 1, digest.digest( Files.readAllBytes( path ) ) ).setBit( 160 ).toString( 16 ).substring( 1 ).toUpperCase();
}
private static Path getPathDefault( String key, Object defaultValue )
--
2.14.3

View File

@ -0,0 +1,76 @@
From 46ad87218f0be4a4b7e292a1c8b5d5dbce48ae63 Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Fri, 16 Mar 2018 11:10:35 +0100
Subject: [PATCH] Fix configuration of aliased plugins
Normally Maven tries to look up plugin configuration using plugin
coordinates taken from plugin descriptor. This works with pure Maven
as plugin descriptor always matches <plugin> reference in POM.
However in XMvn they can differ when plugin artifact is resolved
throug artifact alias, so XMvn should force use of coordinates
specified in <plugin> in POM.
---
.../aether/XMvnMojoExecutionConfigurator.java | 51 ++++++++++++++++++++++
1 file changed, 51 insertions(+)
create mode 100644 xmvn-connector-aether/src/main/java/org/fedoraproject/xmvn/connector/aether/XMvnMojoExecutionConfigurator.java
diff --git a/xmvn-connector-aether/src/main/java/org/fedoraproject/xmvn/connector/aether/XMvnMojoExecutionConfigurator.java b/xmvn-connector-aether/src/main/java/org/fedoraproject/xmvn/connector/aether/XMvnMojoExecutionConfigurator.java
new file mode 100644
index 00000000..72e38b37
--- /dev/null
+++ b/xmvn-connector-aether/src/main/java/org/fedoraproject/xmvn/connector/aether/XMvnMojoExecutionConfigurator.java
@@ -0,0 +1,51 @@
+/*-
+ * Copyright (c) 2018 Red Hat, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.fedoraproject.xmvn.connector.aether;
+
+import org.apache.maven.lifecycle.MojoExecutionConfigurator;
+import org.apache.maven.lifecycle.internal.DefaultMojoExecutionConfigurator;
+import org.apache.maven.plugin.MojoExecution;
+import org.apache.maven.plugin.descriptor.PluginDescriptor;
+import org.apache.maven.project.MavenProject;
+import org.codehaus.plexus.component.annotations.Component;
+
+/**
+ * @author Mikolaj Izdebski
+ */
+@Component( role = MojoExecutionConfigurator.class )
+public class XMvnMojoExecutionConfigurator
+ extends DefaultMojoExecutionConfigurator
+{
+ @Override
+ public void configure( MavenProject project, MojoExecution execution, boolean allowPluginLevelConfig )
+ {
+ PluginDescriptor originalPluginDescriptor = execution.getMojoDescriptor().getPluginDescriptor();
+
+ PluginDescriptor aliasedPluginDescriptor = originalPluginDescriptor.clone();
+ aliasedPluginDescriptor.setGroupId( execution.getPlugin().getGroupId() );
+ aliasedPluginDescriptor.setArtifactId( execution.getPlugin().getArtifactId() );
+
+ try
+ {
+ execution.getMojoDescriptor().setPluginDescriptor( aliasedPluginDescriptor );
+ super.configure( project, execution, allowPluginLevelConfig );
+ }
+ finally
+ {
+ execution.getMojoDescriptor().setPluginDescriptor( originalPluginDescriptor );
+ }
+ }
+}
--
2.14.3

View File

@ -0,0 +1,403 @@
From 0fd7b0d19bd96456292585e883e3ba2ebbaf579b Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Wed, 21 Jun 2017 10:21:10 +0200
Subject: [PATCH] Fix installer plugin loading
---
.../install/impl/ArtifactInstallerFactory.java | 97 ++++++--
.../tools/install/impl/IsolatedClassRealm.java | 245 +++++++++++++++++++++
2 files changed, 320 insertions(+), 22 deletions(-)
create mode 100644 xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/impl/IsolatedClassRealm.java
diff --git a/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/impl/ArtifactInstallerFactory.java b/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/impl/ArtifactInstallerFactory.java
index 7a80571..e6a9a2d 100644
--- a/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/impl/ArtifactInstallerFactory.java
+++ b/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/impl/ArtifactInstallerFactory.java
@@ -15,8 +15,17 @@
*/
package org.fedoraproject.xmvn.tools.install.impl;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
import java.util.Arrays;
-import java.util.Collection;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
import java.util.Properties;
import org.slf4j.Logger;
@@ -35,49 +44,93 @@ class ArtifactInstallerFactory
private final ArtifactInstaller defaultArtifactInstaller;
- private final ArtifactInstaller eclipseArtifactInstaller;
+ private final IsolatedClassRealm pluginRealm;
- private static ArtifactInstaller loadPlugin( String className )
+ private final Map<String, ArtifactInstaller> cachedPluginsByType = new LinkedHashMap<>();
+
+ private final Map<String, ArtifactInstaller> cachedPluginsByImplClass = new LinkedHashMap<>();
+
+ private ArtifactInstaller tryLoadPlugin( String type )
{
+ if ( cachedPluginsByType.containsKey( type ) )
+ return cachedPluginsByType.get( type );
+
try
{
- return (ArtifactInstaller) ArtifactInstallerFactory.class.getClassLoader().loadClass( className ).newInstance();
+ String resourceName = ArtifactInstaller.class.getCanonicalName() + "/" + type;
+ InputStream resourceStream = pluginRealm != null ? pluginRealm.getResourceAsStream( resourceName ) : null;
+ if ( resourceStream == null )
+ {
+ logger.debug( "No XMvn Installer plugin found for packaging type {}", type );
+ cachedPluginsByType.put( type, null );
+ return null;
+ }
+
+ String pluginImplClass;
+ try ( BufferedReader resourceReader = new BufferedReader( new InputStreamReader( resourceStream ) ) )
+ {
+ pluginImplClass = resourceReader.readLine();
+ }
+
+ ArtifactInstaller pluggedInInstaller = cachedPluginsByImplClass.get( pluginImplClass );
+ if ( pluggedInInstaller == null )
+ {
+ pluggedInInstaller = (ArtifactInstaller) pluginRealm.loadClass( pluginImplClass ).newInstance();
+ cachedPluginsByImplClass.put( pluginImplClass, pluggedInInstaller );
+ }
+
+ cachedPluginsByType.put( type, pluggedInInstaller );
+ return pluggedInInstaller;
}
- catch ( ReflectiveOperationException e )
+ catch ( IOException | ReflectiveOperationException e )
{
- return null;
+ throw new RuntimeException( "Unable to load XMvn Installer plugin for packaging type " + type, e );
}
}
public ArtifactInstallerFactory( Configurator configurator )
{
defaultArtifactInstaller = new DefaultArtifactInstaller( configurator );
- // FIXME Don't hardcode plugin class name
- eclipseArtifactInstaller = loadPlugin( "org.fedoraproject.p2.xmvn.EclipseArtifactInstaller" );
+
+ Path pluginDir = Paths.get( "/usr/share/xmvn/lib/installer" );
+ if ( Files.isDirectory( pluginDir ) )
+ {
+ ClassLoader parentClassLoader = ArtifactInstallerFactory.class.getClassLoader();
+ pluginRealm = new IsolatedClassRealm( parentClassLoader );
+ pluginRealm.addJarDirectory( pluginDir );
+ PLUGIN_IMPORTS.forEach( pluginRealm::importPackage );
+ }
+ else
+ {
+ pluginRealm = null;
+ }
}
/**
- * List of Tycho pacgkaging types.
+ * List of packages imported from XMvn Installer class loader to plug-in realms.
*/
- private static final Collection<String> ECLIPSE_PACKAGING_TYPES = Arrays.asList( "eclipse-plugin", //
- "eclipse-test-plugin", //
- "eclipse-feature", //
- "eclipse-repository", //
- "eclipse-application", //
- "eclipse-update-site", //
- "eclipse-target-definition" );
+ private static final List<String> PLUGIN_IMPORTS = Arrays.asList( // XMvn API
+ "org.fedoraproject.xmvn.artifact", //
+ "org.fedoraproject.xmvn.config", //
+ "org.fedoraproject.xmvn.deployer", //
+ "org.fedoraproject.xmvn.locator", //
+ "org.fedoraproject.xmvn.metadata", //
+ "org.fedoraproject.xmvn.resolver", //
+ // XMvn Installer SPI
+ "org.fedoraproject.xmvn.tools.install", //
+ // SLF4J API
+ "org.slf4j" //
+ );
@SuppressWarnings( "unused" )
public ArtifactInstaller getInstallerFor( Artifact artifact, Properties properties )
{
String type = properties.getProperty( "type" );
- if ( type != null && ECLIPSE_PACKAGING_TYPES.contains( type ) )
+ if ( type != null )
{
- if ( eclipseArtifactInstaller != null )
- return eclipseArtifactInstaller;
-
- logger.error( "Unable to load XMvn P2 plugin, Eclipse artifact installation will be impossible" );
- throw new RuntimeException( "Unable to load XMvn P2 plugin" );
+ ArtifactInstaller pluggedInInstaller = tryLoadPlugin( type );
+ if ( pluggedInInstaller != null )
+ return pluggedInInstaller;
}
return defaultArtifactInstaller;
diff --git a/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/impl/IsolatedClassRealm.java b/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/impl/IsolatedClassRealm.java
new file mode 100644
index 0000000..3324604
--- /dev/null
+++ b/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/impl/IsolatedClassRealm.java
@@ -0,0 +1,245 @@
+/*-
+ * Copyright (c) 2014-2017 Red Hat, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.fedoraproject.xmvn.tools.install.impl;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.nio.file.DirectoryStream;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.HashSet;
+import java.util.LinkedHashSet;
+import java.util.Set;
+
+/**
+ * A generic, isolated class loader.
+ * <p>
+ * This class loader has its own classpath, separate from the primary Java classpath. It has a parent class loader, to
+ * which it delegates loading a set of imported classes. All other classes are loaded from its own classpath.
+ *
+ * @author Mikolaj Izdebski
+ */
+class IsolatedClassRealm
+ extends URLClassLoader
+{
+ static
+ {
+ registerAsParallelCapable();
+ }
+
+ private final ClassLoader parent;
+
+ private final Set<String> imports = new HashSet<>();
+
+ private final Set<String> importsAll = new HashSet<>();
+
+ public IsolatedClassRealm( ClassLoader parent )
+ {
+ super( new URL[0], null );
+ this.parent = parent;
+ }
+
+ public void addJar( Path jar )
+ {
+ try
+ {
+ addURL( jar.toUri().toURL() );
+ }
+ catch ( MalformedURLException e )
+ {
+ throw new RuntimeException( e );
+ }
+ }
+
+ public void addJarDirectory( Path dir )
+ {
+ try ( DirectoryStream<Path> stream = Files.newDirectoryStream( dir, "*.jar" ) )
+ {
+ for ( Path path : stream )
+ {
+ addJar( path );
+ }
+ }
+ catch ( IOException e )
+ {
+ throw new RuntimeException( e );
+ }
+ }
+
+ public void importPackage( String packageName )
+ {
+ imports.add( packageName );
+ }
+
+ public void importAllPackages( String packageName )
+ {
+ importsAll.add( packageName );
+ }
+
+ boolean isImported( String name )
+ {
+ int index = name.lastIndexOf( '/' );
+
+ if ( index >= 0 )
+ {
+ name = name.replace( '/', '.' );
+ }
+ else
+ {
+ index = Math.max( name.lastIndexOf( '.' ), 0 );
+ }
+
+ String namespace = name.substring( 0, index );
+
+ if ( imports.contains( namespace ) )
+ return true;
+
+ while ( !namespace.isEmpty() )
+ {
+ if ( importsAll.contains( namespace ) )
+ return true;
+
+ namespace = namespace.substring( 0, Math.max( namespace.lastIndexOf( '.' ), 0 ) );
+ }
+
+ return false;
+ }
+
+ @Override
+ public Class<?> loadClass( String name )
+ throws ClassNotFoundException
+ {
+ return loadClass( name, false );
+ }
+
+ @Override
+ protected Class<?> loadClass( String name, boolean resolve )
+ throws ClassNotFoundException
+ {
+ if ( isImported( name ) )
+ {
+ try
+ {
+ return parent.loadClass( name );
+ }
+ catch ( ClassNotFoundException e )
+ {
+ }
+ }
+
+ try
+ {
+ return super.loadClass( name, resolve );
+ }
+ catch ( ClassNotFoundException e )
+ {
+ }
+
+ synchronized ( getClassLoadingLock( name ) )
+ {
+ Class<?> clazz = findLoadedClass( name );
+ if ( clazz != null )
+ {
+ return clazz;
+ }
+
+ try
+ {
+ return super.findClass( name );
+ }
+ catch ( ClassNotFoundException e )
+ {
+ }
+ }
+
+ throw new ClassNotFoundException( name );
+ }
+
+ @Override
+ protected Class<?> findClass( String name )
+ throws ClassNotFoundException
+ {
+ throw new ClassNotFoundException( name );
+ }
+
+ @Override
+ public URL getResource( String name )
+ {
+ if ( isImported( name ) )
+ {
+ URL resource = parent.getResource( name );
+ if ( resource != null )
+ {
+ return resource;
+ }
+ }
+
+ URL resource = super.getResource( name );
+ if ( resource != null )
+ {
+ return resource;
+ }
+
+ resource = super.findResource( name );
+ if ( resource != null )
+ {
+ return resource;
+ }
+
+ return null;
+ }
+
+ @Override
+ public Enumeration<URL> getResources( String name )
+ throws IOException
+ {
+ Collection<URL> resources = new LinkedHashSet<>();
+
+ if ( isImported( name ) )
+ {
+ try
+ {
+ resources.addAll( Collections.list( parent.getResources( name ) ) );
+ }
+ catch ( IOException e )
+ {
+ }
+ }
+
+ try
+ {
+ resources.addAll( Collections.list( super.getResources( name ) ) );
+ }
+ catch ( IOException e )
+ {
+ }
+
+ try
+ {
+ resources.addAll( Collections.list( super.findResources( name ) ) );
+ }
+ catch ( IOException e )
+ {
+ }
+
+ return Collections.enumeration( resources );
+ }
+}
--
2.9.3

View File

@ -0,0 +1,568 @@
From 34b37637bd469621bb3eadfdf5fb856a806722df Mon Sep 17 00:00:00 2001
From: Michael Simacek <msimacek@redhat.com>
Date: Mon, 2 Oct 2017 12:01:09 +0300
Subject: [PATCH] Port to Gradle 4.2
---
libs/gradle-core-api/pom.xml | 32 ++++++
libs/gradle-logging/pom.xml | 32 ++++++
libs/gradle-model-core/pom.xml | 32 ++++++
libs/pom.xml | 3 +
xmvn-connector-gradle/pom.xml | 15 +++
.../xmvn/connector/gradle/GradleResolver.java | 119 ++++++++++++++-------
.../xmvn/connector/gradle/XMvnGradlePlugin.java | 16 +--
.../xmvn/connector/gradle/XMvnInstallTask.java | 22 +++-
xmvn-parent/pom.xml | 17 ++-
9 files changed, 235 insertions(+), 53 deletions(-)
create mode 100644 libs/gradle-core-api/pom.xml
create mode 100644 libs/gradle-logging/pom.xml
create mode 100644 libs/gradle-model-core/pom.xml
diff --git a/libs/gradle-core-api/pom.xml b/libs/gradle-core-api/pom.xml
new file mode 100644
index 00000000..7b3d68d5
--- /dev/null
+++ b/libs/gradle-core-api/pom.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!--
+ ! Copyright (c) 2016-2017 Red Hat, Inc.
+ !
+ ! Licensed under the Apache License, Version 2.0 (the "License");
+ ! you may not use this file except in compliance with the License.
+ ! You may obtain a copy of the License at
+ !
+ ! http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing, software
+ ! distributed under the License is distributed on an "AS IS" BASIS,
+ ! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ! See the License for the specific language governing permissions and
+ ! limitations under the License.
+ `-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.fedoraproject.xmvn</groupId>
+ <artifactId>libs</artifactId>
+ <version>3.0.0</version>
+ <relativePath>..</relativePath>
+ </parent>
+ <groupId>org.gradle</groupId>
+ <artifactId>gradle-core-api</artifactId>
+ <version>${gradleVersion}</version>
+ <name>Gradle core API module</name>
+</project>
diff --git a/libs/gradle-logging/pom.xml b/libs/gradle-logging/pom.xml
new file mode 100644
index 00000000..d2dec7c1
--- /dev/null
+++ b/libs/gradle-logging/pom.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!--
+ ! Copyright (c) 2016-2017 Red Hat, Inc.
+ !
+ ! Licensed under the Apache License, Version 2.0 (the "License");
+ ! you may not use this file except in compliance with the License.
+ ! You may obtain a copy of the License at
+ !
+ ! http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing, software
+ ! distributed under the License is distributed on an "AS IS" BASIS,
+ ! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ! See the License for the specific language governing permissions and
+ ! limitations under the License.
+ `-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.fedoraproject.xmvn</groupId>
+ <artifactId>libs</artifactId>
+ <version>3.0.0</version>
+ <relativePath>..</relativePath>
+ </parent>
+ <groupId>org.gradle</groupId>
+ <artifactId>gradle-logging</artifactId>
+ <version>${gradleVersion}</version>
+ <name>Gradle logging module</name>
+</project>
diff --git a/libs/gradle-model-core/pom.xml b/libs/gradle-model-core/pom.xml
new file mode 100644
index 00000000..f841b960
--- /dev/null
+++ b/libs/gradle-model-core/pom.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!--
+ ! Copyright (c) 2016-2017 Red Hat, Inc.
+ !
+ ! Licensed under the Apache License, Version 2.0 (the "License");
+ ! you may not use this file except in compliance with the License.
+ ! You may obtain a copy of the License at
+ !
+ ! http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing, software
+ ! distributed under the License is distributed on an "AS IS" BASIS,
+ ! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ! See the License for the specific language governing permissions and
+ ! limitations under the License.
+ `-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.fedoraproject.xmvn</groupId>
+ <artifactId>libs</artifactId>
+ <version>3.0.0</version>
+ <relativePath>..</relativePath>
+ </parent>
+ <groupId>org.gradle</groupId>
+ <artifactId>gradle-model-core</artifactId>
+ <version>${gradleVersion}</version>
+ <name>Gradle model-core module</name>
+</project>
diff --git a/libs/pom.xml b/libs/pom.xml
index 2b31c5d0..fc29e359 100644
--- a/libs/pom.xml
+++ b/libs/pom.xml
@@ -37,8 +37,11 @@
<module>gradle-base-services</module>
<module>gradle-base-services-groovy</module>
<module>gradle-core</module>
+ <module>gradle-core-api</module>
+ <module>gradle-model-core</module>
<module>gradle-dependency-management</module>
<module>gradle-resources</module>
+ <module>gradle-logging</module>
</modules>
<dependencies>
<dependency>
diff --git a/xmvn-connector-gradle/pom.xml b/xmvn-connector-gradle/pom.xml
index b433e5dd..f18a285e 100644
--- a/xmvn-connector-gradle/pom.xml
+++ b/xmvn-connector-gradle/pom.xml
@@ -54,11 +54,21 @@
</dependency>
<dependency>
<groupId>org.gradle</groupId>
+ <artifactId>gradle-core-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.gradle</groupId>
<artifactId>gradle-core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.gradle</groupId>
+ <artifactId>gradle-model-core</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.gradle</groupId>
<artifactId>gradle-dependency-management</artifactId>
<scope>provided</scope>
</dependency>
@@ -68,6 +78,11 @@
<scope>provided</scope>
</dependency>
<dependency>
+ <groupId>org.gradle</groupId>
+ <artifactId>gradle-logging</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<groupId>org.apache.ivy</groupId>
<artifactId>ivy</artifactId>
<scope>provided</scope>
diff --git a/xmvn-connector-gradle/src/main/java/org/fedoraproject/xmvn/connector/gradle/GradleResolver.java b/xmvn-connector-gradle/src/main/java/org/fedoraproject/xmvn/connector/gradle/GradleResolver.java
index a81c5bc0..6305aa86 100644
--- a/xmvn-connector-gradle/src/main/java/org/fedoraproject/xmvn/connector/gradle/GradleResolver.java
+++ b/xmvn-connector-gradle/src/main/java/org/fedoraproject/xmvn/connector/gradle/GradleResolver.java
@@ -18,41 +18,47 @@ package org.fedoraproject.xmvn.connector.gradle;
import java.nio.file.Path;
import java.util.Collections;
import java.util.LinkedHashSet;
+import java.util.Map;
import java.util.Set;
+import org.gradle.api.artifacts.ComponentMetadataSupplier;
import org.gradle.api.artifacts.ModuleVersionIdentifier;
+import org.gradle.api.artifacts.component.ComponentArtifactIdentifier;
import org.gradle.api.artifacts.component.ModuleComponentIdentifier;
+import org.gradle.api.internal.artifacts.ImmutableModuleIdentifierFactory;
import org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ConfiguredModuleComponentRepository;
import org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ModuleComponentRepositoryAccess;
import org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.DescriptorParseContext;
-import org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.GradlePomModuleDescriptorParser;
import org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.MetaDataParser;
-import org.gradle.api.internal.artifacts.ivyservice.ivyresolve.strategy.DefaultVersionComparator;
-import org.gradle.api.internal.artifacts.ivyservice.ivyresolve.strategy.DefaultVersionSelectorScheme;
+import org.gradle.api.internal.artifacts.ivyservice.resolveengine.artifact.ResolvableArtifact;
import org.gradle.api.internal.artifacts.repositories.AbstractArtifactRepository;
import org.gradle.api.internal.artifacts.repositories.ResolutionAwareRepository;
+import org.gradle.api.internal.artifacts.repositories.resolver.MetadataFetchingCost;
import org.gradle.api.internal.component.ArtifactType;
-import org.gradle.internal.component.external.model.DefaultMavenModuleResolveMetaData;
-import org.gradle.internal.component.external.model.DefaultModuleComponentArtifactMetaData;
-import org.gradle.internal.component.external.model.ModuleComponentResolveMetaData;
-import org.gradle.internal.component.external.model.MutableModuleComponentResolveMetaData;
-import org.gradle.internal.component.model.ComponentArtifactMetaData;
+import org.gradle.internal.component.external.model.DefaultModuleComponentArtifactMetadata;
+import org.gradle.internal.component.external.model.DefaultMutableMavenModuleResolveMetadata;
+import org.gradle.internal.component.external.model.FixedComponentArtifacts;
+import org.gradle.internal.component.external.model.ModuleComponentArtifactMetadata;
+import org.gradle.internal.component.external.model.ModuleComponentResolveMetadata;
+import org.gradle.internal.component.external.model.MutableMavenModuleResolveMetadata;
+import org.gradle.internal.component.external.model.MutableModuleComponentResolveMetadata;
+import org.gradle.internal.component.model.ComponentArtifactMetadata;
import org.gradle.internal.component.model.ComponentOverrideMetadata;
-import org.gradle.internal.component.model.ComponentResolveMetaData;
-import org.gradle.internal.component.model.ComponentUsage;
+import org.gradle.internal.component.model.ComponentResolveMetadata;
import org.gradle.internal.component.model.DefaultIvyArtifactName;
-import org.gradle.internal.component.model.DependencyMetaData;
+import org.gradle.internal.component.model.DependencyMetadata;
import org.gradle.internal.component.model.IvyArtifactName;
import org.gradle.internal.component.model.ModuleSource;
import org.gradle.internal.resolve.ArtifactResolveException;
import org.gradle.internal.resolve.ModuleVersionResolveException;
import org.gradle.internal.resolve.result.BuildableArtifactResolveResult;
import org.gradle.internal.resolve.result.BuildableArtifactSetResolveResult;
+import org.gradle.internal.resolve.result.BuildableComponentArtifactsResolveResult;
import org.gradle.internal.resolve.result.BuildableModuleComponentMetaDataResolveResult;
import org.gradle.internal.resolve.result.BuildableModuleVersionListingResolveResult;
-import org.gradle.internal.resource.local.DefaultLocallyAvailableExternalResource;
-import org.gradle.internal.resource.local.DefaultLocallyAvailableResource;
+import org.gradle.internal.resource.local.FileResourceRepository;
import org.gradle.internal.resource.local.LocallyAvailableExternalResource;
+import org.gradle.internal.resource.metadata.DefaultExternalResourceMetaData;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -72,6 +78,21 @@ public class GradleResolver
implements ResolutionAwareRepository, ConfiguredModuleComponentRepository, ModuleComponentRepositoryAccess,
DescriptorParseContext
{
+ public GradleResolver( MetaDataParser<MutableMavenModuleResolveMetadata> pomParser,
+ ImmutableModuleIdentifierFactory moduleIdentifierFactory,
+ FileResourceRepository fileRepository )
+ {
+ this.pomParser = pomParser;
+ this.moduleIdentifierFactory = moduleIdentifierFactory;
+ this.fileRepository = fileRepository;
+ }
+
+ private MetaDataParser<MutableMavenModuleResolveMetadata> pomParser;
+
+ private ImmutableModuleIdentifierFactory moduleIdentifierFactory;
+
+ private FileResourceRepository fileRepository;
+
private final Logger logger = LoggerFactory.getLogger( GradleResolver.class );
static class LazyLocatorProvider
@@ -135,17 +156,17 @@ public class GradleResolver
}
@Override
- public void listModuleVersions( DependencyMetaData arg0, BuildableModuleVersionListingResolveResult arg1 )
+ public void listModuleVersions( DependencyMetadata arg0, BuildableModuleVersionListingResolveResult arg1 )
{
logger.debug( "listModuleVersions() called, but it is NOT IMPLEMENTED" );
}
@Override
- public void resolveArtifact( ComponentArtifactMetaData artifact, ModuleSource module,
+ public void resolveArtifact( ComponentArtifactMetadata artifact, ModuleSource module,
BuildableArtifactResolveResult result )
{
ModuleVersionIdentifier moduleId =
- ( (DefaultModuleComponentArtifactMetaData) artifact ).toArtifactIdentifier().getModuleVersionIdentifier();
+ ( (DefaultModuleComponentArtifactMetadata) artifact ).toArtifactIdentifier().getModuleVersionIdentifier();
String groupId = moduleId.getGroup();
String artifactId = artifact.getName().getName();
String extension = artifact.getName().getExtension();
@@ -180,11 +201,9 @@ public class GradleResolver
{
logger.debug( "Found Maven POM: {}", pomPath );
- MetaDataParser<DefaultMavenModuleResolveMetaData> parser =
- new GradlePomModuleDescriptorParser( new DefaultVersionSelectorScheme( new DefaultVersionComparator() ) );
- MutableModuleComponentResolveMetaData metaData = parser.parseMetaData( this, pomPath.toFile() );
+ MutableModuleComponentResolveMetadata metaData = pomParser.parseMetaData( this, pomPath.toFile() );
- result.resolved( metaData );
+ result.resolved( metaData.asImmutable() );
return;
}
else
@@ -204,9 +223,11 @@ public class GradleResolver
if ( path != null )
{
logger.debug( "Artifact {} found, returning minimal model", artifact3 );
- MutableModuleComponentResolveMetaData metaData =
- new DefaultMavenModuleResolveMetaData( id, request.getArtifacts() );
- result.resolved( metaData );
+ ModuleVersionIdentifier mvi =
+ moduleIdentifierFactory.moduleWithVersion( id.getGroup(), id.getModule(), id.getVersion() );
+ MutableModuleComponentResolveMetadata metaData =
+ new DefaultMutableMavenModuleResolveMetadata( mvi, id, request.getArtifacts() );
+ result.resolved( metaData.asImmutable() );
return;
}
}
@@ -224,24 +245,15 @@ public class GradleResolver
if ( artifactSet.isEmpty() )
{
- artifactSet.add( new DefaultIvyArtifactName( id.getModule(), "jar", "jar",
- Collections.<String, String>emptyMap() ) );
+ artifactSet.add( new DefaultIvyArtifactName( id.getModule(), "jar", "jar", null ) );
}
return artifactSet;
}
@Override
- public void resolveModuleArtifacts( ComponentResolveMetaData component, ComponentUsage usage,
- BuildableArtifactSetResolveResult result )
- {
- result.resolved( Collections.singleton( ( (ModuleComponentResolveMetaData) component ).artifact( "jar", "jar",
- null ) ) );
- }
-
- @Override
- public void resolveModuleArtifacts( ComponentResolveMetaData component, ArtifactType type,
- BuildableArtifactSetResolveResult result )
+ public void resolveArtifactsWithType( ComponentResolveMetadata component, ArtifactType type,
+ BuildableArtifactSetResolveResult result )
{
if ( type != ArtifactType.MAVEN_POM )
{
@@ -250,15 +262,22 @@ public class GradleResolver
return;
}
- ModuleComponentResolveMetaData metaData = (ModuleComponentResolveMetaData) component;
- ModuleComponentIdentifier id = metaData.getComponentId();
+ ModuleComponentIdentifier id = (ModuleComponentIdentifier) component.getComponentId();
DefaultIvyArtifactName name = new DefaultIvyArtifactName( id.getModule(), "pom", "pom" );
- DefaultModuleComponentArtifactMetaData resolvedMetaData =
- new DefaultModuleComponentArtifactMetaData( id, name );
+ DefaultModuleComponentArtifactMetadata resolvedMetaData =
+ new DefaultModuleComponentArtifactMetadata( id, name );
result.resolved( Collections.singleton( resolvedMetaData ) );
}
@Override
+ public void resolveArtifacts( ComponentResolveMetadata component, BuildableComponentArtifactsResolveResult result )
+ {
+ ModuleComponentArtifactMetadata artifact =
+ ( (ModuleComponentResolveMetadata) component ).artifact( "jar", "jar", null );
+ result.resolved( new FixedComponentArtifacts( Collections.singleton( artifact ) ) );
+ }
+
+ @Override
public LocallyAvailableExternalResource getMetaDataArtifact( ModuleComponentIdentifier id, ArtifactType type )
{
Path pomPath = resolve( new DefaultArtifact( id.getGroup(), id.getModule(), "pom", id.getVersion() ) );
@@ -266,7 +285,25 @@ public class GradleResolver
if ( pomPath == null )
return null;
- return new DefaultLocallyAvailableExternalResource( pomPath.toUri(),
- new DefaultLocallyAvailableResource( pomPath.toFile() ) );
+ DefaultExternalResourceMetaData metadata = new DefaultExternalResourceMetaData( pomPath.toUri(), 0, 0 );
+ return fileRepository.resource( pomPath.toFile(), pomPath.toUri(), metadata );
+ }
+
+ @Override
+ public ComponentMetadataSupplier createMetadataSupplier()
+ {
+ return null;
+ }
+
+ @Override
+ public Map<ComponentArtifactIdentifier, ResolvableArtifact> getArtifactCache()
+ {
+ return Collections.emptyMap();
+ }
+
+ @Override
+ public MetadataFetchingCost estimateMetadataFetchingCost( ModuleComponentIdentifier arg0 )
+ {
+ return MetadataFetchingCost.CHEAP;
}
}
diff --git a/xmvn-connector-gradle/src/main/java/org/fedoraproject/xmvn/connector/gradle/XMvnGradlePlugin.java b/xmvn-connector-gradle/src/main/java/org/fedoraproject/xmvn/connector/gradle/XMvnGradlePlugin.java
index 2646f098..c3250e3c 100644
--- a/xmvn-connector-gradle/src/main/java/org/fedoraproject/xmvn/connector/gradle/XMvnGradlePlugin.java
+++ b/xmvn-connector-gradle/src/main/java/org/fedoraproject/xmvn/connector/gradle/XMvnGradlePlugin.java
@@ -15,9 +15,11 @@
*/
package org.fedoraproject.xmvn.connector.gradle;
+import groovy.lang.Closure;
+import groovy.lang.GroovyShell;
import org.gradle.api.Plugin;
import org.gradle.api.Task;
-import org.gradle.api.artifacts.repositories.ArtifactRepository;
+import org.gradle.api.artifacts.dsl.RepositoryHandler;
import org.gradle.api.invocation.Gradle;
/**
@@ -26,15 +28,17 @@ import org.gradle.api.invocation.Gradle;
public class XMvnGradlePlugin
implements Plugin<Gradle>
{
+ private void configureRepositories( RepositoryHandler repositories )
+ {
+ repositories.configure( (Closure<?>) new GroovyShell().evaluate( "{ it -> xmvn() }" ) );
+ }
+
@Override
public void apply( Gradle gradle )
{
- ArtifactRepository repo = new GradleResolver();
- repo.setName( "xmvn" );
-
gradle.allprojects( project -> {
- project.getRepositories().addFirst( repo );
- project.getBuildscript().getRepositories().addFirst( repo );
+ configureRepositories( project.getRepositories() );
+ configureRepositories( project.getBuildscript().getRepositories() );
Task upload = project.getTasks().create( "xmvnInstall", XMvnInstallTask.class );
upload.setDescription( "Installs all artifacts through XMvn" );
diff --git a/xmvn-connector-gradle/src/main/java/org/fedoraproject/xmvn/connector/gradle/XMvnInstallTask.java b/xmvn-connector-gradle/src/main/java/org/fedoraproject/xmvn/connector/gradle/XMvnInstallTask.java
index 196f4a5b..07905f1f 100644
--- a/xmvn-connector-gradle/src/main/java/org/fedoraproject/xmvn/connector/gradle/XMvnInstallTask.java
+++ b/xmvn-connector-gradle/src/main/java/org/fedoraproject/xmvn/connector/gradle/XMvnInstallTask.java
@@ -17,6 +17,7 @@ package org.fedoraproject.xmvn.connector.gradle;
import java.nio.file.Files;
import java.util.Collections;
+import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
@@ -32,7 +33,7 @@ import org.gradle.api.artifacts.PublishArtifact;
import org.gradle.api.artifacts.PublishException;
import org.gradle.api.component.SoftwareComponent;
import org.gradle.api.internal.component.SoftwareComponentInternal;
-import org.gradle.api.internal.component.Usage;
+import org.gradle.api.internal.component.UsageContext;
import org.gradle.api.tasks.TaskAction;
import org.fedoraproject.xmvn.artifact.Artifact;
@@ -83,7 +84,7 @@ class XMvnInstallTask
Project dependencyProject = projectDependency.getDependencyProject();
Stream<SoftwareComponent> components = dependencyProject.getComponents().stream();
Stream<SoftwareComponentInternal> internalComponents = components.map( c -> (SoftwareComponentInternal) c );
- Stream<Usage> usages = internalComponents.flatMap( ic -> ic.getUsages().stream() );
+ Stream<UsageContext> usages = internalComponents.flatMap( ic -> ic.getUsages().stream() );
Stream<PublishArtifact> publishArtifacts = usages.flatMap( usage -> usage.getArtifacts().stream() );
Stream<Artifact> artifacts = publishArtifacts.map( pa -> getPublishArtifact( dependencyProject, pa ) );
return artifacts.collect( Collectors.toList() );
@@ -144,7 +145,13 @@ class XMvnInstallTask
}
}
- DeploymentResult result = getDeployer().deploy( request );
+ DeploymentResult result;
+
+ // prevent parallel access to installation plan
+ synchronized ( XMvnInstallTask.class )
+ {
+ result = getDeployer().deploy( request );
+ }
if ( result.getException() != null )
{
@@ -155,17 +162,22 @@ class XMvnInstallTask
@TaskAction
protected void deployProject()
{
+ Set<PublishArtifact> seenArtifacts = new HashSet<>();
+
for ( SoftwareComponent component : getProject().getComponents() )
{
SoftwareComponentInternal internalComponent = (SoftwareComponentInternal) component;
- for ( Usage usage : internalComponent.getUsages() )
+ for ( UsageContext usage : internalComponent.getUsages() )
{
Set<ModuleDependency> dependencies = usage.getDependencies();
for ( PublishArtifact artifact : usage.getArtifacts() )
{
- deploy( artifact, dependencies );
+ if ( seenArtifacts.add( artifact ) )
+ {
+ deploy( artifact, dependencies );
+ }
}
}
}
diff --git a/xmvn-parent/pom.xml b/xmvn-parent/pom.xml
index 661cc24d..7e7a6d94 100644
--- a/xmvn-parent/pom.xml
+++ b/xmvn-parent/pom.xml
@@ -84,7 +84,7 @@
<atinjectVersion>1</atinjectVersion>
<ivyVersion>2.4.0</ivyVersion>
<jcommanderVersion>1.64</jcommanderVersion>
- <gradleVersion>2.13-rc-1</gradleVersion>
+ <gradleVersion>4.2.1</gradleVersion>
<groovyVersion>2.4.10</groovyVersion>
<mavenInvokerVersion>2.2</mavenInvokerVersion>
<mavenResolverVersion>1.0.3</mavenResolverVersion>
@@ -278,11 +278,21 @@
</dependency>
<dependency>
<groupId>org.gradle</groupId>
+ <artifactId>gradle-core-api</artifactId>
+ <version>${gradleVersion}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.gradle</groupId>
<artifactId>gradle-core</artifactId>
<version>${gradleVersion}</version>
</dependency>
<dependency>
<groupId>org.gradle</groupId>
+ <artifactId>gradle-model-core</artifactId>
+ <version>${gradleVersion}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.gradle</groupId>
<artifactId>gradle-dependency-management</artifactId>
<version>${gradleVersion}</version>
</dependency>
@@ -292,6 +302,11 @@
<version>${gradleVersion}</version>
</dependency>
<dependency>
+ <groupId>org.gradle</groupId>
+ <artifactId>gradle-logging</artifactId>
+ <version>${gradleVersion}</version>
+ </dependency>
+ <dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>${groovyVersion}</version>
--
2.13.6

View File

@ -0,0 +1,62 @@
From cd6cf796f7c2230c940f95f46dc905a25152c486 Mon Sep 17 00:00:00 2001
From: Michael Simacek <msimacek@redhat.com>
Date: Fri, 10 Nov 2017 15:13:45 +0200
Subject: [PATCH] Port to Gradle 4.3.1
---
.../java/org/fedoraproject/xmvn/connector/gradle/GradleResolver.java | 2 +-
.../java/org/fedoraproject/xmvn/connector/gradle/XMvnInstallTask.java | 4 ++--
xmvn-parent/pom.xml | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/xmvn-connector-gradle/src/main/java/org/fedoraproject/xmvn/connector/gradle/GradleResolver.java b/xmvn-connector-gradle/src/main/java/org/fedoraproject/xmvn/connector/gradle/GradleResolver.java
index 6305aa86..9e1a247a 100644
--- a/xmvn-connector-gradle/src/main/java/org/fedoraproject/xmvn/connector/gradle/GradleResolver.java
+++ b/xmvn-connector-gradle/src/main/java/org/fedoraproject/xmvn/connector/gradle/GradleResolver.java
@@ -226,7 +226,7 @@ public class GradleResolver
ModuleVersionIdentifier mvi =
moduleIdentifierFactory.moduleWithVersion( id.getGroup(), id.getModule(), id.getVersion() );
MutableModuleComponentResolveMetadata metaData =
- new DefaultMutableMavenModuleResolveMetadata( mvi, id, request.getArtifacts() );
+ DefaultMutableMavenModuleResolveMetadata.missing( mvi, id );
result.resolved( metaData.asImmutable() );
return;
}
diff --git a/xmvn-connector-gradle/src/main/java/org/fedoraproject/xmvn/connector/gradle/XMvnInstallTask.java b/xmvn-connector-gradle/src/main/java/org/fedoraproject/xmvn/connector/gradle/XMvnInstallTask.java
index 07905f1f..d220e266 100644
--- a/xmvn-connector-gradle/src/main/java/org/fedoraproject/xmvn/connector/gradle/XMvnInstallTask.java
+++ b/xmvn-connector-gradle/src/main/java/org/fedoraproject/xmvn/connector/gradle/XMvnInstallTask.java
@@ -116,7 +116,7 @@ class XMvnInstallTask
} ).collect( Collectors.toList() );
}
- private void deploy( PublishArtifact gradleArtifact, Set<ModuleDependency> dependencies )
+ private void deploy( PublishArtifact gradleArtifact, Set<? extends ModuleDependency> dependencies )
{
DeploymentRequest request = new DeploymentRequest();
@@ -170,7 +170,7 @@ class XMvnInstallTask
for ( UsageContext usage : internalComponent.getUsages() )
{
- Set<ModuleDependency> dependencies = usage.getDependencies();
+ Set<? extends ModuleDependency> dependencies = usage.getDependencies();
for ( PublishArtifact artifact : usage.getArtifacts() )
{
diff --git a/xmvn-parent/pom.xml b/xmvn-parent/pom.xml
index 7e7a6d94..910e27b6 100644
--- a/xmvn-parent/pom.xml
+++ b/xmvn-parent/pom.xml
@@ -84,7 +84,7 @@
<atinjectVersion>1</atinjectVersion>
<ivyVersion>2.4.0</ivyVersion>
<jcommanderVersion>1.64</jcommanderVersion>
- <gradleVersion>4.2.1</gradleVersion>
+ <gradleVersion>4.3.1</gradleVersion>
<groovyVersion>2.4.10</groovyVersion>
<mavenInvokerVersion>2.2</mavenInvokerVersion>
<mavenResolverVersion>1.0.3</mavenResolverVersion>
--
2.13.6

View File

@ -0,0 +1,30 @@
From 9aa9c66be355d95e2c532bbdfdc98bdbba9b6606 Mon Sep 17 00:00:00 2001
From: Michael Simacek <msimacek@redhat.com>
Date: Thu, 7 Dec 2017 15:50:52 +0200
Subject: [PATCH] Support setting "-Xdoclint:none" in m-javadoc-p >= 3.0.0
maven-javadoc-plugin 3.0.0 replaced `additionalparam` string property
with `additionalOptions` list property.
See: https://issues.apache.org/jira/browse/MJAVADOC-368
---
.../fedoraproject/xmvn/connector/aether/XMvnMojoExecutionListener.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/xmvn-connector-aether/src/main/java/org/fedoraproject/xmvn/connector/aether/XMvnMojoExecutionListener.java b/xmvn-connector-aether/src/main/java/org/fedoraproject/xmvn/connector/aether/XMvnMojoExecutionListener.java
index 5f9b5dd4..bb066638 100644
--- a/xmvn-connector-aether/src/main/java/org/fedoraproject/xmvn/connector/aether/XMvnMojoExecutionListener.java
+++ b/xmvn-connector-aether/src/main/java/org/fedoraproject/xmvn/connector/aether/XMvnMojoExecutionListener.java
@@ -267,7 +267,10 @@ public class XMvnMojoExecutionListener
// Disable doclint
if ( JAVADOC_AGGREGATE.equals( execution ) )
{
+ // maven-javadoc-plugin < 3.0.0
trySetBeanProperty( mojo, "additionalparam", "-Xdoclint:none" );
+ // maven-javadoc-plugin >= 3.0.0
+ trySetBeanProperty( mojo, "additionalOptions", new String[] { "-Xdoclint:none" } );
}
else if ( XMVN_BUILDDEP.equals( execution ) )
{
--
2.14.3

View File

@ -0,0 +1,593 @@
From 4e1e7377d6318d2bd7dd8620269e172a704650e2 Mon Sep 17 00:00:00 2001
From: Michael Simacek <msimacek@redhat.com>
Date: Mon, 16 Apr 2018 15:29:50 +0200
Subject: [PATCH] Use apache-commons-compress for manifest injection and native
code detection
---
xmvn-parent/pom.xml | 8 +-
xmvn-tools/xmvn-install/pom.xml | 4 +
.../fedoraproject/xmvn/tools/install/JarUtils.java | 176 +++++++++------------
.../xmvn/tools/install/impl/JarUtilsTest.java | 55 +++++++
.../src/test/resources/recompression-size.jar | Bin 0 -> 4376 bytes
xmvn.spec | 3 +-
6 files changed, 140 insertions(+), 106 deletions(-)
create mode 100644 xmvn-tools/xmvn-install/src/test/resources/recompression-size.jar
diff --git a/xmvn-parent/pom.xml b/xmvn-parent/pom.xml
index df6af7fb..f6465d90 100644
--- a/xmvn-parent/pom.xml
+++ b/xmvn-parent/pom.xml
@@ -92,6 +92,7 @@
<plexusUtilsVersion>3.0.24</plexusUtilsVersion>
<pluginToolsVersion>3.5</pluginToolsVersion>
<slf4jVersion>1.7.25</slf4jVersion>
+ <commonsCompressVersion>1.16.1</commonsCompressVersion>
<!-- Build dependencies -->
<apivizVersion>1.3.2.GA</apivizVersion>
@@ -102,7 +103,7 @@
<compilerPluginVersion>3.6.1</compilerPluginVersion>
<dependencyPluginVersion>3.0.0</dependencyPluginVersion>
<deployPluginVersion>2.8.2</deployPluginVersion>
- <easymockVersion>3.4</easymockVersion>
+ <easymockVersion>3.5</easymockVersion>
<gpgPluginVersion>1.6</gpgPluginVersion>
<installPluginVersion>2.5.2</installPluginVersion>
<jacocoVersion>0.7.9</jacocoVersion>
@@ -321,6 +322,11 @@
<artifactId>plexus-container-default</artifactId>
<version>${plexusVersion}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-compress</artifactId>
+ <version>${commonsCompressVersion}</version>
+ </dependency>
</dependencies>
</dependencyManagement>
<dependencies>
diff --git a/xmvn-tools/xmvn-install/pom.xml b/xmvn-tools/xmvn-install/pom.xml
index 66ac01d7..fbb36a68 100644
--- a/xmvn-tools/xmvn-install/pom.xml
+++ b/xmvn-tools/xmvn-install/pom.xml
@@ -61,5 +61,9 @@
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-compress</artifactId>
+ </dependency>
</dependencies>
</project>
diff --git a/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/JarUtils.java b/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/JarUtils.java
index 98d3a57e..5cb62b0f 100644
--- a/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/JarUtils.java
+++ b/xmvn-tools/xmvn-install/src/main/java/org/fedoraproject/xmvn/tools/install/JarUtils.java
@@ -16,19 +16,16 @@
package org.fedoraproject.xmvn.tools.install;
import java.io.IOException;
-import java.lang.reflect.Field;
+import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.Path;
-import java.util.Collection;
+import java.util.Enumeration;
import java.util.jar.Attributes;
-import java.util.jar.JarEntry;
-import java.util.jar.JarInputStream;
-import java.util.jar.JarOutputStream;
import java.util.jar.Manifest;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipInputStream;
-import java.util.zip.ZipOutputStream;
+import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
+import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream;
+import org.apache.commons.compress.archivers.zip.ZipFile;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.MethodVisitor;
@@ -43,6 +40,8 @@ import org.fedoraproject.xmvn.artifact.Artifact;
*/
public final class JarUtils
{
+ private static final String MANIFEST_PATH = "META-INF/MANIFEST.MF";
+
private static final Logger LOGGER = LoggerFactory.getLogger( JarUtils.class );
// From /usr/include/linux/elf.h
@@ -67,28 +66,33 @@ public final class JarUtils
*
* @return {@code true} if native code was found inside given JAR
*/
- public static boolean containsNativeCode( Path jar )
+ public static boolean containsNativeCode( Path jarPath )
{
- try ( ZipInputStream jis = new ZipInputStream( Files.newInputStream( jar ) ) )
+ try ( ZipFile jar = new ZipFile( jarPath.toFile() ) )
{
- ZipEntry ent;
- while ( ( ent = jis.getNextEntry() ) != null )
+ Enumeration<ZipArchiveEntry> entries = jar.getEntries();
+ while ( entries.hasMoreElements() )
{
- if ( ent.isDirectory() )
+ ZipArchiveEntry entry = entries.nextElement();
+ if ( entry.isDirectory() )
continue;
- if ( jis.read() == ELFMAG0 && jis.read() == ELFMAG1 && jis.read() == ELFMAG2 && jis.read() == ELFMAG3 )
+ try ( InputStream jis = jar.getInputStream( entry ) )
{
- LOGGER.debug( "Native code found inside {}: {}", jar, ent.getName() );
- return true;
+ if ( jis.read() == ELFMAG0 && jis.read() == ELFMAG1 && jis.read() == ELFMAG2
+ && jis.read() == ELFMAG3 )
+ {
+ LOGGER.debug( "Native code found inside {}: {}", jarPath, entry.getName() );
+ return true;
+ }
}
}
- LOGGER.trace( "Native code not found inside {}", jar );
+ LOGGER.trace( "Native code not found inside {}", jarPath );
return false;
}
catch ( IOException e )
{
- LOGGER.debug( "I/O exception caught when trying to determine whether JAR contains native code: {}", jar,
+ LOGGER.debug( "I/O exception caught when trying to determine whether JAR contains native code: {}", jarPath,
e );
return false;
}
@@ -122,40 +126,47 @@ public final class JarUtils
*
* @return {@code true} given JAR as found inside to use native code
*/
- public static boolean usesNativeCode( Path jar )
+ public static boolean usesNativeCode( Path jarPath )
{
- try ( ZipInputStream jis = new ZipInputStream( Files.newInputStream( jar ) ) )
+ try ( ZipFile jar = new ZipFile( jarPath.toFile() ) )
{
- ZipEntry ent;
- while ( ( ent = jis.getNextEntry() ) != null )
+ Enumeration<ZipArchiveEntry> entries = jar.getEntries();
+ while ( entries.hasMoreElements() )
{
- final String entryName = ent.getName();
- if ( ent.isDirectory() || !entryName.endsWith( ".class" ) )
+ ZipArchiveEntry entry = entries.nextElement();
+ final String entryName = entry.getName();
+ if ( entry.isDirectory() || !entryName.endsWith( ".class" ) )
continue;
- new ClassReader( jis ).accept( new ClassVisitor( Opcodes.ASM4 )
+ try ( InputStream jis = jar.getInputStream( entry ) )
{
- @Override
- public MethodVisitor visitMethod( int flags, String name, String desc, String sig, String[] exc )
+ new ClassReader( jis ).accept( new ClassVisitor( Opcodes.ASM4 )
{
- if ( ( flags & Opcodes.ACC_NATIVE ) != 0 )
- throw new NativeMethodFound( entryName, name, sig );
+ @Override
+ public MethodVisitor visitMethod( int flags, String name, String desc, String sig,
+ String[] exc )
+ {
+ if ( ( flags & Opcodes.ACC_NATIVE ) != 0 )
+ throw new NativeMethodFound( entryName, name, sig );
- return super.visitMethod( flags, name, desc, sig, exc );
- }
- }, ClassReader.SKIP_CODE );
+ return super.visitMethod( flags, name, desc, sig, exc );
+ }
+ }, ClassReader.SKIP_CODE );
+ }
}
return false;
}
catch ( NativeMethodFound e )
{
- LOGGER.debug( "Native method {}({}) found in {}: {}", e.methodName, e.methodSignature, jar, e.className );
+ LOGGER.debug( "Native method {}({}) found in {}: {}", e.methodName, e.methodSignature, jarPath,
+ e.className );
return true;
}
catch ( IOException e )
{
- LOGGER.debug( "I/O exception caught when trying to determine whether JAR uses native code: {}", jar, e );
+ LOGGER.debug( "I/O exception caught when trying to determine whether JAR uses native code: {}", jarPath,
+ e );
return false;
}
catch ( RuntimeException e )
@@ -178,29 +189,13 @@ public final class JarUtils
}
}
- /**
- * OpenJDK has a sanity check that prevents adding duplicate entries to ZIP streams. The problem is that some of
- * JARs we try to inject manifests to (especially the ones created by Gradle) already contain duplicate entries, so
- * manifest injection would always fail for them with "ZipException: duplicate entry".
- * <p>
- * This function tries to work around this OpenJDK sanity check, effectively allowing creating ZIP files with
- * duplicated entries. It should be called on particular ZIP output stream before adding each duplicate entry.
- *
- * @param zipOutputStream ZIP stream to hack
- */
- private static void openJdkAvoidDuplicateEntryHack( ZipOutputStream zipOutputStream )
+ private static void updateManifest( Artifact artifact, Manifest mf )
{
- try
- {
- Field namesField = ZipOutputStream.class.getDeclaredField( "names" );
- namesField.setAccessible( true );
- Collection<?> names = (Collection<?>) namesField.get( zipOutputStream );
- names.clear();
- }
- catch ( ReflectiveOperationException e )
- {
- // This hack relies on OpenJDK internals and therefore is not guaranteed to work. Ignore failures.
- }
+ putAttribute( mf, Artifact.MF_KEY_GROUPID, artifact.getGroupId(), null );
+ putAttribute( mf, Artifact.MF_KEY_ARTIFACTID, artifact.getArtifactId(), null );
+ putAttribute( mf, Artifact.MF_KEY_EXTENSION, artifact.getExtension(), Artifact.DEFAULT_EXTENSION );
+ putAttribute( mf, Artifact.MF_KEY_CLASSIFIER, artifact.getClassifier(), "" );
+ putAttribute( mf, Artifact.MF_KEY_VERSION, artifact.getVersion(), Artifact.DEFAULT_VERSION );
}
/**
@@ -213,65 +208,38 @@ public final class JarUtils
public static void injectManifest( Path targetJar, Artifact artifact )
{
LOGGER.trace( "Trying to inject manifest to {}", artifact );
- Manifest mf = null;
try
{
- try ( JarInputStream jis = new JarInputStream( Files.newInputStream( targetJar ) ) )
+ try ( ZipFile jar = new ZipFile( targetJar.toFile() ) )
{
- mf = jis.getManifest();
- if ( mf == null )
+ ZipArchiveEntry manifestEntry = jar.getEntry( MANIFEST_PATH );
+ if ( manifestEntry != null )
{
- // getManifest sometimes doesn't find the manifest, try finding it as plain entry
- ZipEntry ent;
- while ( ( ent = jis.getNextEntry() ) != null )
+ Manifest mf = new Manifest( jar.getInputStream( manifestEntry ) );
+ updateManifest( artifact, mf );
+ Files.delete( targetJar );
+ try ( ZipArchiveOutputStream os = new ZipArchiveOutputStream( targetJar.toFile() ) )
{
- if ( ent.getName().equalsIgnoreCase( "META-INF/MANIFEST.MF" ) )
- {
- mf = new Manifest( jis );
- break;
- }
+ // write manifest
+ ZipArchiveEntry newManifestEntry = new ZipArchiveEntry( MANIFEST_PATH );
+ os.putArchiveEntry( newManifestEntry );
+ mf.write( os );
+ os.closeArchiveEntry();
+ // copy the rest of content
+ jar.copyRawEntries( os, entry -> !entry.equals( manifestEntry ) );
}
- }
- }
-
- if ( mf == null )
- {
- LOGGER.trace( "Manifest injection skipped: no pre-existing manifest found to update" );
- return;
- }
-
- putAttribute( mf, Artifact.MF_KEY_GROUPID, artifact.getGroupId(), null );
- putAttribute( mf, Artifact.MF_KEY_ARTIFACTID, artifact.getArtifactId(), null );
- putAttribute( mf, Artifact.MF_KEY_EXTENSION, artifact.getExtension(), Artifact.DEFAULT_EXTENSION );
- putAttribute( mf, Artifact.MF_KEY_CLASSIFIER, artifact.getClassifier(), "" );
- putAttribute( mf, Artifact.MF_KEY_VERSION, artifact.getVersion(), Artifact.DEFAULT_VERSION );
-
- try ( JarInputStream jis = new JarInputStream( Files.newInputStream( targetJar ) ) )
- {
-
- targetJar = targetJar.toRealPath();
- Files.delete( targetJar );
- try ( JarOutputStream jos = new JarOutputStream( Files.newOutputStream( targetJar ), mf ) )
- {
- byte[] buf = new byte[512];
- JarEntry entry;
- while ( ( entry = jis.getNextJarEntry() ) != null )
+ catch ( IOException e )
{
- openJdkAvoidDuplicateEntryHack( jos );
- jos.putNextEntry( entry );
-
- int sz;
- while ( ( sz = jis.read( buf ) ) > 0 )
- jos.write( buf, 0, sz );
+ // Re-throw exceptions that occur when processing JAR file after reading header and manifest.
+ throw new RuntimeException( e );
}
+ LOGGER.trace( "Manifest injected successfully" );
}
- catch ( IOException e )
+ else
{
- // Re-throw exceptions that occur when processing JAR file after reading header and manifest.
- throw new RuntimeException( e );
+ LOGGER.trace( "Manifest injection skipped: no pre-existing manifest found to update" );
+ return;
}
-
- LOGGER.trace( "Manifest injected successfully" );
}
}
catch ( IOException e )
diff --git a/xmvn-tools/xmvn-install/src/test/java/org/fedoraproject/xmvn/tools/install/impl/JarUtilsTest.java b/xmvn-tools/xmvn-install/src/test/java/org/fedoraproject/xmvn/tools/install/impl/JarUtilsTest.java
index 3ec10cfa..98945a64 100644
--- a/xmvn-tools/xmvn-install/src/test/java/org/fedoraproject/xmvn/tools/install/impl/JarUtilsTest.java
+++ b/xmvn-tools/xmvn-install/src/test/java/org/fedoraproject/xmvn/tools/install/impl/JarUtilsTest.java
@@ -19,11 +19,13 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
+import static org.junit.Assume.assumeTrue;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
+import java.nio.file.attribute.PosixFilePermission;
import java.util.Arrays;
import java.util.jar.Attributes;
import java.util.jar.JarInputStream;
@@ -116,6 +118,38 @@ public class JarUtilsTest
}
}
+ /**
+ * Regression test for a jar which contains an entry that can recompress with a different size, which caused a
+ * mismatch in sizes.
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testManifestInjectionRecompressionCausesSizeMismatch()
+ throws Exception
+ {
+ Path testResource = Paths.get( "src/test/resources/recompression-size.jar" );
+ Path testJar = workDir.resolve( "manifest.jar" );
+ Files.copy( testResource, testJar, StandardCopyOption.COPY_ATTRIBUTES, StandardCopyOption.REPLACE_EXISTING );
+
+ Artifact artifact =
+ new DefaultArtifact( "org.eclipse.osgi", "osgi.compatibility.state", "1.1.0.v20180409-1212" );
+ JarUtils.injectManifest( testJar, artifact );
+
+ try ( JarInputStream jis = new JarInputStream( Files.newInputStream( testJar ) ) )
+ {
+ Manifest mf = jis.getManifest();
+ assertNotNull( mf );
+
+ Attributes attr = mf.getMainAttributes();
+ assertNotNull( attr );
+
+ assertEquals( "org.eclipse.osgi", attr.getValue( "JavaPackages-GroupId" ) );
+ assertEquals( "osgi.compatibility.state", attr.getValue( "JavaPackages-ArtifactId" ) );
+ assertEquals( "1.1.0.v20180409-1212", attr.getValue( "JavaPackages-Version" ) );
+ }
+ }
+
/**
* Test JAR if manifest injection works as expected when some artifact fields have default values.
*
@@ -148,6 +182,27 @@ public class JarUtilsTest
}
}
+ /**
+ * Test JAR if manifest injection preserves sane file perms.
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testManifestInjectionSanePermissions()
+ throws Exception
+ {
+ Path testResource = Paths.get( "src/test/resources/example.jar" );
+ Path testJar = workDir.resolve( "manifest.jar" );
+ Files.copy( testResource, testJar, StandardCopyOption.COPY_ATTRIBUTES, StandardCopyOption.REPLACE_EXISTING );
+
+ assumeTrue( "sane umask", Files.getPosixFilePermissions( testJar ).contains( PosixFilePermission.OTHERS_READ ) );
+
+ Artifact artifact = new DefaultArtifact( "org.apache.maven", "maven-model", "xsd", "model", "2.2.1" );
+ JarUtils.injectManifest( testJar, artifact );
+
+ assertTrue( Files.getPosixFilePermissions( testJar ).contains( PosixFilePermission.OTHERS_READ ) );
+ }
+
/**
* Test if native code detection works as expected.
*
diff --git a/xmvn-tools/xmvn-install/src/test/resources/recompression-size.jar b/xmvn-tools/xmvn-install/src/test/resources/recompression-size.jar
new file mode 100644
index 00000000..976481ea
--- /dev/null
+++ b/xmvn-tools/xmvn-install/src/test/resources/recompression-size.jar
@@ -0,0 +1,145 @@
+PK
+ûL“L²îMETA-INF/MANIFEST.MFUT ÉGØZ;HØZux ³H³HManifest-Version: 1.0
+
+PK®L“Lõ^]±¦» dir/fileUT 7GØZ8GØZux ³H³HíÒáÃ0†áÿ½ËÓ«èÉÕ' ùQJ %äa6m¾çu®,%<25>8£=úÓx}¼yýðû“?ûí<C3BB>WÛ³ TxPáíÔPáA…·TxP{@…ÔPáAíTxP{@…µTxPáAíÔPj¨= ÂƒÚê„·ÔPPáíÞP{@A…·Tx{@íÞPPáA…·Tx{@A…ÞPPáíTxáAA…µTxP{„ÔPáAíµTxP{@…µÔPáAíÔP{@…µTx{@íÔPPáíµTx{@A…·Ô…<C394>
+o(¨ðö€º0PPáíÔáAA…·TxP{„ÞPPáAíTxP{@…µGxPPáAíÔP*<¨= ÂƒÚêÂ@…µTxP{@]¨ð ö€‚
+o¨ ÔPPáíua ÂƒÚ
+*¼= . Tx{@A…·TxPáíÔPáA…·TxP{@…ÞPPáAíTxP{@…µTxPáAíÔPj¨= ÂƒÚê„·ÔPáAíÞP{@A…·Tx{@íÞPPáíµTx{@A…ÞPPáíTxáAA…µTxP{„ÔPáAíTxP{@…µÔPáAíÔP{@…µTx{@íÔPPáíµTxP{@A…·Ô…<C394>
+o(¨ðö€º0PPáíÞP
+*¼=  ÂƒÚ#<(¨ðö€‚
+j<>ð  ÂƒÚ*<¨=ƒ‚
+j¨ð ö€
+*<¨= ÂƒÚêÂ@…µTxP{@]¨ð ö€
+j¨ ÔPPáíua ÂƒÚ
+*¼= . Tx{@A…·TxPáíÞPPáA…·TxP{@…ÞPPáAíTxP{@…µTxPáAíÔPáAíµTxP{@]˜ðö€Ú*<¨=  ÂÛj¨ð ö€‚
+o¨=  ÂÛ
+*¼= ö€‚
+o(¨ð ÂÛ
+*¼=  Âƒ
+/<(¨ðö€‚
+j<>ð  ÂƒÚ*<¨=ƒ‚
+j¨ð ö
+*<¨= ÂƒÚj¨ð ö€
+j¨= ÂƒÚ
+*¼= ö€
+j(¨ðö€º0PáAíÞP
+*¼=  ÂÛêÂ@A…·TxP{„ÞPPáAíTx{@A…µGxPPáAíÔPáA…µTxP{@…ÔPáAíua ÂƒÚ*<¨= . TxP{@A…·Ô…<C394>
+j(¨ðö€º0P{@íÞPPáA…·Tx{@A…ÞPPáAíTx{@A…µTxPáíÔPáA…µTxP{@…µÔPáAíÔP{@…µTx{@íÔPPáíµTx{@A…·ÔPPáíÞP{@A…·TxPá…ÞPPáAíTx{@A…µGxPPáAíÔáAA…µTxP{@íÔPáAíµTxP{@…µÔPáAíÞP*<¨=  ÂÛêÂ@A…·Tx{@](¨ðö€‚
+o¨ ÞPPáAíTx{@A…µGxPPáíÔPáA…µTxP{@…ÔPáAíua ÂƒÚ*<¨= . TxP{@…µÔ…<C394>
+j(¨ðö€º0P{@íÞPPáA…·Tx{@A…ÞPPáíTx{@A…µTxPáíÔPáA…·TxP{@…µÔPáAíÔP{@…µTx{@íÔPPáíµTxP{@A…·ÔPPáíÞP{@A…·Tx{@](¨ðö€‚
+j<>ð  ÂÛ
+*<¨=ƒ‚
+j¨ð ö
+*<¨= ÂƒÚ#<(¨ð ö€
+j¨= ÂƒÚ*<¨= ö€
+j(¨ðö€º0PáAíÞP*<¨=  ÂÛêÂ@A…·Tx{@](¨ðö€‚
+o¨ ÞPPáAíTx{@A…µTxPáAíÔPáA…µTxP{@…ÔPáAíua ÂƒÚ*<¨= . TxP{@…µÔ…<C394>Új(¨ðö€‚
+o¨=  ÂÛ
+*<¨ðö€‚
+o(¨ð ÂÛ
+*¼=  Âƒ
+o(¨ð ö€
+*¼=  ÂƒÚ*<¨= ö€
+j¨ð ö€Ú*<¨= ÂƒÚj¨ð ö€‚
+o¨= ÂƒÚ
+*¼= ö€
+j(¨ðö€Ú
+*¼=  ÂÛêÂ@A…·TxP{„ÞPPáAíTx{@A…µGxPPáAíÔáAA…µTxP{@íÔPáAíµTxP{@…µÔ…<C394>
+j(¨ðö€º0PáAíÞP*<¨=  ÂÛêÂ@A…·Tx{@](¨ðö€‚
+j<>ð  ÂÛ
+*<¨= Âƒ
+o(¨ð ö€
+*<¨= ÂƒÚ*<¨ð ö€
+j¨ð ÂƒÚ*<¨= . TxP{@…µÔ…<C394>Új(¨ðö€‚
+o¨=  ÂÛ
+*¼= ö€‚
+o(¨ð ÂÛ
+*¼=  Âƒ
+o(¨ð ö€
+*¼=  ÂƒÚ*<¨=ƒ‚
+j¨ð ö€Ú*<¨= ÂƒÚj¨ð ö€
+j¨= ÂƒÚ
+*¼= ö€
+j(¨ðö€Ú
+*¼=  ÂÛêÂ@A…·Tx{@](¨ðö€‚
+j<>ð  ÂÛ
+*<¨=ƒ‚
+o(¨ð ö
+*<¨= ÂƒÚ#<(¨ð ö€
+j¨= ÂƒÚ*<¨= . TxP{@…µÔ…<C394>
+j(¨ðö€º0PáAíÞP
+*¼=  ÂÛêÂ@A…·Tx{@](¨ðö€‚
+j¨ð ÂÛ
+*<¨= Âƒ
+o(¨ð ö€
+*<¨= ÂƒÚ*<¨ð ö€
+j¨ ÔPáAíua ö€Ú*<¨=  ÂÛj(¨ðö€‚
+o¨=  ÂÛ
+*<¨ðö€‚
+o(¨ð ÂÛ
+*¼=  Âƒ
+o(¨ð ö€
+j<>ð  ÂƒÚ*<¨=ƒ‚
+j¨ð ö€Ú*<¨= ÂƒÚj¨ð ö€‚
+o¨= ÂƒÚ
+*¼= ö€
+j(¨ðö€º0PPáíÞP
+*¼=  ÂÛêÂ@A…·TxP{„ÞPPáAíTxP{@…µGxPPáAíÔáAA…µTxP{@]¨ð ö€
+j¨ ÔPPáíua ÂƒÚ
+*¼= . TxP{@A…·Ô…<C394>
+o(¨ðö€º0PPáíÞPPáA…·TxP{@…ÞPPáAíTxP{@…µTxPáAíÔPáA…µTxP{@]¨= ö€
+j(¨ðö€Ú
+*¼=  ÂÛj(¨ðö€‚
+o¨=  ÂÛ
+*<¨ðö€‚
+o(¨ð ÂÛ
+*¼=  ÂƒÚ#<(¨ð ö€
+j<>ð  ÂƒÚ*<¨= ö€
+j¨ð ö€Ú*<¨= ÂƒÚj¨ð ö€‚
+o¨= ÂƒÚ
+*¼= . TxP{@A…·Ô…<C394>
+o(¨ðö€º0PPáíÔáAA…·TxP{„ÞPPáAíTxP{@…µGxPPáAíÔP*<¨= ÂƒÚêÂ@…µTxP{@]¨ð ö€‚
+o¨ ÔPPáíua ÂƒÚ
+*¼= . Tx{@A…·TxPáíÔPáA…·TxP{@…ÞPPáAíTxP{@…µTxPáAíÔPáAíµTxP{@A…·ÔPáAíÞP{@A…·Tx{@íÞPPáíµTx{@A…ÞPPáíÔáAA…µTxP{„ÔPáAíTxP{@…µÔPáAíÔP{@…µTxP{@íÔPPáíua ÂƒÚ
+*¼= . Tx{@A…·Ô…<C394>
+o(¨ðö€º0PPáíÔáAA…·TxP{„ÔPáAíTxP{@…µTxPáAíÔP*<¨= ÂƒÚêÂ@…µTxP{@]¨ð ö€‚
+o¨ ÔPPáíua  ÂÛ
+*¼=  Âƒ
+o(¨ðö€‚
+*¼=  ÂƒÚ*<¨ðö€‚
+j¨ð ÂÛ
+*<¨= Âƒ
+j¨ð ö€
+j¨= ÂƒÚ
+*¼= ö€
+j(¨ðö€Ú*<¨=  ÂÛj(¨ðö€‚
+o¨=  ÂÛ
+*<¨ðö€‚
+o(¨ð ö
+*¼=  ÂƒÚ#<(¨ð ö€
+j<>ð  ÂƒÚ*<¨=ƒ‚
+j¨ð ö€Ú*<¨= ÂƒÚj¨ð ö€‚
+o¨ ÔPPáíua ÂƒÚ
+*¼= . Tx{@A…·Ô…<C394>
+o(¨ð ö
+*¼=  ÂƒÚ#<(¨ðö€‚
+j<>ð  ÂƒÚ*<¨= Âƒ
+j¨ð ö€
+*<¨= ÂƒÚêÂ@…µTxP{@]¨ð ö€‚
+o¨ ÔPPáíua ö€Ú
+*¼=  Âƒ
+o(¨ðö€‚
+*¼=  ÂÛ
+*<¨ðö€‚
+j¨ð ÂÛ
+*<¨= Âƒ
+j¨ð ö€
+j¨= ÂƒÚ*<¨= ö€
+j(¨ðö€Ú*<¨=  ÂÛj(¨ðö€‚
+o¨=  ÂÛ
+*¼= ö€‚
+o(¨ð ö
+*¼=  ÂƒÚ#<(¨ðö€‚
+j<>ð  ÂƒÚ*<¨=ƒ‚
+j¨ð ö€Ú*<¨= ÂƒÚj¨ð öÜOPK
+ûL“L²î´<>META-INF/MANIFEST.MFUTÉGØZux ³H³HPK®L“Lõ^]±¦» ´<>gdir/fileUT7GØZux ³H³HPK¨Z
\ No newline at end of file
diff --git a/xmvn.spec b/xmvn.spec
index 8764b63d..0775d4a2 100644
--- a/xmvn.spec
+++ b/xmvn.spec
@@ -196,6 +196,7 @@ artifact repository.
%package install
Summary: XMvn Install
+Requires: apache-commons-compress
%description install
This package provides XMvn Install, which is a command-line interface
@@ -284,7 +285,7 @@ done
# helper scripts
%jpackage_script org.fedoraproject.xmvn.tools.bisect.BisectCli "" "-Dxmvn.home=%{_datadir}/%{name}" xmvn/xmvn-bisect:beust-jcommander:maven-invoker:plexus/utils xmvn-bisect
-%jpackage_script org.fedoraproject.xmvn.tools.install.cli.InstallerCli "" "" xmvn/xmvn-install:xmvn/xmvn-api:xmvn/xmvn-core:beust-jcommander:slf4j/api:slf4j/simple:objectweb-asm/asm xmvn-install
+%jpackage_script org.fedoraproject.xmvn.tools.install.cli.InstallerCli "" "" xmvn/xmvn-install:xmvn/xmvn-api:xmvn/xmvn-core:beust-jcommander:slf4j/api:slf4j/simple:objectweb-asm/asm:objenesis/objenesis:commons-compress xmvn-install
%jpackage_script org.fedoraproject.xmvn.tools.resolve.ResolverCli "" "" xmvn/xmvn-resolve:xmvn/xmvn-api:xmvn/xmvn-core:beust-jcommander xmvn-resolve
%jpackage_script org.fedoraproject.xmvn.tools.subst.SubstCli "" "" xmvn/xmvn-subst:xmvn/xmvn-api:xmvn/xmvn-core:beust-jcommander xmvn-subst
--
2.14.3

841
SPECS/xmvn.spec Normal file
View File

@ -0,0 +1,841 @@
# XMvn uses OSGi environment provided by Tycho, it shouldn't require
# any additional bundles.
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^osgi\\($
# Integration tests are disabled by default, but you can run them by
# adding "--with its" to rpmbuild or mock invocation.
%bcond_with its
%bcond_without gradle
Name: xmvn
Version: 3.0.0
Release: 21%{?dist}
Summary: Local Extensions for Apache Maven
License: ASL 2.0
URL: https://fedora-java.github.io/xmvn/
BuildArch: noarch
Source0: https://github.com/fedora-java/xmvn/releases/download/%{version}/xmvn-%{version}.tar.xz
Patch0: 0001-Fix-installer-plugin-loading.patch
Patch1: 0001-Port-to-Gradle-4.2.patch
Patch2: 0001-Port-to-Gradle-4.3.1.patch
Patch3: 0001-Support-setting-Xdoclint-none-in-m-javadoc-p-3.0.0.patch
Patch4: 0001-Fix-configuration-of-aliased-plugins.patch
Patch5: 0001-Don-t-use-JAXB-for-converting-bytes-to-hex-string.patch
Patch6: 0001-Use-apache-commons-compress-for-manifest-injection-a.patch
BuildRequires: maven >= 3.5.0
BuildRequires: maven-local
BuildRequires: apache-commons-compress
BuildRequires: beust-jcommander
BuildRequires: cglib
BuildRequires: maven-dependency-plugin
BuildRequires: maven-plugin-build-helper
BuildRequires: maven-assembly-plugin
BuildRequires: maven-install-plugin
BuildRequires: maven-plugin-plugin
BuildRequires: objectweb-asm
BuildRequires: modello
BuildRequires: xmlunit
BuildRequires: apache-ivy
BuildRequires: junit
BuildRequires: easymock
BuildRequires: maven-invoker
BuildRequires: plexus-containers-container-default
BuildRequires: plexus-containers-component-annotations
BuildRequires: plexus-containers-component-metadata
%if %{with gradle}
BuildRequires: gradle >= 4.3.1
%endif
Requires: %{name}-minimal = %{version}-%{release}
Requires: maven >= 3.4.0
%description
This package provides extensions for Apache Maven that can be used to
manage system artifact repository and use it to resolve Maven
artifacts in offline mode, as well as Maven plugins to help with
creating RPM packages containing Maven artifacts.
%package minimal
Summary: Dependency-reduced version of XMvn
Requires: maven-lib >= 3.4.0
Requires: %{name}-api = %{version}-%{release}
Requires: %{name}-connector-aether = %{version}-%{release}
Requires: %{name}-core = %{version}-%{release}
Requires: apache-commons-cli
Requires: apache-commons-lang3
Requires: atinject
Requires: google-guice
Requires: guava20
Requires: maven-lib
Requires: maven-resolver-api
Requires: maven-resolver-impl
Requires: maven-resolver-spi
Requires: maven-resolver-util
Requires: maven-wagon-provider-api
Requires: plexus-cipher
Requires: plexus-classworlds
Requires: plexus-containers-component-annotations
Requires: plexus-interpolation
Requires: plexus-sec-dispatcher
Requires: plexus-utils
Requires: sisu-inject
Requires: sisu-plexus
Requires: slf4j
%description minimal
This package provides minimal version of XMvn, incapable of using
remote repositories.
%package parent-pom
Summary: XMvn Parent POM
%description parent-pom
This package provides XMvn parent POM.
%package api
Summary: XMvn API
Obsoletes: %{name}-launcher < 3.0.0
%description api
This package provides XMvn API module which contains public interface
for functionality implemented by XMvn Core.
%package core
Summary: XMvn Core
%description core
This package provides XMvn Core module, which implements the essential
functionality of XMvn such as resolution of artifacts from system
repository.
%package connector-aether
Summary: XMvn Connector for Maven Resolver
%description connector-aether
This package provides XMvn Connector for Maven Resolver, which
provides integration of Maven Resolver with XMvn. It provides an
adapter which allows XMvn resolver to be used as Maven workspace
reader.
%if %{with gradle}
%package connector-gradle
Summary: XMvn Connector for Gradle
%description connector-gradle
This package provides XMvn Connector for Gradle, which provides
integration of Gradle with XMvn. It provides an adapter which allows
XMvn resolver to be used as Gradle resolver.
%endif
%package connector-ivy
Summary: XMvn Connector for Apache Ivy
%description connector-ivy
This package provides XMvn Connector for Apache Ivy, which provides
integration of Apache Ivy with XMvn. It provides an adapter which
allows XMvn resolver to be used as Ivy resolver.
%package mojo
Summary: XMvn MOJO
%description mojo
This package provides XMvn MOJO, which is a Maven plugin that consists
of several MOJOs. Some goals of these MOJOs are intended to be
attached to default Maven lifecycle when building packages, others can
be called directly from Maven command line.
%package tools-pom
Summary: XMvn Tools POM
%description tools-pom
This package provides XMvn Tools parent POM.
%package resolve
Summary: XMvn Resolver
# Explicit javapackages-tools requires since scripts use
# /usr/share/java-utils/java-functions
Requires: javapackages-tools
%description resolve
This package provides XMvn Resolver, which is a very simple
commald-line tool to resolve Maven artifacts from system repositories.
Basically it's just an interface to artifact resolution mechanism
implemented by XMvn Core. The primary intended use case of XMvn
Resolver is debugging local artifact repositories.
%package bisect
Summary: XMvn Bisect
# Explicit javapackages-tools requires since scripts use
# /usr/share/java-utils/java-functions
Requires: javapackages-tools
%description bisect
This package provides XMvn Bisect, which is a debugging tool that can
diagnose build failures by using bisection method.
%package subst
Summary: XMvn Subst
# Explicit javapackages-tools requires since scripts use
# /usr/share/java-utils/java-functions
Requires: javapackages-tools
%description subst
This package provides XMvn Subst, which is a tool that can substitute
Maven artifact files with symbolic links to corresponding files in
artifact repository.
%package install
Summary: XMvn Install
Requires: apache-commons-compress
# Explicit javapackages-tools requires since scripts use
# /usr/share/java-utils/java-functions
Requires: javapackages-tools
%description install
This package provides XMvn Install, which is a command-line interface
to XMvn installer. The installer reads reactor metadata and performs
artifact installation according to specified configuration.
%package javadoc
Summary: API documentation for %{name}
%description javadoc
This package provides %{summary}.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
# Bisect IT has no chances of working in local, offline mode, without
# network access - it needs to access remote repositories.
find -name BisectIntegrationTest.java -delete
# Resolver IT won't work either - it tries to execute JAR file, which
# relies on Class-Path in manifest, which is forbidden in Fedora...
find -name ResolverIntegrationTest.java -delete
%pom_remove_plugin -r :maven-site-plugin
%mvn_package ":xmvn{,-it}" __noinstall
%if %{without gradle}
%pom_disable_module xmvn-connector-gradle
%endif
# Upstream code quality checks, not relevant when building RPMs
%pom_remove_plugin -r :apache-rat-plugin
%pom_remove_plugin -r :maven-checkstyle-plugin
%pom_remove_plugin -r :jacoco-maven-plugin
# FIXME pom macros don't seem to support submodules in profile
%pom_remove_plugin :jacoco-maven-plugin xmvn-it
# remove dependency plugin maven-binaries execution
# we provide apache-maven by symlink
%pom_xpath_remove "pom:executions/pom:execution[pom:id[text()='maven-binaries']]"
# Don't put Class-Path attributes in manifests
%pom_remove_plugin :maven-jar-plugin xmvn-tools
# get mavenVersion that is expected
maven_home=$(realpath $(dirname $(realpath $(which mvn)))/..)
mver=$(sed -n '/<mavenVersion>/{s/.*>\(.*\)<.*/\1/;p}' \
xmvn-parent/pom.xml)
mkdir -p target/dependency/
cp -aL ${maven_home} target/dependency/apache-maven-$mver
%build
%if %{with its}
%mvn_build -s -j -- -Prun-its
%else
%mvn_build -s -j
%endif
tar --delay-directory-restore -xvf target/*tar.bz2
chmod -R +rwX %{name}-%{version}*
# These are installed as doc
rm -f %{name}-%{version}*/{AUTHORS-XMVN,README-XMVN.md,LICENSE,NOTICE,NOTICE-XMVN}
# Not needed - we use JPackage launcher scripts
rm -Rf %{name}-%{version}*/lib/{installer,resolver,subst,bisect}/
# Irrelevant Maven launcher scripts
rm -f %{name}-%{version}*/bin/*
%install
%mvn_install
maven_home=$(realpath $(dirname $(realpath $(which mvn)))/..)
install -d -m 755 %{buildroot}%{_datadir}/%{name}
cp -r %{name}-%{version}*/* %{buildroot}%{_datadir}/%{name}/
for cmd in mvn mvnDebug; do
cat <<EOF >%{buildroot}%{_datadir}/%{name}/bin/$cmd
#!/bin/sh -e
export _FEDORA_MAVEN_HOME="%{_datadir}/%{name}"
exec ${maven_home}/bin/$cmd "\${@}"
EOF
chmod 755 %{buildroot}%{_datadir}/%{name}/bin/$cmd
done
# helper scripts
%jpackage_script org.fedoraproject.xmvn.tools.bisect.BisectCli "" "-Dxmvn.home=%{_datadir}/%{name}" xmvn/xmvn-bisect:beust-jcommander:maven-invoker:plexus/utils xmvn-bisect
%jpackage_script org.fedoraproject.xmvn.tools.install.cli.InstallerCli "" "" xmvn/xmvn-install:xmvn/xmvn-api:xmvn/xmvn-core:beust-jcommander:slf4j/api:slf4j/simple:objectweb-asm/asm:commons-compress xmvn-install
%jpackage_script org.fedoraproject.xmvn.tools.resolve.ResolverCli "" "" xmvn/xmvn-resolve:xmvn/xmvn-api:xmvn/xmvn-core:beust-jcommander xmvn-resolve
%jpackage_script org.fedoraproject.xmvn.tools.subst.SubstCli "" "" xmvn/xmvn-subst:xmvn/xmvn-api:xmvn/xmvn-core:beust-jcommander xmvn-subst
# copy over maven lib directory
cp -r ${maven_home}/lib/* %{buildroot}%{_datadir}/%{name}/lib/
# possibly recreate symlinks that can be automated with xmvn-subst
%{name}-subst -s -R %{buildroot} %{buildroot}%{_datadir}/%{name}/
# /usr/bin/xmvn
ln -s %{_datadir}/%{name}/bin/mvn %{buildroot}%{_bindir}/%{name}
# mvn-local symlink
ln -s %{name} %{buildroot}%{_bindir}/mvn-local
# make sure our conf is identical to maven so yum won't freak out
install -d -m 755 %{buildroot}%{_datadir}/%{name}/conf/
cp -P ${maven_home}/conf/settings.xml %{buildroot}%{_datadir}/%{name}/conf/
cp -P ${maven_home}/bin/m2.conf %{buildroot}%{_datadir}/%{name}/bin/
%files
%{_bindir}/mvn-local
%files minimal
%{_bindir}/%{name}
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/bin
%dir %{_datadir}/%{name}/lib
%{_datadir}/%{name}/lib/*.jar
%{_datadir}/%{name}/lib/ext
%{_datadir}/%{name}/lib/jansi-native
%{_datadir}/%{name}/bin/m2.conf
%{_datadir}/%{name}/bin/mvn
%{_datadir}/%{name}/bin/mvnDebug
%{_datadir}/%{name}/boot
%{_datadir}/%{name}/conf
%files parent-pom -f .mfiles-xmvn-parent
%doc LICENSE NOTICE
%files core -f .mfiles-xmvn-core
%files api -f .mfiles-xmvn-api
%doc LICENSE NOTICE
%doc AUTHORS README.md
%files connector-aether -f .mfiles-xmvn-connector-aether
%if %{with gradle}
%files connector-gradle -f .mfiles-xmvn-connector-gradle
%endif
%files connector-ivy -f .mfiles-xmvn-connector-ivy
%files mojo -f .mfiles-xmvn-mojo
%files tools-pom -f .mfiles-xmvn-tools
%files resolve -f .mfiles-xmvn-resolve
%{_bindir}/%{name}-resolve
%files bisect -f .mfiles-xmvn-bisect
%{_bindir}/%{name}-bisect
%files subst -f .mfiles-xmvn-subst
%{_bindir}/%{name}-subst
%files install -f .mfiles-xmvn-install
%{_bindir}/%{name}-install
%files javadoc
%doc LICENSE NOTICE
%changelog
* Wed Aug 01 2018 Severin Gehwolf <sgehwolf@redhat.com> - 3.0.0-21
- Add requirement on javapackages-tools since scripts use
java-functions.
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-20
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue Jun 05 2018 Michael Simacek <msimacek@redhat.com> - 3.0.0-19
- Remove now unnecessary objenesis from classpath
* Fri May 18 2018 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.0.0-18
- Avoid creating temp files during manifest injection
- Resolves: rhbz#1579236
* Wed May 9 2018 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.0.0-17
- Switch to commons-compress for manifest manipulation
- Resolves: rhbz#1576358
* Fri Apr 27 2018 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.0.0-16
- Remove use of JAXB from xmvn-core to make it work with Java 9
* Thu Apr 19 2018 Michael Simacek <msimacek@redhat.com> - 3.0.0-15
- Fix maven home lookup and layout to match current maven
* Fri Mar 16 2018 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.0.0-14
- Fix configuration of aliased plugins
- Resolves: rhbz#1556974
* Fri Feb 09 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 3.0.0-13
- Escape macros in %%changelog
* Mon Feb 05 2018 Michael Simacek <msimacek@redhat.com> - 3.0.0-12
- Use guava20
* Wed Jan 24 2018 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.0.0-11
- Build-require full maven again, instead of maven-lib
* Tue Jan 9 2018 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.0.0-10
- BR maven-lib instead of full maven
* Thu Dec 07 2017 Michael Simacek <msimacek@redhat.com> - 3.0.0-9
- Support setting "-Xdoclint:none" in m-javadoc-p >= 3.0.0
* Fri Nov 10 2017 Michael Simacek <msimacek@redhat.com> - 3.0.0-8
- Port to Gradle 4.3.1
* Mon Oct 02 2017 Michael Simacek <msimacek@redhat.com> - 3.0.0-7
- Port to gradle 4.2
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Wed Jun 21 2017 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.0.0-5
- Remove temporary workaround
* Wed Jun 21 2017 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.0.0-4
- Fix installer crash when plugin directory is missing
* Wed Jun 21 2017 Michael Simacek <msimacek@redhat.com> - 3.0.0-3
- Include lib directories for now
* Wed Jun 21 2017 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.0.0-2
- Fix loading of XMvn Installer plugins
* Wed Jun 21 2017 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.0.0-1
- Update to upstream version 3.0.0
* Wed Apr 19 2017 Michael Simacek <msimacek@redhat.com> - 2.5.0-23
- Update spec for maven 3.5.0
* Wed Apr 19 2017 Michael Simacek <msimacek@redhat.com> - 2.5.0-22
- Temporary changes for maven upgrade
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.0-21
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Thu Feb 02 2017 Michael Simacek <msimacek@redhat.com> - 2.5.0-20
- Remove requires added for maven 3.4.0
* Thu Feb 02 2017 Michael Simacek <msimacek@redhat.com> - 2.5.0-19
- Remove BR on maven-site-plugin
* Tue Jan 31 2017 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.5.0-18
- Allow to conditionally build without gradle
* Mon Jan 16 2017 Michael Simacek <msimacek@redhat.com> - 2.5.0-17
- Use reactor artifacts when running xmvn-subst
* Mon Jan 16 2017 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.5.0-16
- Allow xmvn to install files who names whitespace
* Mon Aug 15 2016 Michael Simacek <msimacek@redhat.com> - 2.5.0-15
- Switch launcher scripts
* Thu Aug 11 2016 Michael Simacek <msimacek@redhat.com> - 2.5.0-14
- Add Requires on all symlinked jars to xmvn-minimal
* Mon Aug 8 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.5.0-13
- Remove temp symlinks
* Mon Aug 8 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.5.0-12
- Add temp symlinks needed for updating to Maven 3.4.0
* Mon Jul 04 2016 Michael Simacek <msimacek@redhat.com> - 2.5.0-11
- Don't install POM files for Tycho projects
* Thu Jun 30 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.5.0-10
- Full xmvn should require full maven
* Tue Jun 28 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.5.0-9
- Introduce xmvn-minimal subpackage
* Wed Jun 15 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.5.0-8
- Add missing build-requires
* Mon May 30 2016 Michael Simacek <msimacek@redhat.com> - 2.5.0-7
- Add missing BR easymock
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Thu Nov 26 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.5.0-5
- Try to procect builddep MOJO against patological cases
* Mon Nov 23 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.5.0-4
- Remove temporary Maven 3.3.9 workaround
* Mon Nov 23 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.5.0-3
- Add temporary workaround for Maven 3.3.9 transition
* Wed Oct 28 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.5.0-2
- Fix symlinks in lib/core
* Wed Oct 28 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.5.0-1
- Update to upstream version 2.5.0
* Tue Jul 14 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.4.0-5
- Require persistent artifact files in XML resolver API
* Tue Jun 30 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.4.0-4
- Port to Gradle 2.5-rc-1
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Mon May 11 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.4.0-2
- Add patches for rhbz#1220394
* Wed May 6 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.4.0-1
- Update to upstream version 2.4.0
* Fri Apr 24 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.3.2-8
- Port to Gradle 2.4-rc-1
* Thu Apr 16 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.3.2-7
- Disable doclint in javadoc:aggregate MOJO executions
* Thu Apr 9 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.3.2-6
- Install mvn-local symlink
* Wed Mar 25 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.3.2-5
- Remove workarunds for RPM bug #646523
* Wed Mar 25 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.3.2-4
- Port to Gradle 2.3
* Mon Mar 16 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.3.2-3
- Build with Maven 3.3.0
* Mon Mar 16 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.3.2-2
- Add temporary explicit maven-builder-support.jar symlink
* Thu Mar 12 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.3.2-1
- Update to upstream version 2.3.2
* Fri Mar 06 2015 Michal Srb <msrb@redhat.com> - 2.3.1-4
- Rebuild to fix symlinks in lib/core
* Thu Feb 19 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.3.1-3
- Remove temporary explicit ASM symlinks
* Wed Feb 18 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.3.1-2
- Temporarly add explicit symlinks to ASM
* Fri Feb 13 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.3.1-1
- Update to upstream version 2.3.1
* Wed Feb 11 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.3.0-1
- Update to upstream version 2.3.0
* Wed Feb 4 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.2.1-1
- Update to upstream version 2.2.1
* Fri Jan 23 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.2.0-1
- Update to upstream version 2.2.0
- Add connector-gradle subpackage
* Wed Jan 21 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.1.1-2
- Add BR on maven-site-plugin
- Resolves: rhbz#1184608
* Mon Jan 5 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.1.1-1
- Update to upstream version 2.1.1
* Wed Dec 10 2014 Michal Srb <msrb@redhat.com> - 2.1.0-8
- Add fully qualified osgi version to install plan when tycho detected
- Resolves: rhbz#1172225
* Thu Dec 4 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.1.0-7
- Ignore any system dependencies in Tycho projects
* Wed Nov 26 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.1.0-6
- Use topmost repository namespace during installation
- Resolves: rhbz#1166743
* Tue Oct 28 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.1.0-5
- Fix conversion of Ivy to XMvn artifacts
- Resolves: rhbz#1127804
* Mon Oct 13 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.1.0-4
- Fix FTBFS caused by new wersion of plexus-archiver
* Wed Sep 24 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.1.0-3
- Fix installation of attached Eclipse artifacts
* Wed Sep 10 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.1.0-2
- Avoid installing the same attached artifact twice
* Thu Sep 4 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.1.0-1
- Update to upstream version 2.1.0
- Remove p2 subpackage
* Fri Jun 6 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.0.1-1
- Update to upstream version 2.0.1
* Thu Jun 5 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.0.0-6
- Bump Maven version in build-requires
* Thu Jun 5 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.0.0-5
- Add missing requires on subpackages
* Fri May 30 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.0.0-4
- Don't modify system properties during artifact resolution
* Fri May 30 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.0.0-3
- Add patch to support xmvn.resolver.disableEffectivePom property
* Thu May 29 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.0.0-2
- Add patch for injecting Javapackages manifests
* Thu May 29 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.0.0-1
- Update to upstream version 2.0.0
* Tue Apr 22 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.5.0-0.25.gitcb3a0a6
- Use ASM 5.0.1 directly instead of Sisu-shaded ASM
* Fri Mar 28 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.5.0-0.24.gitcb3a0a6
- Override extensions of skipped artifacts
* 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
- Add missing BR: modello-maven-plugin
* Tue Mar 04 2014 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.5.0-0.21.gitcb3a0a6
- Use Requires: java-headless rebuild (#1067528)
* Wed Feb 19 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.5.0-0.20.gitcb3a0a6
- Fix unowned directory
* Tue Jan 14 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.5.0-0.19.gitcb3a0a6
- Update to pre-release of upstream version 1.5.0
* Mon Dec 9 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.4.0-1
- Update to upstream version 1.4.0
* Thu Nov 14 2013 Michael Simacek <msimacek@redhat.com> - 1.3.0-4
- Update to Sisu 0.1.0
* Thu Nov 14 2013 Michal Srb <msrb@redhat.com> - 1.3.0-3
- Add dep org.sonatype.sisu:sisu-guice::no_aop:
* Fri Nov 8 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.3.0-2
- Add wagon-http-shared4 to plexus.core
* Wed Nov 06 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.3.0-1
- Update to upstream release 1.3.0
* Tue Nov 5 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.2.0-5
- Require Maven >= 3.1.1-5
- Resolves: rhbz#1014355
* Wed Oct 23 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.2.0-4
- Rebuild to regenerate broken POMs
- Related: rhbz#1021484
* Wed Oct 23 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.2.0-3
- Temporarly skip running tests
* Wed Oct 23 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.2.0-2
- Don't inject manifest if it does not already exist
- Resolves: rhbz#1021484
* Fri Oct 18 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.2.0-1
- Update to upstream version 1.2.0
* Mon Oct 07 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.1.0-2
- Apply patch for rhbz#1015596
* Tue Oct 01 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.1.0-1
- Update to upstream version 1.1.0
* Fri Sep 27 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.0.2-3
- Add __default package specifier support
* Mon Sep 23 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.0.2-2
- Don't try to relativize symlink targets
- Restotre support for relative symlinks
* Fri Sep 20 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.0.2-1
- Update to upstream version 1.0.2
* Tue Sep 10 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.0.0-2
- Workaround broken symlinks for core and connector (#986909)
* Mon Sep 09 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.0.0-1
- Updating to upstream 1.0.0
* Tue Sep 3 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> 1.0.0-0.2.alpha1
- Update to upstream version 1.0.0 alpha1
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Tue Jul 23 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.5.1-3
- Rebuild without bootstrapping
* Tue Jul 23 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.5.1-2
- Install symlink to simplelogger.properties in %%{_sysconfdir}
* Tue Jul 23 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.5.1-1
- Update to upstream version 0.5.1
* Tue Jul 23 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.5.0-7
- Allow installation of Eclipse plugins in javadir
* Mon Jul 22 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.5.0-6
- Remove workaround for plexus-archiver bug
- Use sonatype-aether symlinks
* Wed Jun 5 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.5.0-5
- Fix resolution of tools.jar
* Fri May 31 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.5.0-4
- Fix handling of packages with dots in groupId
- Previous versions also fixed bug #948731
* Tue May 28 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.5.0-3
- Move pre scriptlet to pretrans and implement in lua
* Fri May 24 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.5.0-2
- Fix upgrade path scriptlet
- Add patch to fix NPE when debugging is disabled
* Fri May 24 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.5.0-1
- Update to upstream version 0.5.0
* Fri May 17 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.4.2-3
- Add patch: install MOJO fix
* Wed Apr 17 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.4.2-2
- Update plexus-containers-container-default JAR location
* Tue Apr 9 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.4.2-1
- Update to upstream version 0.4.2
* Thu Mar 21 2013 Michal Srb <msrb@redhat.com> - 0.4.1-1
- Update to upstream version 0.4.1
* Fri Mar 15 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.4.0-1
- Update to upstream version 0.4.0
* Fri Mar 15 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.4.0-0.7
- Enable tests
* Thu Mar 14 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.4.0-0.6
- Update to newer snapshot
* Wed Mar 13 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.4.0-0.5
- Update to newer snapshot
* Wed Mar 13 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.4.0-0.4
- Set proper permissions for scripts in _bindir
* Tue Mar 12 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.4.0-0.3
- Update to new upstream snapshot
- Create custom /usr/bin/xmvn instead of using %%jpackage_script
- Mirror maven directory structure
- Add Plexus Classworlds config file
* Wed Mar 6 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.4.0-0.2
- Update to newer snapshot
* Wed Mar 6 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.4.0-0.1
- Update to upstream snapshot of version 0.4.0
* Mon Feb 25 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.3.1-2
- Install effective POMs into a separate directory
* Thu Feb 7 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.3.1-1
- Update to upstream version 0.3.1
* Tue Feb 5 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.3.0-1
- Update to upstream version 0.3.0
- Don't rely on JPP symlinks when resolving artifacts
- Blacklist more artifacts
- Fix dependencies
* Thu Jan 24 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.2.6-1
- Update to upstream version 0.2.6
* Mon Jan 21 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.2.5-1
- Update to upstream version 0.2.5
* Fri Jan 11 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.2.4-1
- Update to upstream version 0.2.4
* Wed Jan 9 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.2.3-1
- Update to upstream version 0.2.3
* Tue Jan 8 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.2.2-1
- Update to upstream version 0.2.2
* Tue Jan 8 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.2.1-1
- Update to upstream version 0.2.1
* Mon Jan 7 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.2.0-1
- Update to upstream version 0.2.0
- New major features: depmaps, compat symlinks, builddep MOJO
- Install effective POMs for non-POM artifacts
- Multiple major and minor bugfixes
- Drop support for resolving artifacts from %%_javajnidir
* Fri Dec 7 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.1.5-1
- Update to upstream version 0.1.5
* Fri Dec 7 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.1.4-1
- Update to upstream version 0.1.4
* Fri Dec 7 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.1.3-1
- Update to upstream version 0.1.3
* Fri Dec 7 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.1.2-1
- Update to upstream version 0.1.2
* Fri Dec 7 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.1.1-1
- Update to upstream version 0.1.1
* Thu Dec 6 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.1.0-1
- Update to upstream version 0.1.0
- Implement auto requires generator
* Mon Dec 3 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.0.2-1
- Update to upstream version 0.0.2
* Thu Nov 29 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.0.1-1
- Update to upstream version 0.0.1
* Wed Nov 28 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 0-2
- Add jpackage scripts
* Mon Nov 5 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 0-1
- Initial packaging