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 @@ -727,7 +727,7 @@ private void addResource(

private interface PackageMapper {
/**
* Map an entity name according to the mapping rules known to this package mapper
* Map an entity name according to the mapping rules known to this package mapper.
*
* @param entityName entity name to be mapped
* @param mapPaths map "slashy" names like paths or internal Java class names, e.g. {@code com/acme/Foo}?
Expand All @@ -738,7 +738,7 @@ private interface PackageMapper {
}

/**
* A package mapper based on a list of {@link Relocator}s
* A package mapper based on a list of {@link Relocator}s.
*/
private static class DefaultPackageMapper implements PackageMapper {
private static final Pattern CLASS_PATTERN = Pattern.compile("(\\[*)?L(.+);");
Expand Down
13 changes: 7 additions & 6 deletions src/main/java/org/apache/maven/plugins/shade/ShadeRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

/**
* Parameter object used to pass multitude of args to Shader.shade()
*
* @since 2.0
*/
public class ShadeRequest {
Expand All @@ -51,7 +52,7 @@ public Set<File> getJars() {
/**
* Which jars to shade.
*
* @param jars The jars.
* @param jars the jars
*/
public void setJars(Set<File> jars) {
this.jars = jars;
Expand All @@ -64,7 +65,7 @@ public File getUberJar() {
/**
* Output jar.
*
* @param uberJar The ueberJar file.
* @param uberJar the ueberJar file
*/
public void setUberJar(File uberJar) {
this.uberJar = uberJar;
Expand All @@ -77,7 +78,7 @@ public List<Filter> getFilters() {
/**
* The filters.
*
* @param filters The filters
* @param filters the filters
*/
public void setFilters(List<Filter> filters) {
this.filters = filters;
Expand All @@ -90,7 +91,7 @@ public List<Relocator> getRelocators() {
/**
* The relocators.
*
* @param relocators The relocators.
* @param relocators the relocators
*/
public void setRelocators(List<Relocator> relocators) {
this.relocators = relocators;
Expand All @@ -103,7 +104,7 @@ public List<ResourceTransformer> getResourceTransformers() {
/**
* The transformers.
*
* @param resourceTransformers List of resourceTransformers.
* @param resourceTransformers list of resourceTransformers
*/
public void setResourceTransformers(List<ResourceTransformer> resourceTransformers) {
this.resourceTransformers = resourceTransformers;
Expand All @@ -118,7 +119,7 @@ public boolean isShadeSourcesContent() {
* When false, it will just relocate the java source files to the shaded paths, but will not modify the
* actual contents of the java source files.
*
* @param shadeSourcesContent {@code true} or {@code false}.
* @param shadeSourcesContent {@code true} or {@code false}
*/
public void setShadeSourcesContent(boolean shadeSourcesContent) {
this.shadeSourcesContent = shadeSourcesContent;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/apache/maven/plugins/shade/Shader.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public interface Shader {
*
* @param shadeRequest holds the many parameters to this method
* @throws IOException for IO errors reading the thing
* @throws MojoExecutionException for anything else that goes wrong.
* @throws MojoExecutionException for anything else that goes wrong
*/
void shade(ShadeRequest shadeRequest) throws IOException, MojoExecutionException;
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@
*/
public interface Filter {
/**
* @param jar The jar file.
* @return true if we can filter false otherwise.
* @param jar the jar file
* @return true if we can filter false otherwise
*/
boolean canFilter(File jar);

/**
* @param classFile The classFile.
* @return true if the file has been filtered false otherwise.
* @param classFile the classFile
* @return true if the file has been filtered false otherwise
*/
boolean isFiltered(String classFile);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public class MinijarFilter implements Filter {
/**
* @param project {@link MavenProject}
* @param log {@link Log}
* @throws IOException in case of error.
* @throws IOException in case of error
*/
public MinijarFilter(MavenProject project, Log log) throws IOException {
this(project, log, Collections.<SimpleFilter>emptyList(), Collections.<String>emptySet());
Expand All @@ -78,7 +78,7 @@ public MinijarFilter(MavenProject project, Log log) throws IOException {
* @param project {@link MavenProject}
* @param log {@link Log}
* @param entryPoints
* @throws IOException in case of error.
* @throws IOException in case of error
*/
public MinijarFilter(MavenProject project, Log log, Set<String> entryPoints) throws IOException {
this(project, log, Collections.<SimpleFilter>emptyList(), entryPoints);
Expand All @@ -89,7 +89,7 @@ public MinijarFilter(MavenProject project, Log log, Set<String> entryPoints) thr
* @param log {@link Log}
* @param simpleFilters {@link SimpleFilter}
* @param entryPoints
* @throws IOException in case of errors.
* @throws IOException in case of errors
* @since 1.6
*/
public MinijarFilter(MavenProject project, Log log, List<SimpleFilter> simpleFilters, Set<String> entryPoints)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
*/
/**
* @author kama
*
*/
public class SimpleFilter implements Filter {

Expand All @@ -44,29 +43,29 @@ public class SimpleFilter implements Filter {
private boolean excludeDefaults = true;

/**
* @deprecated As of release 3.2.2, replaced by {@link #SimpleFilter(Set, ArchiveFilter)}}
* @param jars set of {@link File}s.
* @param includes set of includes.
* @param excludes set of excludes.
* @param jars set of {@link File}s
* @param includes set of includes
* @param excludes set of excludes
* @deprecated as of release 3.2.2, replaced by {@link #SimpleFilter(Set, ArchiveFilter)}}
*/
@Deprecated
public SimpleFilter(Set<File> jars, Set<String> includes, Set<String> excludes) {
this(jars, includes, excludes, true);
}

/**
* @param jars set of {@link File}s.
* @param archiveFilter set of {@link ArchiveFilter}s.
* @param jars set of {@link File}s
* @param archiveFilter set of {@link ArchiveFilter}s
*/
public SimpleFilter(final Set<File> jars, final ArchiveFilter archiveFilter) {
this(jars, archiveFilter.getIncludes(), archiveFilter.getExcludes(), archiveFilter.getExcludeDefaults());
}

/**
* @param jars set of {@link File}s.
* @param includes set of includes.
* @param excludes set of excludes.
* @param excludeDefaults whether to exclude default includes once includes are provided explicitly.
* @param jars set of {@link File}s
* @param includes set of includes
* @param excludes set of excludes
* @param excludeDefaults whether to exclude default includes once includes are provided explicitly
*/
private SimpleFilter(
final Set<File> jars,
Expand All @@ -79,13 +78,17 @@ private SimpleFilter(
this.excludeDefaults = excludeDefaults;
}

/** {@inheritDoc} */
/**
* {@inheritDoc}
*/
@Override
public boolean canFilter(File jar) {
return jars.contains(jar);
}

/** {@inheritDoc} */
/**
* {@inheritDoc}
*/
@Override
public boolean isFiltered(String classFile) {
String path = normalizePath(classFile);
Expand All @@ -94,8 +97,8 @@ public boolean isFiltered(String classFile) {
}

/**
* @param classFile The class file.
* @return true if included false otherwise.
* @param classFile the class file
* @return true if included false otherwise
*/
public boolean isSpecificallyIncluded(String classFile) {
if (includes == null || includes.isEmpty()) {
Expand Down Expand Up @@ -156,7 +159,9 @@ private Set<String> normalizePatterns(Set<String> patterns) {
return result;
}

/** {@inheritDoc} */
/**
* {@inheritDoc}
*/
@Override
public void finished() {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,15 @@
import java.util.Collections;
import java.util.List;

/**
*
*/
public final class RelativizePath {
private RelativizePath() {
//
}

/**
* relativize a pathname.
* @param thing Absolute File of something. (e.g., a parent pom)
* Relativize a pathname.
*
* @param thing absolute File of something. (e.g., a parent pom)
* @param relativeTo base to relativize it do. (e.g., a pom into which a relative pathname to the 'thing' is to be
* installed).
* @return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ public class ShadeMojo extends AbstractMojo {

/**
* Defines whether the shaded artifact should be attached as classifier to the original artifact. If false, the
* shaded jar will be the main artifact of the project
* shaded jar will be the main artifact of the project.
*/
@Parameter
private boolean shadedArtifactAttached;
Expand Down Expand Up @@ -283,7 +283,7 @@ public class ShadeMojo extends AbstractMojo {
private String shadedClassifierName;

/**
* When true, it will attempt to create a sources jar as well
* When true, it will attempt to create a sources jar as well.
*/
@Parameter
private boolean createSourcesJar;
Expand Down Expand Up @@ -372,7 +372,7 @@ public class ShadeMojo extends AbstractMojo {
* When true, the version of each dependency of the reduced pom will be based on the baseVersion of the original
* dependency instead of its resolved version. For example, if the original pom (transitively) depends on
* a:a:2.7-SNAPSHOT, if useBaseVersion is set to false, the reduced pom will depend on a:a:2.7-20130312.222222-12
* whereas if useBaseVersion is set to true, the reduced pom will depend on a:a:2.7-SNAPSHOT
* whereas if useBaseVersion is set to true, the reduced pom will depend on a:a:2.7-SNAPSHOT.
*
* @since 3.0
*/
Expand All @@ -387,6 +387,7 @@ public class ShadeMojo extends AbstractMojo {

/**
* When true, skips the execution of this MOJO.
*
* @since 3.3.0
*/
@Parameter(defaultValue = "false")
Expand Down Expand Up @@ -445,7 +446,7 @@ public class ShadeMojo extends AbstractMojo {
private Map<String, Shader> shaders;

/**
* @throws MojoExecutionException in case of an error.
* @throws MojoExecutionException in case of an error
*/
@SuppressWarnings("checkstyle:methodlength")
@Override
Expand Down
11 changes: 6 additions & 5 deletions src/main/java/org/apache/maven/plugins/shade/pom/Counter.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ public class Counter {
// --------------------------/

/**
* Field currentIndex
* Field currentIndex.
*/
private int currentIndex = 0;

/**
* Field level
* Field level.
*/
private int level;

Expand All @@ -50,22 +50,23 @@ public Counter(int depthLevel) {
// -----------/

/**
* Method getCurrentIndex
* Method getCurrentIndex.
*/
public int getCurrentIndex() {
return currentIndex;
} // -- int getCurrentIndex()

/**
* Method getDepth
* Method getDepth.
*
* @return {@link #level}
*/
public int getDepth() {
return level;
} // -- int getDepth()

/**
* Method increaseCount
* Method increaseCount.
*/
public void increaseCount() {
currentIndex = currentIndex + 1;
Expand Down
Loading
Loading