Skip to content

Commit

Permalink
#3460 show deps unpacked
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Nov 10, 2024
1 parent 142fd3c commit a559ad0
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ public void exec() {
if (this.scopedTojos().size() == 0) {
Logger.warn(this, "Nothing to discover, since there are no programs");
} else {
Logger.info(this, "Nothing to discover, all programs checked already");
Logger.info(
this,
"Nothing to discover, all %d programs checked already",
this.scopedTojos().size()
);
}
} else if (discovered.isEmpty()) {
Logger.info(
Expand Down
5 changes: 2 additions & 3 deletions eo-maven-plugin/src/main/java/org/eolang/maven/MarkMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
import org.eolang.maven.name.OnSwap;
import org.eolang.maven.name.OnVersioned;
import org.eolang.maven.tojos.ForeignTojos;
import org.eolang.maven.util.Rel;
import org.eolang.maven.util.Walk;

/**
Expand Down Expand Up @@ -90,8 +89,8 @@ private long scan(final Path dir, final String version) {
.map(tojo -> tojo.withVersion(version))
.count();
Logger.info(
this, "Found %d sources in %s, %d program(s) registered with version %s",
sources.size(), new Rel(dir), done, version
this, "Found %d source(s) in %[file]s, %d program(s) registered with version %s",
sources.size(), dir, done, version
);
return done;
}
Expand Down
18 changes: 16 additions & 2 deletions eo-maven-plugin/src/main/java/org/eolang/maven/ResolveMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.cactoos.Func;
import org.cactoos.iterable.Joined;
import org.cactoos.iterable.Mapped;
import org.cactoos.list.ListOf;
import org.eolang.maven.dependencies.DcsDefault;
import org.eolang.maven.dependencies.DcsDepgraph;
Expand Down Expand Up @@ -150,12 +152,13 @@ public void exec() {
this.central = new Central(this.project, this.session, this.manager);
}
final Collection<Dependency> deps = this.deps();
final Path target = this.targetDir.toPath().resolve(ResolveMojo.DIR);
for (final Dependency dep : deps) {
String classifier = dep.getClassifier();
if (classifier == null || classifier.isEmpty()) {
classifier = "-";
}
final Path dest = this.targetDir.toPath().resolve(ResolveMojo.DIR)
final Path dest = target
.resolve(dep.getGroupId())
.resolve(dep.getArtifactId())
.resolve(classifier)
Expand Down Expand Up @@ -184,7 +187,18 @@ files, new Coordinates(dep)
if (deps.isEmpty()) {
Logger.debug(this, "No new dependencies unpacked");
} else {
Logger.info(this, "New %d dependenc(ies) unpacked", deps.size());
Logger.info(
this,
"New %d dependenc(ies) unpacked to %[file]s: %s",
deps.size(), target,
new Joined<>(
", ",
new Mapped<>(
Object::toString,
deps
)
)
);
}
}

Expand Down

0 comments on commit a559ad0

Please sign in to comment.