Class MavenInput

java.lang.Object
javax0.jamal.maven.input.MavenInput
All Implemented Interfaces:
javax0.jamal.api.ResourceReader, javax0.jamal.api.ServiceLoaded

public class MavenInput extends Object implements javax0.jamal.api.ResourceReader
MavenInput can read a file which is inside an archive file in a Maven repository.

The format of the reference is

     maven:groupId:artifactId:version:classifier:fileName
 

or

     maven:groupId:artifactId:version::fileName
 

When there is no classifier then the actual resource is consulted only.

If there is a classifier then the dependency tree is followed to find the resource. In this latter case all the dependencies and resources are downloaded, even if the resource can be found in the actual artifact.

  • Constructor Details

    • MavenInput

      public MavenInput()
  • Method Details

    • canRead

      public boolean canRead(String fileName)
      Specified by:
      canRead in interface javax0.jamal.api.ResourceReader
    • fileStart

      public int fileStart(String fileName)
      Specified by:
      fileStart in interface javax0.jamal.api.ResourceReader
    • read

      public String read(String fileName) throws IOException
      Specified by:
      read in interface javax0.jamal.api.ResourceReader
      Throws:
      IOException
    • read

      public String read(String fileName, boolean noCache) throws IOException
      Specified by:
      read in interface javax0.jamal.api.ResourceReader
      Throws:
      IOException