首页 > 解决方案 > 在 POM 文件中使用外部工件

问题描述

我有一个 Springboot 应用程序,我也使用 pom.xml 来构建我的前端,为此我使用插件 frontend-maven-plugin,我在我的内部 jfrog 工件上发布了一个私有依赖项。一旦我使用 azure devops 管道,我该如何访问它。由于它是一个私人仓库,我在 package.json 的一个依赖项中收到错误 404

 <plugin>
        <groupId>com.github.eirslett</groupId>
        <artifactId>frontend-maven-plugin</artifactId>
        <version>1.5</version>

        <configuration>
          <nodeVersion>v10.15.0</nodeVersion>
          <npmVersion>6.4.1</npmVersion>
          <workingDirectory></workingDirectory>
        </configuration>

        <executions>
          <execution>
            <id>install node and npm</id>
            <goals>
              <goal>install-node-and-npm</goal>
            </goals>
          </execution>

          <execution>
            <id>npm install</id>
            <goals>
              <goal>npm</goal>
            </goals>

            <configuration>
              <arguments>install --no-optional</arguments>
            </configuration>

          </execution>

          <execution>
            <id>npm run build</id>
            <goals>
              <goal>npm</goal>
            </goals>

            <configuration>
              <arguments>run ${angular.build}</arguments>
            </configuration>
          </execution>
        </executions>
      </plugin>

标签: javaangularspringmavenazure-devops

解决方案


推荐阅读