|
15 | 15 |
|
16 | 16 | <properties> |
17 | 17 | <sidecar.dir>../mtx/sidecar</sidecar.dir> |
| 18 | + <cds.node.executable>node</cds.node.executable> |
18 | 19 | </properties> |
19 | 20 |
|
20 | 21 | <dependencies> |
|
82 | 83 | <artifactId>cds-maven-plugin</artifactId> |
83 | 84 | <version>${cds.services.version}</version> |
84 | 85 | <executions> |
85 | | - <!-- Following steps start and stop MTX sidecar for tests executed by failsafe plugin --> |
86 | 86 | <execution> |
87 | | - <id>install-sidecar</id> |
| 87 | + <id>cds.install-node</id> |
88 | 88 | <goals> |
89 | | - <goal>npm</goal> |
| 89 | + <goal>install-node</goal> |
90 | 90 | </goals> |
91 | | - <phase>pre-integration-test</phase> |
92 | 91 | <configuration> |
93 | | - <arguments>install --no-save</arguments> |
94 | | - <skip>${skipTests}</skip> |
95 | | - <workingDirectory>${sidecar.dir}</workingDirectory> |
| 92 | + <skip>${cdsdk-global}</skip> |
96 | 93 | </configuration> |
97 | 94 | </execution> |
98 | 95 |
|
99 | 96 | <execution> |
100 | | - <id>start-sidecar</id> |
| 97 | + <id>install-sidecar</id> |
101 | 98 | <goals> |
102 | | - <goal>npx</goal> |
| 99 | + <goal>npm</goal> |
103 | 100 | </goals> |
104 | 101 | <phase>pre-integration-test</phase> |
105 | 102 | <configuration> |
106 | | - <arguments>pm2 -l sidecar.log --time start --name=sidecar npm -- run start</arguments> |
| 103 | + <arguments>install --no-save</arguments> |
107 | 104 | <skip>${skipTests}</skip> |
108 | 105 | <workingDirectory>${sidecar.dir}</workingDirectory> |
109 | 106 | </configuration> |
110 | 107 | </execution> |
| 108 | + </executions> |
| 109 | + </plugin> |
111 | 110 |
|
| 111 | + <plugin> |
| 112 | + <groupId>org.codehaus.mojo</groupId> |
| 113 | + <artifactId>exec-maven-plugin</artifactId> |
| 114 | + <version>3.2.0</version> |
| 115 | + <executions> |
112 | 116 | <execution> |
113 | | - <id>stop-sidecar</id> |
| 117 | + <phase>pre-integration-test</phase> |
| 118 | + <id>start-sidecar</id> |
114 | 119 | <goals> |
115 | | - <goal>npx</goal> |
| 120 | + <goal>exec</goal> |
116 | 121 | </goals> |
117 | | - <phase>post-integration-test</phase> |
118 | | - <configuration> |
119 | | - <arguments>pm2 delete sidecar</arguments> |
120 | | - <skip>${skipTests}</skip> |
121 | | - <workingDirectory>${sidecar.dir}</workingDirectory> |
122 | | - </configuration> |
123 | 122 | </execution> |
124 | 123 | </executions> |
| 124 | + <configuration> |
| 125 | + <executable>${cds.node.executable}</executable> |
| 126 | + <skip>${skipTests}</skip> |
| 127 | + <workingDirectory>${sidecar.dir}</workingDirectory> |
| 128 | + <async>true</async> |
| 129 | + <useMavenLogger>true</useMavenLogger> |
| 130 | + <commandlineArgs>node_modules/@sap/cds/bin/cds-serve.js</commandlineArgs> |
| 131 | + </configuration> |
125 | 132 | </plugin> |
126 | 133 | </plugins> |
127 | 134 | </build> |
|
0 commit comments