Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

Jib: Jib build is not packing files from assembly descriptor #1765

Closed
yadavnikhil opened this issue Nov 27, 2019 · 2 comments
Closed

Jib: Jib build is not packing files from assembly descriptor #1765

yadavnikhil opened this issue Nov 27, 2019 · 2 comments
Assignees
Labels
status/never-stale Pin this issue to get never marked as stale by stale-bot

Comments

@yadavnikhil
Copy link

yadavnikhil commented Nov 27, 2019

Description

When running jib build, i've a assembly descriptor in pom.xml which adds additional dependencies needed for my application to run, but Jib build only copies built jar from target dir to basedir & ignores any additional files that is created by assembly. The same works fine without jib in docker build.
Ex.

<image>
    <name>myregistry:5000/imageName:1.0.0</name>
    <build>
        <from>jdk</from>
        <assembly>
            <mode>dir</mode>
            <basedir>/opt/application</basedir>
            <inline>
                <id>add-files</id>
                <fileSets>											
                    <fileSet>
                        <directory>${project.build.directory}/addJars</directory>
                        <includes>
                            <include>*.jar</include>
                        </includes>
                        <outputDirectory>lib</outputDirectory>
                    </fileSet>
                    <fileSet>
                        <directory>${project.build.directory}/conf</directory>
                        <includes>
                            <include>**.*</include>
                        </includes>
                        <outputDirectory>etc/conf</outputDirectory>
                    </fileSet>
                </fileSets>
            </inline>
        </assembly>								
    </build>
</image>

Above just packs my built fat jar to application dir, but files from addJar, conf.d are ignored.
May be we need the extraDirectories params support that core Jib supports which can add them appropriately to baseDir/outputDirectory path.

Info

  • f-m-p version :
  • Maven version (mvn -v) :
3.5.0
@yadavnikhil yadavnikhil changed the title Jib: Jib build is not packing file from assembly descriptor Jib: Jib build is not packing files from assembly descriptor Nov 27, 2019
@stale
Copy link

stale bot commented Feb 25, 2020

This issue has been automatically marked as stale because it has not had any activity since 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions!

@stale stale bot added the status/stale Issue/PR considered to be stale label Feb 25, 2020
@manusa manusa added the status/never-stale Pin this issue to get never marked as stale by stale-bot label Feb 26, 2020
@stale stale bot removed the status/stale Issue/PR considered to be stale label Feb 26, 2020
@devang-gaur
Copy link
Contributor

Closing since #1766 has been merged.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status/never-stale Pin this issue to get never marked as stale by stale-bot
Projects
None yet
Development

No branches or pull requests

3 participants