Skip to content
This repository was archived by the owner on Oct 8, 2025. It is now read-only.
This repository was archived by the owner on Oct 8, 2025. It is now read-only.

Configured script templates must be absolute paths #117

Description

@aalmiray

Overriding the default <unixScriptTemplate> and <windowsScriptTemplate> requires setting absolute paths instead of relative. if the configuration is set to

<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>appassembler-maven-plugin</artifactId>
  <configuration>
    <unixScriptTemplate>src/main/assembly/unixBinTemplate</unixScriptTemplate>
    <windowsScriptTemplate>src/main/assembly/windowsBinTemplate</windowsScriptTemplate>
    <!-- ... -->
</plugin>

Then a an exception occurs

Caused by: org.codehaus.mojo.appassembler.daemon.DaemonGeneratorException: Unable to load external template resource: src/main/assembly/windowsBinTemplate
    at org.codehaus.mojo.appassembler.daemon.script.DefaultScriptGenerator.getScriptTemplate (DefaultScriptGenerator.java:319)
    at org.codehaus.mojo.appassembler.daemon.script.DefaultScriptGenerator.createBinScript (DefaultScriptGenerator.java:177)
    at org.codehaus.mojo.appassembler.daemon.standard.WindowsScriptDaemonGenerator.generate (WindowsScriptDaemonGenerator.java:48)
    at org.codehaus.mojo.appassembler.daemon.DefaultDaemonGeneratorService.generateDaemon (DefaultDaemonGeneratorService.java:142)
    at org.codehaus.mojo.appassembler.AssembleMojo.execute (AssembleMojo.java:298)

If the paths are made absolute with ${project.basedir} then the plugin execution succeeds.

<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>appassembler-maven-plugin</artifactId>
  <configuration>
    <unixScriptTemplate>${project.basedir}/src/main/assembly/unixBinTemplate</unixScriptTemplate>
    <windowsScriptTemplate>${project.basedir}/src/main/assembly/windowsBinTemplate</windowsScriptTemplate>
    <!-- ... -->
</plugin>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions