Failed to execute goal org.codehaus.mojo:buildnumber-maven-plugin:1.4:create-metadata

3,590 views
Skip to first unread message

Shishija Kappurath

unread,
Jun 10, 2019, 3:08:00 PM6/10/19
to HAPI FHIR
I am trying to build with MAVEN the project thats located at https://github.com/jamesagnew/hapi-fhir. I am trying the build in windows using JDK 1.8 and Maven 3.3.9. i have failure as below. am i missing anything? 

[INFO] --- buildnumber-maven-plugin:1.4:create (standard) @ hapi-fhir-base ---
[INFO] Executing: cmd.exe /X /C "git rev-parse --verify HEAD"
[INFO] Working directory: C:\hapi-fhir\hapi-fhir-master\hapi-fhir-base
[INFO] Storing buildNumber: null at timestamp: 1560190520069
[WARNING] Cannot get the branch information from the git repository:
Detecting the current branch failed: fatal: Not a git repository (or any of the parent directories): .git

[INFO] Executing: cmd.exe /X /C "git rev-parse --verify HEAD"
[INFO] Working directory: C:\hapi-fhir\hapi-fhir-master\hapi-fhir-base
[INFO] Storing buildScmBranch: UNKNOWN_BRANCH
[INFO]
[INFO] --- buildnumber-maven-plugin:1.4:create-metadata (downstream) @ hapi-fhir-base ---
[INFO] Executing: cmd.exe /X /C "git rev-parse --verify HEAD"
[INFO] Working directory: C:\hapi-fhir\hapi-fhir-master\hapi-fhir-base
[INFO] ------------------------------------------------------------------------

[INFO] HAPI FHIR - Core Library ........................... FAILURE [  1.776 s]
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.889 s
[INFO] Finished at: 2019-06-10T13:15:21-05:00
[INFO] Final Memory: 59M/981M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:buildnumber-maven-plugin:1.4:create-metadata (downstream) on project hapi-fhir-base: Execution downstream of goal org.codehaus.mojo:buildnumber-maven-plugin:1.4:create-metadata failed. NullPointerException -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR]

steven...@gmail.com

unread,
Nov 7, 2019, 6:42:59 PM11/7/19
to HAPI FHIR
I added the following under this plugin in the parent project's pom.xml:

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>1.4</version>
<!-- Add the following configuration and execution: -->
                                        <configuration>
                                            <revisionOnScmFailure>no.scm.config.in.pom</revisionOnScmFailure>
                                        </configuration>
                                        <executions>
                                            <execution>
                                                <id>create-timestamp-id</id>
                                                <phase>validate</phase>
                                                <goals>
                                                    <goal>create-timestamp</goal>
                                                </goals>
                                                <configuration>
                                                    <timestampFormat>yyyy-MM-dd HH:mm:ss.S</timestampFormat>
                                                    <timestampPropertyName>myBuildNumberVariable</timestampPropertyName>
                                                    <!-- formats the timestamp all together like 2016-04-04 14:17:05.123 and puts 
                                                        it in the ${myBuildNumberVariable} buildProperty -->
                                                </configuration>
                                            </execution>
                                        </executions>
</plugin>

James Agnew

unread,
Nov 7, 2019, 7:28:01 PM11/7/19
to steven...@gmail.com, HAPI FHIR
By coincidence, the same fix went into master about 4 days ago :) https://github.com/jamesagnew/hapi-fhir/commit/48930de31c2bcb921a2a04a05b6d199db3862778

--
You received this message because you are subscribed to the Google Groups "HAPI FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hapi-fhir/61c7136a-6a93-4b08-b210-6d5078bf569f%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages