Skip to content

Commit

Permalink
Uses Maven Artifact class instead of Aether Artifact to properly reso…
Browse files Browse the repository at this point in the history
…lve dependencies

Closes #273
  • Loading branch information
lukaszlenart committed Apr 20, 2023
1 parent 524d344 commit 7667ffa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
*/
package com.akathist.maven.plugins.launch4j;

import org.apache.maven.artifact.Artifact;
import org.apache.maven.plugins.annotations.Parameter;
import org.eclipse.aether.artifact.Artifact;

import java.util.ArrayList;
import java.util.Arrays;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ private void doExecute() throws MojoExecutionException {
getLog().debug("Overwriting config file property 'outfile' (='" + c.getOutfile().getAbsolutePath() + "') with local value '" + outfile.getAbsolutePath() + "'");
c.setOutfile(outfile);
}

if (icon != null) {
c.setIcon(icon);
}
Expand Down Expand Up @@ -445,10 +445,7 @@ private void doExecute() throws MojoExecutionException {
c.setVariables(vars);

if (classPath != null) {
Set<Artifact> newArtifacts = dependencies.stream().map(old ->
new DefaultArtifact(old.getGroupId(), old.getArtifactId(), old.getClassifier(), null, old.getVersion())
).collect(Collectors.toSet());
c.setClassPath(classPath.toL4j(newArtifacts));
c.setClassPath(classPath.toL4j(dependencies));
}
if (jre != null) {
jre.deprecationWarning(getLog());
Expand Down

0 comments on commit 7667ffa

Please sign in to comment.