Skip to content

[MWRAPPER-70] Don't require a pom.xml #251

Description

@jira-importer

Falko Modler opened MWRAPPER-70 and commented

Occasionally, it would come in handy if you could run the wrapper goal without a pom.xml to prepare a folder from scratch.

3.1.1 fails with: "Goal requires a project to execute but there is no POM in this directory"


Affects: 3.1.1

Remote Links:

0 votes, 6 watchers

Activity

  1. jira-importer commented on Oct 4, 2022

    @jira-importer
    Author

    Slawomir Jaranowski commented

    Should be ok.

  2. jira-importer commented on Oct 7, 2022

    @jira-importer
    Author

    Amit Misra commented

    Please correct me if I am wrong the requirement of a pom.xml being present in the current working directory comes from the underlying mvn command.

    Having said that, I think this could be done in two steps -

    1. Find the pom.xml file to be used first. Search for parent folders for mvnw executable something similar to what gng and gw does - https://github.com/gdubw/gng) and then go ahead and execute the command with -f option, assuming the pom.xml is not named differently. In the latter case, the user anyways has to tell mvnw the file to use so we should be good.

    2. Use a temporary pom.xml file. In case the last step is not able to find a valid pom.xml file, create a temporary  pom.xml file in the current directory, execute the command and then clean up the temporary file.

    Open to other suggestions if this approach seems too naive or overly complicated.

  3. jira-importer commented on Oct 17, 2022

    @jira-importer
    Author

    Thorbjørn Ravn Andersen commented

    What is the use case?  What would this temporary pom enable doing?

  4. jira-importer commented on Dec 17, 2022

    @jira-importer
    Author

    Amit Misra commented

    Thorbjørn Ravn Andersen from what I understood from the original issue, mvnw command fails if you run inside a directory that does not have a pom.xml file with the following error message - {}Goal requires a project to execute but there is no POM in this directory{}.

    Having a temporary pom.xml (generated on the fly) could help in running the mvnw command

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions