Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9165983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:03:03+00:00 2026-06-17T15:03:03+00:00

I’m trying to use the maven SCM plugin to commit some files to a

  • 0

I’m trying to use the maven SCM plugin to commit some files to a git repo during an automated build, the plugin requires a commit message to be set as a system property, I don’t want to have to pass this on the command line (I’m also using the release plugin and this causes issues).

I’ve tried everything I think of to add the message system property via the pom but no luck, here’s a stripped down version of my pom:

<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.monkeys.coding</groupId>
    <artifactId>project</artifactId>
    <packaging>js</packaging>
    <version>1.0.4-SNAPSHOT</version>

    <name>Some Project</name>
    <description>Some Project where I want to add files to git during build</description>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <projectVersion>${project.version}</projectVersion>
    </properties>

    <scm>
        <connection>scm:git:http://some.git.repo:9080/git/module.git</connection>
        <developerConnection>scm:git:http://some.git.repo:9080/git/module.git</developerConnection>
        <url>http://some.git.repo:9080/git/module.git</url>
    </scm>

    <build>
        <finalName>${project.artifactId}</finalName>
        <!-- Package as js -->
        <extensions>
            <extension>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>javascript-maven-plugin</artifactId>
                <version>2.0.0-alpha-1</version>
            </extension>
        </extensions>
    ...
    </build>

    <profiles>
        <!-- run this profile when releasing the library -->
        <profile>
            <id>release</id>
            <properties>
                <message>Add version files to git</message>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-scm-plugin</artifactId>
                        <version>1.8.1</version>
                        <configuration>
                            <message>Add version files to git</message>
                            <systemProperties>
                                <systemProperty>
                                    <name>message</name>
                                    <value>[Add Version to git]</value>
                                </systemProperty>
                            </systemProperties>
                        </configuration>
                        <executions>
                            <execution>
                                <id>add-version-to-git</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>add</goal>
                                    <goal>checkin</goal>
                                </goals>
                                <configuration>
                                    <basedir>./</basedir>
                                    <includes>versions/*</includes>
                                    <systemProperties>
                                        <systemProperty>
                                            <name>message</name>
                                            <value>[Add Version to git]</value>
                                        </systemProperty>
                                    </systemProperties>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>

Adding message via the profile properties seems to work, the files are commited to get and the message appear in the repo but the build fails with this error:

    [ERROR] Provider message:
    [ERROR] The git-commit command failed.
    [ERROR] Command output:
    [ERROR] 
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 28.637s
    [INFO] Finished at: Fri Jan 18 12:59:40 GMT 2013
    [INFO] Final Memory: 19M/81M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-scm-plugin:1.8.1:checkin (add-version-to-git) on project: Command failed.The git-commit command failed. -> [Help 1]

Any ideas on what I’m doing wrong?

Cheers
Rob

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T15:03:04+00:00Added an answer on June 17, 2026 at 3:03 pm

    Try changing the pom.xml to look like this:

    ...
        <executions>
            <execution>
                <id>add-version-to-git</id>
                <phase>package</phase>
                <goals>
                    <goal>add</goal>
                    <goal>checkin</goal>
                </goals>
                <configuration>
                    <basedir>./</basedir>
                    <includes>versions/*</includes>
                    <message>[Add Version to git]</message>
                </configuration>
            </execution>
        </executions>
    ...
    

    Try using message property instead of systemProperties.

    Or you could always do this in command line like:

    mvn -Dmessage="<commit_log_here>" scm:checkin
    

    as stated here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to find ID3V2 tags from MP3 file using jid3lib in Java.
I am confused How to use looping for Json response Array in another Array.
I am trying to render a haml file in a javascript response like so:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.