Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unreachable statement #88

Closed
manusa opened this issue Mar 3, 2020 · 1 comment · Fixed by #126
Closed

Unreachable statement #88

manusa opened this issue Mar 3, 2020 · 1 comment · Fixed by #126
Assignees
Labels
bug Something isn't working
Projects

Comments

@manusa manusa added the bug Something isn't working label Mar 3, 2020
@manusa manusa added this to Planned in Sprint #181 Mar 11, 2020
@rohanKanojia
Copy link
Member

Umm, I replaced maven specific Artifact with a File class. If you see this in Docker Maven Plugin source:

https://github.com/fabric8io/docker-maven-plugin/blob/master/src/main/java/io/fabric8/maven/docker/assembly/DockerAssemblyManager.java#L494

    private File ensureThatArtifactFileIsSet(MavenProject project) {
        Artifact artifact = project.getArtifact();
        if (artifact == null) {
            return null;
        }
        File oldFile = artifact.getFile();
        if (oldFile != null) {
            return oldFile;
        }
        Build build = project.getBuild();
        if (build == null) {
            return null;
        }
        String finalName = build.getFinalName();
        String target = build.getDirectory();
        if (finalName == null || target == null) {
            return null;
        }
        File artifactFile = new File(target, finalName + "." + project.getPackaging());
        if (artifactFile.exists() && artifactFile.isFile()) {
            setArtifactFile(project, artifactFile);
        }
        return null;
    }

I think we should remove this artifact assignment and assign project.getArtifact() directly to oldFile

@rohanKanojia rohanKanojia self-assigned this Mar 27, 2020
@rohanKanojia rohanKanojia moved this from Planned to In Progress in Sprint #181 Mar 27, 2020
rohanKanojia referenced this issue in rohanKanojia/jkube Mar 27, 2020
manusa pushed a commit that referenced this issue Mar 27, 2020
@manusa manusa moved this from In Progress to Done in Sprint #181 Mar 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Sprint #181
  
Done
2 participants