Skip to content

Commit

Permalink
Use project local Node and NPM for build (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
breedloj authored Sep 20, 2024
1 parent e90dcfb commit 63bec73
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 47 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ packageInfo
**/node_modules/
**/.gradle/
**/.metadata/
**/node/
**.DS_Store**
89 changes: 42 additions & 47 deletions plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
<relativePath>../</relativePath>
</parent>

<groupId>software.aws.toolkits.eclipse</groupId>
<artifactId>amazon-q-eclipse</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>

<properties>
<tycho.version>4.0.8</tycho.version>
<aws.java.sdk.version>2.25.33</aws.java.sdk.version>
<node.version>v20.9.0</node.version>
<npm.version>10.1.0</npm.version>
</properties>

<repositories>
Expand Down Expand Up @@ -169,6 +169,23 @@
<goal>run</goal>
</goals>
</execution>
<execution>
<id>move-generated-files</id>
<phase>process-sources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<move todir="${project.build.directory}/generated-sources/">
<fileset dir="${project.build.directory}/generated-sources/sdk/">
<include name="**/*.*" />
</fileset>
</move>
<delete dir="${project.build.directory}/generated-sources/sdk/" />
</target>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
Expand Down Expand Up @@ -210,10 +227,8 @@
<phase>validate</phase>
<configuration>
<configLocation>checkstyle.xml</configLocation>
<encoding>UTF-8</encoding>
<consoleOutput>true</consoleOutput>
<failsOnError>true</failsOnError>
<linkXRef>false</linkXRef>
<includes>src/**/*.java</includes>
</configuration>
<goals>
Expand Down Expand Up @@ -262,37 +277,41 @@
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.4.0</version>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.15.0</version>
<configuration>
<workingDirectory>${project.basedir}/webview</workingDirectory>
<installDirectory>${project.basedir}/node</installDirectory>
</configuration>
<executions>
<execution>
<id>build-toolkit-ui</id>
<phase>generate-resources</phase>
<id>install-node-and-npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<configuration>
<nodeVersion>${node.version}</nodeVersion>
<npmVersion>${npm.version}</npmVersion>
</configuration>
</execution>
<execution>
<id>build login-ui</id>
<goals>
<goal>exec</goal>
<goal>npm</goal>
</goals>
<configuration>
<executable>npm</executable>
<arguments>
<argument>run</argument>
<argument>build-ui</argument>
</arguments>
<workingDirectory>${project.basedir}/webview</workingDirectory>
<arguments>run build-ui</arguments>
</configuration>
</execution>
<execution>
<id>install-auth-module</id>
<phase>generate-resources</phase>
<id>build auth-module</id>
<goals>
<goal>exec</goal>
<goal>npm</goal>
</goals>
<configuration>
<executable>npm</executable>
<arguments>
<argument>install</argument>
</arguments>
<workingDirectory>${project.basedir}/auth</workingDirectory>
<arguments>install</arguments>
</configuration>
</execution>
</executions>
Expand All @@ -316,30 +335,6 @@
<writeIntermediateModel>false</writeIntermediateModel>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>move-generated-files</id>
<phase>process-sources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<move todir="${project.build.directory}/generated-sources/">
<fileset dir="${project.build.directory}/generated-sources/sdk/">
<include name="**/*.*" />
</fileset>
</move>
<delete dir="${project.build.directory}/generated-sources/sdk/" />
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down

0 comments on commit 63bec73

Please sign in to comment.