Skip to content

Commit

Permalink
Set NPM custom registry URL using npm config (#8)
Browse files Browse the repository at this point in the history
* Set NPM_REGISTRY_URL using npm config

* Skip NPM config registry if no custom registry was set
  • Loading branch information
paulovmr committed May 3, 2024
1 parent dcbf756 commit 443392f
Showing 1 changed file with 33 additions and 3 deletions.
36 changes: 33 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,23 @@
<pnpmVersion>${version.pnpm}</pnpmVersion>
</configuration>
</execution>
<execution>
<id>npm config set registry</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<skip>${skipNpmConfigRegistry}</skip>
<arguments>config set registry ${env.NPM_REGISTRY_URL}</arguments>
</configuration>
</execution>
<execution>
<id>npm install lock-treatment-tool</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<skip>${skip.ui.deps}</skip>
<npmRegistryURL>${env.NPM_REGISTRY_URL}</npmRegistryURL>
<arguments>install @kie/[email protected] -w</arguments>
</configuration>
</execution>
Expand All @@ -170,7 +179,6 @@
</goals>
<configuration>
<skip>${skip.ui.deps}</skip>
<npmRegistryURL>${env.NPM_REGISTRY_URL}</npmRegistryURL>
<arguments>run env -- locktt --skipIntegrity</arguments>
</configuration>
</execution>
Expand All @@ -181,7 +189,6 @@
</goals>
<configuration>
<skip>${skip.ui.deps}</skip>
<npmRegistryURL>${env.PNPM_REGISTRY_URL}</npmRegistryURL>
<arguments>bootstrap</arguments>
</configuration>
</execution>
Expand Down Expand Up @@ -255,4 +262,27 @@
<module>packages</module>
</modules>

<profiles>
<profile>
<id>default</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<skipNpmConfigRegistry>true</skipNpmConfigRegistry>
</properties>
</profile>
<profile>
<id>doNotSkipNpmConfigRegistry</id>
<activation>
<property>
<name>env.NPM_REGISTRY_URL</name>
</property>
</activation>
<properties>
<skipNpmConfigRegistry>false</skipNpmConfigRegistry>
</properties>
</profile>
</profiles>

</project>

0 comments on commit 443392f

Please sign in to comment.