Class AbstractScmMojo

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.io.File basedir
      The base directory.
      private java.lang.String connectionType
      The type of connection to use (connection or developerConnection).
      private java.lang.String connectionUrl
      The SCM connection URL.
      private java.lang.String developerConnectionUrl
      The SCM connection URL for developers.
      private java.lang.String excludes
      Comma separated list of excludes file pattern.
      private java.lang.String includes
      Comma separated list of includes file pattern.
      private ScmManager manager  
      private java.lang.String passphrase
      The passphrase (used by java svn).
      private java.lang.String password
      The user password (used by svn, starteam and perforce protocol).
      private java.lang.String privateKey
      The private key (used by java svn).
      private java.util.Map<java.lang.String,​java.lang.String> providerImplementations
      List of provider implementations.
      private boolean pushChanges
      Should distributed changes be pushed to the central repository? For many distributed SCMs like Git, a change like a commit is only stored in your local copy of the repository.
      private org.sonatype.plexus.components.sec.dispatcher.SecDispatcher secDispatcher
      When this plugin requires Maven 3.0 as minimum, this component can be removed and o.a.m.s.c.SettingsDecrypter be used instead.
      private org.apache.maven.settings.Settings settings  
      private java.util.Properties systemProperties
      List of System properties to pass to the JUnit tests.
      private java.lang.String tagBase
      The url of tags base directory (used by svn protocol).
      private java.lang.String username
      The user name (used by svn, starteam and perforce protocol).
      private java.io.File workingDirectory
      The working directory.
      private java.lang.String workItem
      A workItem for SCMs like RTC, TFS etc, that may require additional information to perform a pushChange operation.
      • Fields inherited from interface org.apache.maven.plugin.Mojo

        ROLE
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractScmMojo()  
    • Field Detail

      • connectionUrl

        @Parameter(property="connectionUrl",
                   defaultValue="${project.scm.connection}")
        private java.lang.String connectionUrl
        The SCM connection URL.
      • developerConnectionUrl

        @Parameter(property="developerConnectionUrl",
                   defaultValue="${project.scm.developerConnection}")
        private java.lang.String developerConnectionUrl
        The SCM connection URL for developers.
      • connectionType

        @Parameter(property="connectionType",
                   defaultValue="connection")
        private java.lang.String connectionType
        The type of connection to use (connection or developerConnection).
      • workingDirectory

        @Parameter(property="workingDirectory")
        private java.io.File workingDirectory
        The working directory.
      • username

        @Parameter(property="username")
        private java.lang.String username
        The user name (used by svn, starteam and perforce protocol).
      • password

        @Parameter(property="password")
        private java.lang.String password
        The user password (used by svn, starteam and perforce protocol).
      • privateKey

        @Parameter(property="privateKey")
        private java.lang.String privateKey
        The private key (used by java svn).
      • passphrase

        @Parameter(property="passphrase")
        private java.lang.String passphrase
        The passphrase (used by java svn).
      • tagBase

        @Parameter(property="tagBase")
        private java.lang.String tagBase
        The url of tags base directory (used by svn protocol). It is not necessary to set it if you use the standard svn layout (branches/tags/trunk).
      • includes

        @Parameter(property="includes")
        private java.lang.String includes
        Comma separated list of includes file pattern.
      • excludes

        @Parameter(property="excludes")
        private java.lang.String excludes
        Comma separated list of excludes file pattern.
      • secDispatcher

        @Component(hint="mng-4384")
        private org.sonatype.plexus.components.sec.dispatcher.SecDispatcher secDispatcher
        When this plugin requires Maven 3.0 as minimum, this component can be removed and o.a.m.s.c.SettingsDecrypter be used instead.
      • basedir

        @Parameter(property="basedir",
                   required=true)
        private java.io.File basedir
        The base directory.
      • settings

        @Parameter(defaultValue="${settings}",
                   readonly=true)
        private org.apache.maven.settings.Settings settings
      • systemProperties

        @Parameter
        private java.util.Properties systemProperties
        List of System properties to pass to the JUnit tests.
      • providerImplementations

        @Parameter
        private java.util.Map<java.lang.String,​java.lang.String> providerImplementations
        List of provider implementations.
      • pushChanges

        @Parameter(property="pushChanges",
                   defaultValue="true")
        private boolean pushChanges
        Should distributed changes be pushed to the central repository? For many distributed SCMs like Git, a change like a commit is only stored in your local copy of the repository. Pushing the change allows your to more easily share it with other users.
        Since:
        1.4
      • workItem

        @Parameter(property="workItem")
        private java.lang.String workItem
        A workItem for SCMs like RTC, TFS etc, that may require additional information to perform a pushChange operation.
        Since:
        1.9.5
    • Constructor Detail

      • AbstractScmMojo

        public AbstractScmMojo()
    • Method Detail

      • execute

        public void execute()
                     throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • setConnectionType

        protected void setConnectionType​(java.lang.String connectionType)
      • getConnectionUrl

        public java.lang.String getConnectionUrl()
      • setConnectionUrl

        public void setConnectionUrl​(java.lang.String connectionUrl)
      • getWorkingDirectory

        public java.io.File getWorkingDirectory()
      • getBasedir

        public java.io.File getBasedir()
      • setWorkingDirectory

        public void setWorkingDirectory​(java.io.File workingDirectory)
      • getScmManager

        public ScmManager getScmManager()
      • getFileSet

        public ScmFileSet getFileSet()
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • loadInfosFromSettings

        private void loadInfosFromSettings​(ScmProviderRepositoryWithHost repo)
        Load username password from settings if user has not set them in JVM properties
        Parameters:
        repo - not null
      • decrypt

        private java.lang.String decrypt​(java.lang.String str,
                                         java.lang.String server)
      • checkResult

        public void checkResult​(ScmResult result)
                         throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • getIncludes

        public java.lang.String getIncludes()
      • setIncludes

        public void setIncludes​(java.lang.String includes)
      • getExcludes

        public java.lang.String getExcludes()
      • setExcludes

        public void setExcludes​(java.lang.String excludes)
      • getScmVersion

        public ScmVersion getScmVersion​(java.lang.String versionType,
                                        java.lang.String version)
                                 throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • handleExcludesIncludesAfterCheckoutAndExport

        protected void handleExcludesIncludesAfterCheckoutAndExport​(java.io.File checkoutDirectory)
                                                             throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException