-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This involves full reformat of the sources using spotless maven pluging. If this commit enters master, it MUST be followed by another one that sets this commit hash as "git blame ignore". No code change, just reformat of Java, Scala and Kotlin source.
- Loading branch information
Showing
282 changed files
with
17,758 additions
and
18,888 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,6 @@ | |
|
||
import javax.inject.Named; | ||
import javax.inject.Singleton; | ||
|
||
import org.sonatype.maven.polyglot.mapping.MappingSupport; | ||
|
||
/** | ||
|
@@ -18,13 +17,13 @@ | |
* @author [email protected] (Dhanji R. Prasanna) | ||
*/ | ||
@Singleton | ||
@Named( "atom" ) | ||
@Named("atom") | ||
public class AtomMapping extends MappingSupport { | ||
public AtomMapping() { | ||
super("atom"); | ||
setPomNames("pom.atom"); | ||
setAcceptLocationExtensions(".atom"); | ||
setAcceptOptionKeys("atom:4.0.0"); | ||
setPriority(1); | ||
} | ||
} | ||
public AtomMapping() { | ||
super("atom"); | ||
setPomNames("pom.atom"); | ||
setAcceptLocationExtensions(".atom"); | ||
setAcceptOptionKeys("atom:4.0.0"); | ||
setPriority(1); | ||
} | ||
} |
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 |
---|---|---|
|
@@ -7,13 +7,11 @@ | |
*/ | ||
package org.sonatype.maven.polyglot.atom; | ||
|
||
import javax.inject.Named; | ||
import javax.inject.Singleton; | ||
|
||
import java.io.IOException; | ||
import java.io.Reader; | ||
import java.util.Map; | ||
|
||
import javax.inject.Named; | ||
import javax.inject.Singleton; | ||
import org.apache.maven.model.Model; | ||
import org.apache.maven.model.building.ModelProcessor; | ||
import org.apache.maven.model.building.ModelSource; | ||
|
@@ -25,18 +23,21 @@ | |
|
||
/** | ||
* Reads a <tt>pom.atom</tt> and transforms into a Maven {@link Model}. | ||
* | ||
* | ||
* @author [email protected] (Dhanji R. Prasanna) | ||
*/ | ||
@Singleton | ||
@Named( "atom" ) | ||
@Named("atom") | ||
public class AtomModelReader extends ModelReaderSupport { | ||
|
||
public Model read(final Reader input, final Map<String, ?> options) throws IOException { | ||
assert input != null; | ||
public Model read(final Reader input, final Map<String, ?> options) throws IOException { | ||
assert input != null; | ||
|
||
// Parse the token stream from our pom.atom configuration file. | ||
Project project = new AtomParser((ModelSource)options.get(ModelProcessor.SOURCE), new Tokenizer(IOUtil.toString(input)).tokenize()).parse(); | ||
return project.toMavenModel(); | ||
} | ||
// Parse the token stream from our pom.atom configuration file. | ||
Project project = new AtomParser( | ||
(ModelSource) options.get(ModelProcessor.SOURCE), | ||
new Tokenizer(IOUtil.toString(input)).tokenize()) | ||
.parse(); | ||
return project.toMavenModel(); | ||
} | ||
} |
Oops, something went wrong.