0

I have tried to configure it like this but there will be an exception!

<build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <skip></skip>
                    <executable>true</executable>
                    <embeddedLaunchScriptProperties>
                        <property>
                            <name>inlinedConfScript</name>
                            <value>/app/knowledge-base.conf</value>
                        </property>
                    </embeddedLaunchScriptProperties>
                </configuration>
            </plugin>
        </plugins>
   </build>

Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.1.7.RELEASE:repackage (repackage) on project knowledge-base: \app\knowledge-base.conf

  • @JustinKSU Hope to get your help – Kaikang Sun Nov 08 '19 at 08:51
  • What's the exception? If it's not already being logged by Maven, can you run Maven with `-X`? I believe that will make it show it to you. – Andy Wilkinson Nov 08 '19 at 09:06
  • `[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.1.7.RELEASE:repackage (repackage) on project knowledge-base: \app\knowledge-base.conf (System can not find the path.) -> [Help 1]`@AndyWilkinson – Kaikang Sun Nov 08 '19 at 09:16
  • How do I need to avoid Maven verifying this path?@AndyWilkinson – Kaikang Sun Nov 08 '19 at 09:24
  • You can't. The referenced conf script is inlined into the launch script at build time. If the build can't find that file to inline it into the launch script then it's right that it fails. – Andy Wilkinson Nov 08 '19 at 13:47
  • Yes, I finally understand, thank you for your answer. @AndyWilkinson – Kaikang Sun Nov 11 '19 at 07:07

1 Answers1

0
                        <property>
                            <name>inlinedConfScript</name>
                            <value>${basedir}/app/knowledge-base.conf</value>
                        </property>

${basedir} the root directory of your project.

shenqi
  • 11
  • 2
  • Thank you. While this link may answer the question, it is better to provide some details about a solution to make it more understandable. – Jan Jan 10 '21 at 00:57
  • Sorry, that text has been automatically created by SO. What I mean is that your solution does not explain what went wrong and why it works. That would help other users to benefit from the answer. Thank you, @shenqi. – Jan Jan 10 '21 at 08:11