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

Missing files can be attached but never seem to be reused #111

Open
renflo opened this issue Oct 11, 2017 · 2 comments
Open

Missing files can be attached but never seem to be reused #111

renflo opened this issue Oct 11, 2017 · 2 comments

Comments

@renflo
Copy link

renflo commented Oct 11, 2017

I have a project set up like this:

  • my-mod-a depends on 3rd-party-mod-without-license
  • my-mod-b depends on my-mod-a

When my-mod-a is built the “missing file” i added gets attached; i can find the it in the maven repository.

But when i build my-mod-b it asks me once more to crate a “missing file” for the transtive dependency of my-mod-a which are already fixed and have an artefact deployed for in tge repo.

Can you explain in more details what i have to do for this installed missing file to be used? Can you also confirm that the functionality works.

@Captain-P-Goldfish
Copy link
Contributor

the problem is in AddThirdPartyMojo.java if no missing dependencies exist the missing file gets deleted.
If you set the missingFile to an absolute path and you execute a build on your project that consists of several modules and any module does not have any missing dependencies then the file gets deleted and is therefore not reused. The problematic code is this:

   `if ( !unsafe && isUseMissingFile() && MapUtils.isEmpty( getUnsafeMappings() ) && getMissingFile().exists() )
    {

        // there is no missing dependencies, but still a missing file, delete it
        getLog().info( "There is no dependency to put in missing file, delete it at " + getMissingFile() );
        FileUtil.deleteFile( getMissingFile() );
    }`

@ppalaga
Copy link
Contributor

ppalaga commented Feb 13, 2019

If this is supposed to be a bug, a fix and a reproducer in form of an integration test under https://github.com/mojohaus/license-maven-plugin/tree/master/src/it is welcome.

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

No branches or pull requests

3 participants