Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

import org.apache.maven.artifact.Artifact;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugin.logging.Log;
import org.apache.maven.plugins.ear.util.ArtifactRepository;
import org.apache.maven.shared.mapping.MappingUtils;
import org.codehaus.plexus.interpolation.InterpolationException;
Expand Down Expand Up @@ -266,9 +267,10 @@ public String getBundleFileName() {
String outputFileNameMapping = earExecutionContext.getOutputFileNameMapping();
bundleFileName = MappingUtils.evaluateFileNameMapping(outputFileNameMapping, artifact);
} catch (InterpolationException e) {
// We currently ignore this here, cause assumption is that
// has already been happened before..
// FIXME: Should be checked first.
Log log = earExecutionContext.getLog();
if (log != null) {
log.warn("Failed to evaluate file name mapping for [" + this + "]", e);
}
}

// bundleFileName = earExecutionContext.getFileNameMapping().mapFileName( artifact );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ public void execute() throws MojoExecutionException, MojoFailureException {
jbossConfiguration,
outputFileNameMapping,
typeMappingService);
earExecutionContext.setLog(getLog());

getLog().debug("Resolving ear modules ...");
List<EarModule> allModules = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/
package org.apache.maven.plugins.ear;

import org.apache.maven.plugin.logging.Log;
import org.apache.maven.plugins.ear.util.ArtifactRepository;
import org.apache.maven.plugins.ear.util.ArtifactTypeMappingService;
import org.apache.maven.project.MavenProject;
Expand All @@ -36,6 +37,8 @@ public class EarExecutionContext {

private ArtifactRepository artifactRepository;

private Log log;

/**
* @param project {@link MavenProject}
* @param mainArtifactId the artifactId
Expand All @@ -60,6 +63,14 @@ public EarExecutionContext(
typeMappingService);
}

void setLog(Log log) {
this.log = log;
}

Log getLog() {
return log;
}

/**
* @return {@link #defaultLibBundleDir}
*/
Expand Down