Skip to content

Only target/test-classes are discovered in modular project when running tests from IntelliJ #321

Closed
@tgolden-andplus

Description

@tgolden-andplus

Looks like similar symptoms as spring-projects/spring-framework#21515 in that only the target/test-classes path is found when specifying a package that gets translated to a resource path.

Test looks like:

@AnalyzeClasses(packages = "com.mycompany.myapp")
public class ArchitectureConstraintsTest {

  @ArchTest
  public static final ArchRule controllersAnnotatedProperly = classes().that().haveSimpleNameEndingWith("Controller")
      .should().beAnnotatedWith(RestController.class);

  @ArchTest
  public static final ArchRule controllersAutowired = constructors().that().areDeclaredInClassesThat().haveSimpleNameEndingWith("Controller")
      .should().beAnnotatedWith(Autowired.class);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions