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

Npx goal adds --registry as an argument of the executable command #1005

Closed
rsynek opened this issue Oct 19, 2021 · 5 comments
Closed

Npx goal adds --registry as an argument of the executable command #1005

rsynek opened this issue Oct 19, 2021 · 5 comments

Comments

@rsynek
Copy link
Contributor

rsynek commented Oct 19, 2021

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
The plugin adds --registry as an argument of the command npx is supposed to execute. The build fails as the command does not recognize the --registry option.

If the current behavior is a bug, please provide the steps to reproduce.

  1. configure an execution with npx, e.g.:
<execution>
            <id>run antora</id>
            <goals>
              <goal>npx</goal>
            </goals>
            <phase>generate-resources</phase>
            <configuration>
              <arguments>antora</arguments>
            </configuration>
</execution>
  1. run mvn generate-resources -DnpmRegistryURL=https://some.repository.org
  2. the build fails due to error: unknown option '--registry=https://some.repository.org' as antora does not recognize the --registry option.

What is the expected behavior?
The plugin should prepend the npx arguments before the command, see https://docs.npmjs.com/cli/v7/commands/npx#npx-vs-npm-exec. However, the --registry option does not seem to be supported by npx anyway.

Please mention your frontend-maven-plugin and operating system version.
1.12.0
Ubuntu 20.04.3 LTS

@Daolot
Copy link

Daolot commented Oct 25, 2021

Faced a similar problem while working with yarn run

@Daolot
Copy link

Daolot commented Oct 25, 2021

@rsynek Looks like there is WA:

  1. pom file:
    <configuration> <arguments>build:prod</arguments> </configuration>

  2. package.json file:
    "scripts": { "build:prod": "{ng build --configuration production}" },

magic in {ng build --configuration production} instead ng build --configuration production

@rsynek
Copy link
Contributor Author

rsynek commented Nov 25, 2021

Bugfix is coming in this PR: #1013

@rsynek
Copy link
Contributor Author

rsynek commented Dec 3, 2021

#1013 merged; closing this issue.

@rsynek rsynek closed this as completed Dec 3, 2021
Christopher-Chianelli added a commit to Christopher-Chianelli/optaplanner-website that referenced this issue Apr 6, 2022
Need to upgrade Node version since Javascript introduced
new syntax the old version could not recognized. Because
eirslett/frontend-maven-plugin#1005
was resolved, I was able to remove the exec plugin and replace
it with a npx execution in the frontend-maven-plugin. Changed
the ui-bundle to the Antora 3 ui-bundle. Updated supplemental-ui
to match new expected layout.
Christopher-Chianelli added a commit to Christopher-Chianelli/optaplanner-website that referenced this issue Apr 6, 2022
Need to upgrade Node version since Javascript introduced
new syntax the old version could not recognized. Because
eirslett/frontend-maven-plugin#1005
was resolved, I was able to remove the exec plugin and replace
it with a npx execution in the frontend-maven-plugin. Changed
the ui-bundle to the Antora 3 ui-bundle. Updated supplemental-ui
to match new expected layout.

Because Lunr extension is officially supported by Antora, its license
is changed from MIT to MPL-2.0 (which matches the license the
supplemental-ui and the ui-bundle zip are under).
rsynek pushed a commit to kiegroup/optaplanner-website that referenced this issue Apr 6, 2022
Need to upgrade Node version since Javascript introduced
new syntax the old version could not recognized. Because
eirslett/frontend-maven-plugin#1005
was resolved, I was able to remove the exec plugin and replace
it with a npx execution in the frontend-maven-plugin. Changed
the ui-bundle to the Antora 3 ui-bundle. Updated supplemental-ui
to match new expected layout.

Because Lunr extension is officially supported by Antora, its license
is changed from MIT to MPL-2.0 (which matches the license the
supplemental-ui and the ui-bundle zip are under).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants