Skip to content

Commit

Permalink
Fixed #379 - Deprecated debug option
Browse files Browse the repository at this point in the history
  • Loading branch information
khmarbaise committed Oct 27, 2023
1 parent a45be0a commit 081a5b1
Show file tree
Hide file tree
Showing 8 changed files with 81 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
:issue-374: https://github.com/khmarbaise/maven-it-extension/issues/374[Fixed #374]
:issue-375: https://github.com/khmarbaise/maven-it-extension/issues/375[Fixed #375]
:issue-376: https://github.com/khmarbaise/maven-it-extension/issues/376[Fixed #376]
:issue-379: https://github.com/khmarbaise/maven-it-extension/issues/379[Fixed #379]
:issue-??: https://github.com/khmarbaise/maven-it-extension/issues/??[Fixed #??]

:release_0_13_0: https://github.com/khmarbaise/maven-it-extension/milestone/13
Expand All @@ -55,9 +56,14 @@
* {issue-326} - Failing IT's based on Maven 3.8.7
* {issue-329} - Upgrade to smpp 5.3.14


*Breaking Changes*

* {issue-277} - Remove Deprecated Code.
* {issue-277} - Remove Deprecated Code. Take a look into the release notes of Release 0.12.
* If you have used `@MavenDebug` annotation you have to replace that usage with `@MavenVerbose`. You will
get `deprecated warnings` during the compilation.
* {issue-379} - Deprecated `@MavenDebug`; Replace the usage with `@MavenVerbose`.
`@MavenDebug` will be removed with release 0.14.0.

*Reporter of this release*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
* under the License.
*/

import com.soebes.itf.jupiter.extension.MavenDebug;
import com.soebes.itf.jupiter.extension.MavenJupiterExtension;
import com.soebes.itf.jupiter.extension.MavenTest;
import com.soebes.itf.jupiter.extension.MavenVerbose;
import com.soebes.itf.jupiter.maven.MavenExecutionResult;
import com.soebes.itf.jupiter.maven.MavenLog;
import org.junit.jupiter.api.condition.EnabledOnOs;
Expand All @@ -38,7 +38,7 @@
* @author Karl Heinz Marbaise
*/
@MavenJupiterExtension
@MavenDebug
@MavenVerbose
class LogoutputIT {

@MavenTest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
* under the License.
*/

import com.soebes.itf.jupiter.extension.MavenDebug;
import com.soebes.itf.jupiter.extension.MavenGoal;
import com.soebes.itf.jupiter.extension.MavenJupiterExtension;
import com.soebes.itf.jupiter.extension.MavenRepository;
import com.soebes.itf.jupiter.extension.MavenTest;
import com.soebes.itf.jupiter.extension.MavenVerbose;
import com.soebes.itf.jupiter.maven.MavenExecutionResult;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.MethodOrderer.OrderAnnotation;
Expand Down Expand Up @@ -59,7 +59,7 @@ void setup_2(MavenExecutionResult result) {
}

@MavenTest
@MavenDebug
@MavenVerbose
@MavenGoal({"clean", "verify"})
@DisplayName("and the test case tries to check for resultion issue.")
void first_integration_test(MavenExecutionResult result) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
* under the License.
*/

import com.soebes.itf.jupiter.extension.MavenDebug;
import com.soebes.itf.jupiter.extension.MavenJupiterExtension;
import com.soebes.itf.jupiter.extension.MavenPredefinedRepository;
import com.soebes.itf.jupiter.extension.MavenTest;
import com.soebes.itf.jupiter.extension.MavenVerbose;
import com.soebes.itf.jupiter.maven.MavenExecutionResult;

import static com.soebes.itf.extension.assertj.MavenITAssertions.assertThat;
Expand All @@ -35,13 +35,13 @@
class ProjectIT {

@MavenTest
@MavenDebug
@MavenVerbose
void project_001(MavenExecutionResult result) {
assertThat(result).isSuccessful();
}

@MavenTest
@MavenDebug
@MavenVerbose
void project_002(MavenExecutionResult result) {
assertThat(result).isSuccessful();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
* under the License.
*/

import com.soebes.itf.jupiter.extension.MavenDebug;
import com.soebes.itf.jupiter.extension.MavenJupiterExtension;
import com.soebes.itf.jupiter.extension.MavenPredefinedRepository;
import com.soebes.itf.jupiter.extension.MavenTest;
import com.soebes.itf.jupiter.extension.MavenVerbose;
import com.soebes.itf.jupiter.maven.MavenExecutionResult;

import static com.soebes.itf.extension.assertj.MavenITAssertions.assertThat;
Expand All @@ -33,14 +33,14 @@
@MavenJupiterExtension
class ProjectSecondIT {

@MavenDebug
@MavenVerbose
@MavenTest
@MavenPredefinedRepository
void project_001(MavenExecutionResult result) {
assertThat(result).isSuccessful();
}

@MavenDebug
@MavenVerbose
@MavenTest
@MavenPredefinedRepository
void project_002(MavenExecutionResult result) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
* @see MavenCLIOptions#ALSO_MAKE_DEPENDENCIES
* @see MavenCLIOptions#ALSO_MAKE
* @see MavenCLIOptions#DEBUG
* @see MavenCLIOptions#VERBOSE
* @see MavenCLIOptions#NO_TRANSFER_PROGRESS
* @see MavenCLIOptions#SHOW_VERSION
* @see MavenCLIOptions#BATCH_MODE
Expand Down Expand Up @@ -193,9 +194,20 @@ public final class MavenCLIOptions {

/**
* {@code --debug}
*
* @apiNote use {@link #VERBOSE} instead.
* @deprecated Will be removed with 0.14.0
*/
@Deprecated
public static final String DEBUG = "--debug";

/**
* {@code --verbose}
*
* @since 0.13.0
*/
public static final String VERBOSE = "--verbose";

/**
* {@code --no-transfer-progress}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,13 @@
* @since 0.9.0
* @see MavenOption
* @author Karl Heinz Marbaise
* @deprecated Will be removed with Release 0.14.0. Use {@link MavenVerbose} instead.
*/
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RUNTIME)
@Inherited
@MavenOption(value = MavenCLIOptions.DEBUG)
@API(status = EXPERIMENTAL, since = "0.9.0")
@Deprecated
public @interface MavenDebug {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
package com.soebes.itf.jupiter.extension;

/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

import org.apiguardian.api.API;

import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.RetentionPolicy.RUNTIME;
import static org.apiguardian.api.API.Status.EXPERIMENTAL;

/**
* {@code @MavenVerbose} is a meta annotation for convenience purposes
* to make it easier to activate verbose option for a Maven build
* just by simply adding {@code @MavenVerbose}.
*
* <p>When applied at the class level, all test methods within that class
* are automatically inheriting the given goal.</p>
*
* @since 0.13.0
* @see MavenOption
* @author Karl Heinz Marbaise
*/
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RUNTIME)
@Inherited
@MavenOption(value = MavenCLIOptions.VERBOSE)
@API(status = EXPERIMENTAL, since = "0.13.0")
public @interface MavenVerbose {
}

0 comments on commit 081a5b1

Please sign in to comment.