-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SHRINKRES-78 Custom FormatProcessors registered via SPI
- Loading branch information
1 parent
8b061a8
commit 30f4020
Showing
43 changed files
with
1,383 additions
and
823 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...urces/META-INF/services/org.jboss.shrinkwrap.resolver.api.formatprocessor.FormatProcessor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
org.jboss.shrinkwrap.resolver.api.maven.archive.ArchiveFormatProcessor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
...g/jboss/shrinkwrap/resolver/api/maven/formatprocessor/MavenResolvedArtifactProcessor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package org.jboss.shrinkwrap.resolver.api.maven.formatprocessor; | ||
|
||
import org.jboss.shrinkwrap.resolver.api.formatprocessor.FormatProcessor; | ||
import org.jboss.shrinkwrap.resolver.api.maven.MavenResolvedArtifact; | ||
|
||
/** | ||
* A format processor which returns {@link MavenResolvedArtifact}. As {@link MavenResolvedArtifact} is the default format for | ||
* Maven resolution, this is a no-op format processor. | ||
* | ||
* @author <a href="mailto:kpiwko@redhat.com">Karel Piwko</a> | ||
* | ||
*/ | ||
public class MavenResolvedArtifactProcessor implements FormatProcessor<MavenResolvedArtifact, MavenResolvedArtifact> { | ||
|
||
@Override | ||
public boolean handles(Class<?> resolvedTypeClass) { | ||
return MavenResolvedArtifact.class.isAssignableFrom(resolvedTypeClass); | ||
} | ||
|
||
@Override | ||
public boolean returns(Class<?> returnTypeClass) { | ||
return MavenResolvedArtifact.class.equals(returnTypeClass); | ||
} | ||
|
||
@Override | ||
public MavenResolvedArtifact process(MavenResolvedArtifact input, Class<MavenResolvedArtifact> returnType) | ||
throws IllegalArgumentException { | ||
// no-op | ||
return input; | ||
} | ||
|
||
} |
1 change: 1 addition & 0 deletions
1
...urces/META-INF/services/org.jboss.shrinkwrap.resolver.api.formatprocessor.FormatProcessor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
org.jboss.shrinkwrap.resolver.api.maven.formatprocessor.MavenResolvedArtifactProcessor |
Oops, something went wrong.