Class InstallMojo

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

    @Mojo(name="install",
          defaultPhase=PACKAGE)
    public class InstallMojo
    extends org.apache.maven.plugin.AbstractMojo
    • Field Detail

      • site

        @Parameter(property="site")
        protected String site
      • activate

        @Parameter(property="activate")
        protected boolean activate
      • privileged

        @Parameter(property="privileged")
        protected boolean privileged
      • hidden

        @Parameter(property="hidden")
        protected boolean hidden
      • directInstall

        @Parameter(property="directInstall")
        protected boolean directInstall
      • sharedSecret

        @Parameter(property="sharedSecret",
                   defaultValue="loreipsum",
                   required=true)
        protected String sharedSecret
      • repository

        @Parameter(property="repository",
                   defaultValue="Local",
                   required=true)
        protected String repository
      • endpoint

        @Parameter(property="endpoint",
                   defaultValue="http://localhost:8080/appNGizer/",
                   required=true)
        protected URL endpoint
      • file

        protected File file
      • targetFolder

        @Parameter(defaultValue="${project.build.directory}",
                   readonly=true)
        protected File targetFolder
      • targetFile

        @Parameter(defaultValue="${project.artifactId}-${project.version}",
                   readonly=true)
        protected String targetFile
      • baseAuthUser

        @Parameter(property="baseAuthUser")
        protected String baseAuthUser
      • baseAuthPassword

        @Parameter(property="baseAuthPassword")
        protected String baseAuthPassword
      • restTemplate

        protected org.springframework.web.client.RestTemplate restTemplate
    • Constructor Detail

      • InstallMojo

        public InstallMojo()
    • Method Detail

      • execute

        public void execute()
                     throws org.apache.maven.plugin.MojoExecutionException,
                            org.apache.maven.plugin.MojoFailureException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
        org.apache.maven.plugin.MojoFailureException
      • send

        protected <T> org.springframework.http.ResponseEntity<T> send​(Object requestObject,
                                                                      org.springframework.http.HttpHeaders header,
                                                                      org.springframework.http.HttpMethod method,
                                                                      String path,
                                                                      Class<T> resultType)
                                                               throws URISyntaxException,
                                                                      org.apache.maven.plugin.MojoExecutionException
        Throws:
        URISyntaxException
        org.apache.maven.plugin.MojoExecutionException
      • send

        protected <T> org.springframework.http.ResponseEntity<T> send​(Object requestObject,
                                                                      org.springframework.http.HttpHeaders header,
                                                                      org.springframework.http.HttpMethod method,
                                                                      String path,
                                                                      Class<T> resultType,
                                                                      boolean throwErrorOn4xx)
                                                               throws URISyntaxException,
                                                                      org.apache.maven.plugin.MojoExecutionException
        Throws:
        URISyntaxException
        org.apache.maven.plugin.MojoExecutionException
      • debugBody

        protected void debugBody​(Object o,
                                 org.springframework.http.MediaType mediaType)
      • getHeader

        protected org.springframework.http.HttpHeaders getHeader()
      • login

        protected void login()
                      throws URISyntaxException,
                             org.apache.maven.plugin.MojoExecutionException
        Throws:
        URISyntaxException
        org.apache.maven.plugin.MojoExecutionException
      • getRepository

        protected org.springframework.http.ResponseEntity<Repository> getRepository()
                                                                             throws URISyntaxException,
                                                                                    org.apache.maven.plugin.MojoExecutionException
        Throws:
        URISyntaxException
        org.apache.maven.plugin.MojoExecutionException
      • determineFile

        protected void determineFile()
                              throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException