Skip to content

bug(#3199): combine deps and resolve + fixed phi converting + removing mark #3998

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions eo-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,6 @@
<version>5.10</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.17.0</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-reload4j</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ public final class CompileMojo extends SafeMojo {
* Mojas to execute.
*/
private static final Moja<?>[] MOJAS = {
new Moja<>(DownloadDepsMojo.class),
new Moja<>(AssembleMojo.class),
new Moja<>(LintMojo.class),
new Moja<>(ResolveMojo.class),
Expand Down
67 changes: 0 additions & 67 deletions eo-maven-plugin/src/main/java/org/eolang/maven/Coordinates.java

This file was deleted.

137 changes: 0 additions & 137 deletions eo-maven-plugin/src/main/java/org/eolang/maven/DcsFake.java

This file was deleted.

129 changes: 129 additions & 0 deletions eo-maven-plugin/src/main/java/org/eolang/maven/Dep.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
/*
* SPDX-FileCopyrightText: Copyright (c) 2016-2025 Objectionary.com
* SPDX-License-Identifier: MIT
*/
package org.eolang.maven;

import java.util.function.Supplier;
import javax.annotation.Nonnull;
import org.apache.maven.model.Dependency;

/**
* Wrapped for maven model {@link Dependency}.
*
* @since 0.54
*/
final class Dep implements Comparable<Dep>, Supplier<Dependency> {

/**
* The dependency.
*/
private final Dependency dependency;

/**
* Ctor.
*/
Dep() {
this(new Dependency());
}

/**
* Ctor.
* @param dep The dependency
*/
Dep(final Dependency dep) {
this.dependency = dep;
}

@Override
public String toString() {
final String ret;
if (this.dependency.getClassifier() == null || this.dependency.getClassifier().isEmpty()) {
ret = String.format(
"%s:%s:%s",
this.dependency.getGroupId(),
this.dependency.getArtifactId(),
this.dependency.getVersion()
);
} else {
ret = String.format(
"%s:%s:%s:%s",
this.dependency.getGroupId(),
this.dependency.getArtifactId(),
this.dependency.getClassifier(),
this.dependency.getVersion()
);
}
return ret;
}

@Override
public int compareTo(@Nonnull final Dep other) {
return this.toString().compareTo(String.valueOf(other));
}

@Override
public boolean equals(@Nonnull final Object other) {
return this.toString().equals(String.valueOf(other));
}

@Override
public int hashCode() {
return this.toString().hashCode();
}

@Override
public Dependency get() {
return this.dependency;
}

/**
* Set group id.
* @param group Group id
* @return Self
*/
Dep withGroupId(final String group) {
this.dependency.setGroupId(group);
return this;
}

/**
* Set artifact id.
* @param artifact Artifact id
* @return Self
*/
Dep withArtifactId(final String artifact) {
this.dependency.setArtifactId(artifact);
return this;
}

/**
* Set version.
* @param version Version
* @return Self
*/
Dep withVersion(final String version) {
this.dependency.setVersion(version);
return this;
}

/**
* Set scope.
* @param scope Scope
* @return Self
*/
Dep withScope(final String scope) {
this.dependency.setScope(scope);
return this;
}

/**
* Set classifier id.
* @param classifier Classifier
* @return Self
*/
Dep withClassifier(final String classifier) {
this.dependency.setClassifier(classifier);
return this;
}
}
Loading
Loading