diff --git a/.github/workflows/analyses.yml b/.github/workflows/analyses.yml new file mode 100644 index 000000000..437792a4c --- /dev/null +++ b/.github/workflows/analyses.yml @@ -0,0 +1,52 @@ +# +# Copyright (c) 2024 Contributors to the Eclipse Foundation +# +# This program and the accompanying materials are made available under the +# terms of the Eclipse Public License v. 2.0 which is available at +# http://www.eclipse.org/legal/epl-2.0, +# or the Eclipse Distribution License v. 1.0 which is available at +# http://www.eclipse.org/org/documents/edl-v10.php. +# +# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause +# + +name: Eclipse OpenMQ CI Checks + +on: + pull_request: + +jobs: + checks: + name: Checks on JDK ${{ matrix.java_version }} (${{ matrix.tool }}) + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + java_version: [ 21 ] + tool: + - javac+error-prone + + steps: + - name: Checkout for build + uses: actions/checkout@v4 + - name: Set up JDK + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: ${{ matrix.java_version }} + - name: Prepare for error-prone + if: ${{ matrix.tool == 'javac+error-prone' }} + run: cp -v .mvn/jvm.config.error-prone .mvn/jvm.config + - name: Test Maven Build + run: | + ./mvnw \ + --show-version \ + --no-transfer-progress \ + --activate-profiles staging \ + --activate-profiles ${{ matrix.tool }} \ + --file mq/main \ + verify \ + --projects -packager-opensource \ + --define skipTests=true + diff --git a/.mvn/.gitignore b/.mvn/.gitignore new file mode 100644 index 000000000..43214c599 --- /dev/null +++ b/.mvn/.gitignore @@ -0,0 +1,2 @@ +jvm.config + diff --git a/.mvn/jvm.config.error-prone b/.mvn/jvm.config.error-prone new file mode 100644 index 000000000..32599cefe --- /dev/null +++ b/.mvn/jvm.config.error-prone @@ -0,0 +1,10 @@ +--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED +--add-opens jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED +--add-opens jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED diff --git a/mq/main/pom.xml b/mq/main/pom.xml index 6e65eef16..2f4567dff 100644 --- a/mq/main/pom.xml +++ b/mq/main/pom.xml @@ -92,6 +92,7 @@ 4.8.4.0 10.15.0 3.3.1 + 2.27.0 @@ -374,6 +375,12 @@ fscontext 4.6-b01 + + + com.google.errorprone + error_prone_core + ${error-prone.version} + @@ -938,6 +945,204 @@ + + javac+error-prone + + + + org.apache.maven.plugins + maven-compiler-plugin + + false + true + true + + -XDcompilePolicy=simple + + -Xplugin:ErrorProne \ + -XepAllDisabledChecksAsWarnings \ + -Xep:AddressSelection:OFF \ + -Xep:AlmostJavadoc:OFF \ + -Xep:AlreadyChecked:OFF \ + -Xep:AndroidJdkLibsChecker:OFF \ + -Xep:AssertFalse:OFF \ + -Xep:AvoidObjectArrays:OFF \ + -Xep:BanClassLoader:OFF \ + -Xep:BanJNDI:OFF \ + -Xep:BanSerializableRead:OFF \ + -Xep:BooleanParameter:OFF \ + -Xep:BoxedPrimitiveEquality:OFF \ + -Xep:ByteBufferBackingArray:OFF \ + -Xep:CanIgnoreReturnValueSuggester:OFF \ + -Xep:CatchAndPrintStackTrace:OFF \ + -Xep:CatchingUnchecked:OFF \ + -Xep:CheckedExceptionNotThrown:OFF \ + -Xep:ClassCanBeStatic:OFF \ + -Xep:ComplexBooleanConstant:OFF \ + -Xep:ConstantField:OFF \ + -Xep:DeduplicateConstants:OFF \ + -Xep:DefaultCharset:OFF \ + -Xep:DifferentNameButSame:OFF \ + -Xep:DoubleCheckedLocking:OFF \ + -Xep:EmptyBlockTag:OFF \ + -Xep:EmptyCatch:OFF \ + -Xep:EqualsBrokenForNull:OFF \ + -Xep:EqualsGetClass:OFF \ + -Xep:EqualsHashCode:OFF \ + -Xep:EqualsUnsafeCast:OFF \ + -Xep:EnumOrdinal:OFF \ + -Xep:ErroneousBitwiseExpression:OFF \ + -Xep:FallThrough:OFF \ + -Xep:FieldCanBeFinal:OFF \ + -Xep:FieldCanBeLocal:OFF \ + -Xep:FieldCanBeStatic:OFF \ + -Xep:FieldMissingNullable:OFF \ + -Xep:Finally:OFF \ + -Xep:ForEachIterable:OFF \ + -Xep:FunctionalInterfaceClash:OFF \ + -Xep:FutureReturnValueIgnored:OFF \ + -Xep:HidingField:OFF \ + -Xep:ImmutableEnumChecker:OFF \ + -Xep:ImmutableMemberCollection:OFF \ + -Xep:InconsistentCapitalization:OFF \ + -Xep:InconsistentOverloads:OFF \ + -Xep:InitializeInline:OFF \ + -Xep:InlineTrivialConstant:OFF \ + -Xep:InsecureCryptoUsage:OFF \ + -Xep:InterfaceWithOnlyStatics:OFF \ + -Xep:InterruptedExceptionSwallowed:OFF \ + -Xep:Interruption:OFF \ + -Xep:IntLongMath:OFF \ + -Xep:InvalidBlockTag:OFF \ + -Xep:InvalidInlineTag:OFF \ + -Xep:Java7ApiChecker:OFF \ + -Xep:Java8ApiChecker:OFF \ + -Xep:JavaLangClash:OFF \ + -Xep:JavaUtilDate:OFF \ + -Xep:JdkObsolete:OFF \ + -Xep:LockNotBeforeTry:OFF \ + -Xep:LockOnNonEnclosingClassLiteral:OFF \ + -Xep:LongLiteralLowerCaseSuffix:OFF \ + -Xep:MemberName:OFF \ + -Xep:MethodCanBeStatic:OFF \ + -Xep:MissingCasesInEnumSwitch:OFF \ + -Xep:MissingDefault:OFF \ + -Xep:MissingSummary:OFF \ + -Xep:MixedArrayDimensions:OFF \ + -Xep:MultiVariableDeclaration:OFF \ + -Xep:MutablePublicArray:OFF \ + -Xep:NamedLikeContextualKeyword:OFF \ + -Xep:NarrowCalculation:OFF \ + -Xep:NarrowingCompoundAssignment:OFF \ + -Xep:NonApiType:OFF \ + -Xep:NonFinalStaticField:OFF \ + -Xep:NonOverridingEquals:OFF \ + -Xep:NotJavadoc:OFF \ + -Xep:OperatorPrecedence:OFF \ + -Xep:OrphanedFormatString:OFF \ + -Xep:OverrideThrowableToString:OFF \ + -Xep:ParameterComment:OFF \ + -Xep:ParameterMissingNullable:OFF \ + -Xep:PreferredInterfaceType:OFF \ + -Xep:PreferJavaTimeOverload:OFF \ + -Xep:PrimitiveArrayPassedToVarargsMethod:OFF \ + -Xep:PrivateConstructorForUtilityClass:OFF \ + -Xep:RedundantOverride:OFF \ + -Xep:RedundantThrows:OFF \ + -Xep:ReferenceEquality:OFF \ + -Xep:ReturnAtTheEndOfVoidFunction:OFF \ + -Xep:ReturnMissingNullable:OFF \ + -Xep:ReturnsNullCollection:OFF \ + -Xep:ReturnValueIgnored:OFF \ + -Xep:ShortCircuitBoolean:OFF \ + -Xep:StaticAssignmentInConstructor:OFF \ + -Xep:StaticAssignmentOfThrowable:OFF \ + -Xep:StaticGuardedByInstance:OFF \ + -Xep:StaticQualifiedUsingExpression:OFF \ + -Xep:StringCaseLocaleUsage:OFF \ + -Xep:StringCharset:OFF \ + -Xep:StringSplitter:OFF \ + -Xep:SuperEqualsIsObjectEquals:OFF \ + -Xep:SuppressWarningsWithoutExplanation:OFF \ + -Xep:SwitchDefault:OFF \ + -Xep:SynchronizeOnNonFinalField:OFF \ + -Xep:SystemConsoleNull:OFF \ + -Xep:SystemExitOutsideMain:OFF \ + -Xep:SystemOut:OFF \ + -Xep:ThreadLocalUsage:OFF \ + -Xep:ThreadPriorityCheck:OFF \ + -Xep:ThrowSpecificExceptions:OFF \ + -Xep:ThrowsUncheckedException:OFF \ + -Xep:TooManyParameters:OFF \ + -Xep:TransientMisuse:OFF \ + -Xep:TypeNameShadowing:OFF \ + -Xep:TypeParameterNaming:OFF \ + -Xep:UnescapedEntity:OFF \ + -Xep:UngroupedOverloads:OFF \ + -Xep:UnnecessarilyFullyQualified:OFF \ + -Xep:UnnecessaryBoxedAssignment:OFF \ + -Xep:UnnecessaryBoxedVariable:OFF \ + -Xep:UnnecessaryDefaultInEnumSwitch:OFF \ + -Xep:UnnecessaryFinal:OFF \ + -Xep:UnnecessaryLongToIntConversion:OFF \ + -Xep:UnnecessaryParentheses:OFF \ + -Xep:UnnecessaryStringBuilder:OFF \ + -Xep:UnsafeLocaleUsage:OFF \ + -Xep:UnsafeReflectiveConstructionCast:OFF \ + -Xep:UnsynchronizedOverridesSynchronized:OFF \ + -Xep:UnusedException:OFF \ + -Xep:UnusedVariable:OFF \ + -Xep:UseCorrectAssertInTests:OFF \ + -Xep:UseEnumSwitch:OFF \ + -Xep:Varifier:OFF \ + -Xep:Var:OFF \ + -Xep:WaitNotInLoop:OFF \ + -Xep:WildcardImport:OFF \ + -Xep:YodaCondition:OFF \ + + + + + com.google.errorprone + error_prone_core + ${error-prone.version} + + + org.projectlombok + lombok + ${lombok.version} + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + + + enforce-files-exist + + enforce + + + + + + ${maven.multiModuleProjectDirectory}/.mvn/jvm.config + + +Setup for error-prone needs jvm.config with proper exports/opens. +Existing jvm.config.error-prone can be copied to jvm.config. + + + + + + + + + + add-test-dependencies:junit-jupiter-api