Skip to content

Commit

Permalink
[MNG-7963] Clean up the build (apache#1340)
Browse files Browse the repository at this point in the history
* [MNG-7963] Clean up the build

Changes:
* remove hamcrest 1.3 from scope
* set proc:none to prevent warnings (Sisu APT is on classpath),
  we do not use annotation processing, we produce Sisu index
  explicitly.
* remove some redundant elements from POMs
  • Loading branch information
cstamas authored Dec 13, 2023
1 parent 9cd232f commit eee9514
Show file tree
Hide file tree
Showing 29 changed files with 199 additions and 306 deletions.
25 changes: 20 additions & 5 deletions apache-maven/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 49,7 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-compat</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.sisu</groupId>
<artifactId>org.eclipse.sisu.plexus</artifactId>
</dependency>
<!-- CLI -->

<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
Expand All @@ -66,6 62,8 @@ under the License.
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-file</artifactId>
</dependency>

<!-- CLI -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
Expand Down Expand Up @@ -103,10 101,27 @@ under the License.
<groupId>org.fusesource.jansi</groupId>
<artifactId>jansi</artifactId>
</dependency>

<!-- DI Runtime -->
<dependency>
<groupId>org.eclipse.sisu</groupId>
<artifactId>org.eclipse.sisu.plexus</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.sisu</groupId>
<artifactId>org.eclipse.sisu.inject</artifactId>
<classifier>no_asm</classifier>
</dependency>
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<classifier>classes</classifier>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
</dependency>

</dependencies>

<pluginRepositories>
Expand Down
5 changes: 0 additions & 5 deletions api/maven-api-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,27 34,22 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-api-meta</artifactId>
<version>4.0.0-alpha-10-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-api-model</artifactId>
<version>4.0.0-alpha-10-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-api-settings</artifactId>
<version>4.0.0-alpha-10-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-api-toolchain</artifactId>
<version>4.0.0-alpha-10-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-api-plugin</artifactId>
<version>4.0.0-alpha-10-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>jakarta.inject</groupId>
Expand Down
11 changes: 0 additions & 11 deletions api/maven-api-model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 35,6 @@ under the License.
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-api-xml</artifactId>
<version>4.0.0-alpha-10-SNAPSHOT</version>
</dependency>
</dependencies>

Expand Down Expand Up @@ -67,19 66,9 @@ under the License.
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/package-info.java</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.4.0</version>
<executions>
<execution>
<goals>
Expand Down
1 change: 0 additions & 1 deletion api/maven-api-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 34,6 @@ under the License.
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-api-xml</artifactId>
<version>4.0.0-alpha-10-SNAPSHOT</version>
</dependency>
</dependencies>

Expand Down
10 changes: 0 additions & 10 deletions api/maven-api-settings/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 35,6 @@ under the License.
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-api-xml</artifactId>
<version>4.0.0-alpha-10-SNAPSHOT</version>
</dependency>
</dependencies>

Expand Down Expand Up @@ -81,15 80,6 @@ under the License.
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/package-info.java</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>

Expand Down
10 changes: 0 additions & 10 deletions api/maven-api-toolchain/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 34,6 @@ under the License.
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-api-xml</artifactId>
<version>4.0.0-alpha-10-SNAPSHOT</version>
</dependency>
</dependencies>

Expand Down Expand Up @@ -65,15 64,6 @@ under the License.
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/package-info.java</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>

Expand Down
1 change: 0 additions & 1 deletion api/maven-api-xml/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 34,6 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-api-meta</artifactId>
<version>4.0.0-alpha-10-SNAPSHOT</version>
</dependency>
</dependencies>

Expand Down
23 changes: 18 additions & 5 deletions maven-compat/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,21 76,34 @@ under the License.
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-impl</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-interpolation</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-provider-api</artifactId>
</dependency>

<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-interpolation</artifactId>
<groupId>org.eclipse.sisu</groupId>
<artifactId>org.eclipse.sisu.plexus</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.sisu</groupId>
<artifactId>org.eclipse.sisu.plexus</artifactId>
<artifactId>org.eclipse.sisu.inject</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-provider-api</artifactId>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<scope>test</scope>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 18,6 @@
*/
package org.apache.maven.repository;

import javax.annotation.Priority;
import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Singleton;
Expand Down Expand Up @@ -55,6 54,7 @@
import org.apache.maven.settings.Proxy;
import org.apache.maven.settings.Server;
import org.eclipse.aether.RepositorySystemSession;
import org.eclipse.sisu.Priority;

/**
*/
Expand Down
61 changes: 25 additions & 36 deletions maven-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 83,6 @@ under the License.
<groupId>org.apache.maven</groupId>
<artifactId>maven-api-spi</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-impl</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-api</artifactId>
Expand All @@ -100,47 96,40 @@ under the License.
<artifactId>maven-resolver-util</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.sisu</groupId>
<artifactId>org.eclipse.sisu.plexus</artifactId>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.sisu</groupId>
<artifactId>org.eclipse.sisu.inject</artifactId>
<classifier>no_asm</classifier>
</dependency>
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<classifier>classes</classifier>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-impl</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-classworlds</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>failureaccess</artifactId>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>

<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<scope>provided</scope>
</dependency>
<!-- Plexus -->
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-classworlds</artifactId>
<groupId>org.eclipse.sisu</groupId>
<artifactId>org.eclipse.sisu.plexus</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<groupId>org.eclipse.sisu</groupId>
<artifactId>org.eclipse.sisu.inject</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<scope>provided</scope>
</dependency>

<!-- Test dependencies -->
<!-- Test -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
Expand All @@ -151,11 140,6 @@ under the License.
<artifactId>commons-jxpath</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.xmlunit</groupId>
<artifactId>xmlunit-assertj</artifactId>
Expand All @@ -177,6 161,11 @@ under the License.
<version>${mockitoVersion}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 18,13 @@
*/
package org.apache.maven.internal.aether;

import javax.annotation.PreDestroy;
import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Provider;

import org.eclipse.aether.RepositorySystem;
import org.eclipse.sisu.EagerSingleton;
import org.eclipse.sisu.PreDestroy;

import static java.util.Objects.requireNonNull;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 18,6 @@
*/
package org.apache.maven.internal.impl;

import javax.annotation.Priority;
import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Singleton;
Expand All @@ -29,6 28,7 @@
import org.apache.maven.api.annotations.Nonnull;
import org.apache.maven.api.services.MessageBuilder;
import org.apache.maven.api.services.MessageBuilderFactory;
import org.eclipse.sisu.Priority;

@Experimental
@Named
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 18,6 @@
*/
package org.apache.maven.internal.transformation.impl;

import javax.annotation.PreDestroy;
import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Singleton;
Expand Down Expand Up @@ -48,6 47,7 @@
import org.eclipse.aether.artifact.DefaultArtifact;
import org.eclipse.aether.deployment.DeployRequest;
import org.eclipse.aether.installation.InstallRequest;
import org.eclipse.sisu.PreDestroy;

/**
* Consumer POM transformer.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 18,6 @@
*/
package org.apache.maven.repository;

import javax.annotation.Priority;
import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Singleton;
Expand All @@ -33,6 32,7 @@
import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
import org.apache.maven.bridge.MavenRepositorySystem;
import org.eclipse.sisu.Priority;

@Named
@Priority(10)
Expand Down
Loading

0 comments on commit eee9514

Please sign in to comment.