Class FeatureModelConverter
- java.lang.Object
-
- org.apache.sling.maven.slingstart.FeatureModelConverter
-
public class FeatureModelConverter extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFeatureModelConverter.FeatureFileEntry
-
Constructor Summary
Constructors Constructor Description FeatureModelConverter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidconvert(ModelPreprocessor.Environment env)static voidconvert(ModelPreprocessor.Environment env, ModelPreprocessor.ProjectInfo info, String defaultProvName)static voidconvertDirectories(String featuresDirectory, org.apache.maven.project.MavenProject project, String defaultProvName, org.apache.sling.feature.builder.FeatureProvider fp)static org.apache.sling.feature.FeaturegetFeature(org.apache.sling.feature.ArtifactId id, org.apache.maven.execution.MavenSession session, org.apache.maven.project.MavenProject project, org.apache.maven.artifact.handler.manager.ArtifactHandlerManager manager, org.apache.maven.artifact.resolver.ArtifactResolver resolver)static StringgetOSGiVersion(String version)static StringreadFeatureFile(org.apache.maven.project.MavenProject project, File file, String suggestedClassifier)Read the json file, minify it, add id if missing and replace variables
-
-
-
Method Detail
-
getFeature
public static org.apache.sling.feature.Feature getFeature(org.apache.sling.feature.ArtifactId id, org.apache.maven.execution.MavenSession session, org.apache.maven.project.MavenProject project, org.apache.maven.artifact.handler.manager.ArtifactHandlerManager manager, org.apache.maven.artifact.resolver.ArtifactResolver resolver)
-
convert
public static void convert(ModelPreprocessor.Environment env) throws org.apache.maven.MavenExecutionException
- Throws:
org.apache.maven.MavenExecutionException
-
convertDirectories
public static void convertDirectories(String featuresDirectory, org.apache.maven.project.MavenProject project, String defaultProvName, org.apache.sling.feature.builder.FeatureProvider fp) throws org.apache.maven.MavenExecutionException
- Throws:
org.apache.maven.MavenExecutionException
-
convert
public static void convert(ModelPreprocessor.Environment env, ModelPreprocessor.ProjectInfo info, String defaultProvName) throws org.apache.maven.MavenExecutionException
- Throws:
org.apache.maven.MavenExecutionException
-
readFeatureFile
public static String readFeatureFile(org.apache.maven.project.MavenProject project, File file, String suggestedClassifier)
Read the json file, minify it, add id if missing and replace variables- Parameters:
file- The json file- Returns:
- The read and minified JSON
-
-