question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error creating assembly archive docker: You must set at least one file. with mode dir

See original GitHub issue

Using the defaults when prompted:

mvn org.apache.maven.plugins:maven-archetype-plugin:2.2:generate -Dfilter=io.fabric8:spring-boot-camel-archetype -DgroupId=my.test -DartifactId=fabric8-test-project
cd fabric8-test-project
➜  fabric8-test-project mvn clean fabric8:resource fabric8:build fabric8:push fabric8:deploy -Ddocker.push.registry=fabric8-docker-registry.default.beast.fabric8.io
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Fabric8 :: Quickstarts :: Spring-Boot :: Camel 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ fabric8-test-project ---
[INFO] Deleting /Users/jamesrawlings/archs/fabric8-test-project/target
[INFO]
[INFO] --- fabric8-maven-plugin:3.1.17:resource (default-cli) @ fabric8-test-project ---
[INFO] F8> Running in Kubernetes mode
[INFO] F8> Running generator spring-boot
[INFO] F8> fmp-service: Adding a default Service with ports [8080]
[INFO] F8> fmp-controller: Adding a default Deployment
[WARNING] F8> No .git/config file could be found so cannot annotate kubernetes resources with git commit SHA and branch
[WARNING] F8> No .git/config file could be found so cannot annotate kubernetes resources with git commit SHA and branch
[INFO]
[INFO] >>> fabric8-maven-plugin:3.1.17:build (default-cli) > initialize @ fabric8-test-project >>>
[INFO]
[INFO] <<< fabric8-maven-plugin:3.1.17:build (default-cli) < initialize @ fabric8-test-project <<<
[INFO]
[INFO] --- fabric8-maven-plugin:3.1.17:build (default-cli) @ fabric8-test-project ---
[INFO] F8> Running in Kubernetes mode
[INFO] F8> Running generator spring-boot
[WARNING] Cannot include project artifact: my.test:fabric8-test-project:jar:1.0-SNAPSHOT; it doesn't have an associated file or directory.
[WARNING] The following patterns were never triggered in this artifact inclusion filter:
o  'my.test:fabric8-test-project'

[ERROR] F8> Failed to create assembly for docker image: Error creating assembly archive docker: You must set at least one file. with mode dir
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:21 (16 by maintainers)

github_iconTop GitHub Comments

2reactions
OndraZizkacommented, Jan 29, 2018

In short: The message is weird, but what it means is that the assembly plugin can’t find the dependency you set in <dependencySets>.

<dependencySets>
    <dependencySet>
        <useProjectArtifact>false</useProjectArtifact>
        <includes>
            <include>com.mycompany:bpds-api</include>
        </includes>
        <outputDirectory>.</outputDirectory>
        <outputFileNameMapping>bpds-fabric8.jar</outputFileNameMapping>
    </dependencySet>
</dependencySets>

You need to add that to project’s dependencies. Check that it’s not test scope.

<dependencies>
    <dependency>
        <groupId>com.mycompany</groupId>
        <artifactId>bpds-api</artifactId>
        <version>${project.version}</version>
    </dependency>
</dependencies>
0reactions
rohanKanojiacommented, Aug 26, 2020

@emaayan : This project has been migrated to https://github.com/eclipse/jkube . Could you please file an issue there?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error creating assembly archive bin: You must set at least one ...
In my case the name of the directory that I was referencing with variables ($) was not correct,the directories were called differently and ......
Read more >
You must set at least one file. with mode dir - Bountysource
Error creating assembly archive docker : You must set at least one file. with mode dir.
Read more >
Re: Assembly plugin: You must set at least one file.
This email appears to be a reply to another email, as it contains an in-reply-to reference. If you wish to attempt finding the...
Read more >
fabric8io/docker-maven-plugin
... Failed to create assembly for docker image (with mode 'dir'): Error creating assembly archive docker: You must set at least one file....
Read more >
Maven Assembly Plugin: You must set at least one file.
If you got an error message like this, check if your directory really exists.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found