-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fj-doc-maven-plugin] check if module exists
- Loading branch information
Showing
6 changed files
with
94 additions
and
11 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
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
39 changes: 39 additions & 0 deletions
39
fj-doc-maven-plugin/src/main/java/org/fugerit/java/doc/project/facade/ModuleFacade.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,39 @@ | ||
package org.fugerit.java.doc.project.facade; | ||
|
||
import java.util.*; | ||
|
||
public class ModuleFacade { | ||
|
||
private ModuleFacade() {} | ||
|
||
private static final String MODULE_PREFIX = "fj-doc-"; | ||
|
||
public static String toModuleName( String module ) { | ||
if ( module.contains( MODULE_PREFIX ) ) { | ||
return module; | ||
} else { | ||
return MODULE_PREFIX + module; | ||
} | ||
} | ||
|
||
private static final Set<String> MODULES = new HashSet<>( Arrays.asList( | ||
toModuleName( "base" ), | ||
toModuleName( "base-json" ), | ||
toModuleName( "base-yaml" ), | ||
toModuleName( "freemarker" ), | ||
toModuleName( "mod-fop" ), | ||
toModuleName( "mod-poi" ), | ||
toModuleName( "mod-opencsv" ), | ||
toModuleName( "mod-openpdf-ext" ), | ||
toModuleName( "mod-openrtf-ext" ) | ||
) ); | ||
|
||
public static boolean isModuleSupported( String moduleName ) { | ||
return MODULES.contains( toModuleName( moduleName ) ); | ||
} | ||
|
||
public static Collection<String> getModules() { | ||
return Collections.unmodifiableCollection( MODULES ); | ||
} | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>fjdocmavenpluginok1</artifactId> | ||
<groupId>org.fugerit.java.test</groupId> | ||
<version>1.0.0-SNAPSHOT</version> | ||
|
||
<name>Fugerit Doc Maven Plugin Ok POM Test 1</name> | ||
|
||
<licenses> | ||
<license> | ||
<name>Apache License, Version 2.0</name> | ||
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url> | ||
<distribution>repo</distribution> | ||
</license> | ||
</licenses> | ||
|
||
<organization> | ||
<url>https://www.fugerit.org</url> | ||
<name>Fugerit</name> | ||
</organization> | ||
|
||
<url>https://www.fugerit.org/</url> | ||
|
||
</project> |