Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.7k views
in Technique[技术] by (71.8m points)

npm - How to set bower registry in the frontend-maven-plugin?

I can't find a way to set the bower registry in the "frontend-maven-plugin" plugin.

The "yarn install" can use "npmRegistryURL" to set the npm registry.

But "bower install" can't use "bowerRegistryURL" to set the bower registry.

Here is the plugin definition in the project pom.xml:

<!-- Install Node, Yarn, Bower & dependencies -->
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<configuration>
  <workingDirectory>${webappDir}</workingDirectory>
</configuration>
<executions>
  
  <execution>
    <phase>generate-resources</phase>
    <id>yarn install</id>
    <goals>
      <goal>yarn</goal>
    </goals>
    <configuration>
      <arguments>install</arguments>
      <npmRegistryURL>http://localhost:8080/repository/npm/</npmRegistryURL>
    </configuration>
  </execution>
  
  <execution>
    <phase>generate-resources</phase>
    <id>bower install</id>
    <configuration>
      <arguments>install ${allow-root-build}</arguments>
      <bowerRegistryURL>http://localhost:8080/repository/bower/</bowerRegistryURL>
    </configuration>
    <goals>
      <goal>bower</goal>
    </goals>
  </execution>

  <!-- Install all dependencies -->
  <execution>
    <phase>generate-resources</phase>
    <id>install node and yarn</id>
    <goals>
      <goal>install-node-and-yarn</goal>
    </goals>
    <configuration>
      <nodeVersion>${nodeVersion}</nodeVersion>
      <yarnVersion>v0.21.3</yarnVersion>
    </configuration>
  </execution>

</executions>
</plugin>

How to set registry for "Bower" in this plugin??

Thanks.

question from:https://stackoverflow.com/questions/65860402/how-to-set-bower-registry-in-the-frontend-maven-plugin

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...