@@ -78,7 +78,7 @@ function getMavenCommandForWindows(
78
78
accessKey : string ,
79
79
appPath ?: string ,
80
80
) : string {
81
- let command = (
81
+ let command =
82
82
`mvn archetype:generate -B ` +
83
83
`-DarchetypeGroupId="${ MAVEN_ARCHETYPE_GROUP_ID } " ` +
84
84
`-DarchetypeArtifactId="${ mavenFramework } " ` +
@@ -87,8 +87,7 @@ function getMavenCommandForWindows(
87
87
`-DartifactId="${ mavenFramework } " ` +
88
88
`-Dversion="${ version } " ` +
89
89
`-DBROWSERSTACK_USERNAME="${ username } " ` +
90
- `-DBROWSERSTACK_ACCESS_KEY="${ accessKey } "`
91
- ) ;
90
+ `-DBROWSERSTACK_ACCESS_KEY="${ accessKey } "` ;
92
91
93
92
// Add framework parameter for browserstack-sdk-archetype-integrate
94
93
if ( mavenFramework === "browserstack-sdk-archetype-integrate" ) {
@@ -111,7 +110,7 @@ function getMavenCommandForUnix(
111
110
accessKey : string ,
112
111
appPath ?: string ,
113
112
) : string {
114
- let command = (
113
+ let command =
115
114
`mvn archetype:generate -B ` +
116
115
`-DarchetypeGroupId="${ MAVEN_ARCHETYPE_GROUP_ID } " ` +
117
116
`-DarchetypeArtifactId="${ mavenFramework } " ` +
@@ -120,8 +119,7 @@ function getMavenCommandForUnix(
120
119
`-DartifactId="${ mavenFramework } " ` +
121
120
`-Dversion="${ version } " ` +
122
121
`-DBROWSERSTACK_USERNAME="${ username } " ` +
123
- `-DBROWSERSTACK_ACCESS_KEY="${ accessKey } "`
124
- ) ;
122
+ `-DBROWSERSTACK_ACCESS_KEY="${ accessKey } "` ;
125
123
126
124
// Add framework parameter for browserstack-sdk-archetype-integrate
127
125
if ( mavenFramework === "browserstack-sdk-archetype-integrate" ) {
@@ -179,13 +177,21 @@ export function getJavaSDKCommand(
179
177
const mavenStep = createStep (
180
178
"Install BrowserStack SDK using Maven Archetype for App Automate" ,
181
179
`Maven command for ${ framework } (${ getPlatformLabel ( ) } ):
182
- \`\`\`bash
183
- ${ mavenCommand }
184
- \`\`\`
180
+ \`\`\`bash
181
+ ${ mavenCommand }
182
+ \`\`\`
183
+
184
+ Alternative setup for Gradle users:
185
+ ${ GRADLE_APP_SETUP_INSTRUCTIONS } ` ,
186
+ ) ;
185
187
186
- Alternative setup for Gradle users:
187
- ${ GRADLE_APP_SETUP_INSTRUCTIONS } `,
188
+ const argsLineStep = createStep (
189
+ "Verifying dependency and argsLine" ,
190
+ `Verify browserstack-java-sdk with LATEST is added as dependency and add this line in pom.xml if not added:
191
+ \`\`\`xml
192
+ <argLine>-javaagent:"\${com.browserstack:browserstack-java-sdk:jar}"</argLine>
193
+ \`\`\`` ,
188
194
) ;
189
195
190
- return combineInstructions ( envStep , mavenStep ) ;
196
+ return combineInstructions ( envStep , mavenStep , argsLineStep ) ;
191
197
}
0 commit comments