Skip to content

Commit 8e32ec4

Browse files
committed
Qute MCP server
Signed-off-by: azerr <azerr@redhat.com>
1 parent 25107ee commit 8e32ec4

33 files changed

Lines changed: 4026 additions & 105 deletions

Jenkinsfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ pipeline {
1515
sh '''
1616
export JAVA_HOME="${NATIVE_TOOLS}${SEP}openjdk17_last"
1717
MVN="${COMMON_TOOLS}${SEP}maven3-latest/bin/mvn -V -Dmaven.repo.local=${WORKSPACE}/.repository/ -B -ntp"
18+
${MVN} -f ${WORKSPACE}/lsp4j-mcp/pom.xml versions:set -DnewVersion=$VERSION -DnewVersion=${VERSION}
1819
${MVN} -f ${WORKSPACE}/quarkus.jdt.ext/pom.xml org.eclipse.tycho:tycho-versions-plugin:1.7.0:set-version -DnewVersion=${VERSION} -Dtycho.mode=maven
1920
${MVN} -f ${WORKSPACE}/quarkus.ls.ext/com.redhat.quarkus.ls/pom.xml versions:set -DnewVersion=$VERSION -DnewVersion=${VERSION} -Dtycho.mode=maven
2021
${MVN} -f ${WORKSPACE}/qute.jdt/pom.xml org.eclipse.tycho:tycho-versions-plugin:1.7.0:set-version -DnewVersion=${VERSION} -Dtycho.mode=maven
@@ -31,6 +32,20 @@ pipeline {
3132
export JAVA_HOME="${NATIVE_TOOLS}${SEP}jdk11_last"
3233
MVN="${COMMON_TOOLS}${SEP}maven3-latest/bin/mvn -V -Dmaven.repo.local=${WORKSPACE}/.repository/"
3334
35+
pom=${WORKSPACE}/lsp4j-mcp/pom.xml
36+
37+
pomVersion=$(grep "<version>" ${pom} | head -1 | sed -e "s#.*<version>\\(.\\+\\)</version>.*#\\1#")
38+
if [[ ${pomVersion} == *"-SNAPSHOT" ]]; then
39+
${MVN} clean deploy ${mvnFlags} -f ${pom}
40+
else
41+
${MVN} clean deploy ${mvnFlags} -DskipRemoteStaging=true -f ${pom} \
42+
-DstagingDescription="[${JOB_NAME} ${BUILD_TIMESTAMP} ${BUILD_NUMBER}] :: ${pomVersion} :: deploy to local"
43+
${MVN} nexus-staging:deploy-staged ${mvnFlags} -f ${pom} \
44+
-DstagingDescription="[${JOB_NAME} ${BUILD_TIMESTAMP} ${BUILD_NUMBER}] :: ${pomVersion} :: deploy to stage + close"
45+
${MVN} nexus-staging:release ${mvnFlags} -f ${pom} \
46+
-DstagingDescription="[${JOB_NAME} ${BUILD_TIMESTAMP} ${BUILD_NUMBER}] :: ${pomVersion} :: release"
47+
fi
48+
3449
pom=${WORKSPACE}/quarkus.ls.ext/com.redhat.quarkus.ls/pom.xml
3550
3651
pomVersion=$(grep "<version>" ${pom} | head -1 | sed -e "s#.*<version>\\(.\\+\\)</version>.*#\\1#")

buildAll.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
cd lsp4j-mcp && .\mvnw.cmd clean install && cd .. ^
12
cd quarkus.jdt.ext && .\mvnw.cmd clean verify && cd .. ^
23
cd quarkus.ls.ext\com.redhat.quarkus.ls && .\mvnw.cmd clean verify && cd .. ^
34
cd qute.jdt && .\mvnw.cmd clean verify && cd .. ^

buildAll.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
cd lsp4j-mcp && ./mvnw clean verify && cd ..
12
cd quarkus.jdt.ext && ./mvnw clean verify && cd ..
23
cd quarkus.ls.ext/com.redhat.quarkus.ls && ./mvnw clean verify && cd ../..
34
cd qute.jdt && ./mvnw clean verify && cd ..
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
import java.io.IOException;
21+
import java.io.InputStream;
22+
import java.net.Authenticator;
23+
import java.net.PasswordAuthentication;
24+
import java.net.URL;
25+
import java.nio.file.Files;
26+
import java.nio.file.Path;
27+
import java.nio.file.Paths;
28+
import java.nio.file.StandardCopyOption;
29+
30+
public final class MavenWrapperDownloader
31+
{
32+
private static final String WRAPPER_VERSION = "3.2.0";
33+
34+
private static final boolean VERBOSE = Boolean.parseBoolean( System.getenv( "MVNW_VERBOSE" ) );
35+
36+
public static void main( String[] args )
37+
{
38+
log( "Apache Maven Wrapper Downloader " + WRAPPER_VERSION );
39+
40+
if ( args.length != 2 )
41+
{
42+
System.err.println( " - ERROR wrapperUrl or wrapperJarPath parameter missing" );
43+
System.exit( 1 );
44+
}
45+
46+
try
47+
{
48+
log( " - Downloader started" );
49+
final URL wrapperUrl = new URL( args[0] );
50+
final String jarPath = args[1].replace( "..", "" ); // Sanitize path
51+
final Path wrapperJarPath = Paths.get( jarPath ).toAbsolutePath().normalize();
52+
downloadFileFromURL( wrapperUrl, wrapperJarPath );
53+
log( "Done" );
54+
}
55+
catch ( IOException e )
56+
{
57+
System.err.println( "- Error downloading: " + e.getMessage() );
58+
if ( VERBOSE )
59+
{
60+
e.printStackTrace();
61+
}
62+
System.exit( 1 );
63+
}
64+
}
65+
66+
private static void downloadFileFromURL( URL wrapperUrl, Path wrapperJarPath )
67+
throws IOException
68+
{
69+
log( " - Downloading to: " + wrapperJarPath );
70+
if ( System.getenv( "MVNW_USERNAME" ) != null && System.getenv( "MVNW_PASSWORD" ) != null )
71+
{
72+
final String username = System.getenv( "MVNW_USERNAME" );
73+
final char[] password = System.getenv( "MVNW_PASSWORD" ).toCharArray();
74+
Authenticator.setDefault( new Authenticator()
75+
{
76+
@Override
77+
protected PasswordAuthentication getPasswordAuthentication()
78+
{
79+
return new PasswordAuthentication( username, password );
80+
}
81+
} );
82+
}
83+
try ( InputStream inStream = wrapperUrl.openStream() )
84+
{
85+
Files.copy( inStream, wrapperJarPath, StandardCopyOption.REPLACE_EXISTING );
86+
}
87+
log( " - Downloader complete" );
88+
}
89+
90+
private static void log( String msg )
91+
{
92+
if ( VERBOSE )
93+
{
94+
System.out.println( msg );
95+
}
96+
}
97+
98+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.4/apache-maven-3.9.4-bin.zip
18+
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar

0 commit comments

Comments
 (0)