-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Continuous testing can fail after mvn test
when run without clean
#23078
Comments
/cc @stuartwdouglas |
/cc @aloubyansky |
mvn test
when run without clean
mvn test
when run without clean
Haven't yet checked but this could be related to the classpath caching. |
Yes, that's sufficient! Btw, one could argue that there should be no difference in dependencies between |
Is that caching using some cache key or is it simply "if the file exists, just reuse it!"? |
The issue would be that the caching does not know about the '-Dlombok.scope=test' parameter, so it will cache whatever the first value is. |
FTR, I'm now using this workaround: <profile>
<id>qtest</id>
<properties>
<quarkus.test.continuous-testing>enabled</quarkus.test.continuous-testing>
</properties>
<build>
<!-- note: remove-quarkus-cp-cache is a workaround for https://github.com/quarkusio/quarkus/issues/23078
(until https://github.com/quarkusio/quarkus/issues/22552 is resolved) -->
<defaultGoal>clean:clean@remove-quarkus-cp-cache quarkus:test</defaultGoal>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<executions>
<execution>
<id>remove-quarkus-cp-cache</id>
<goals>
<goal>clean</goal>
</goals>
<phase>clean</phase>
<configuration>
<excludeDefaultDirectories>true</excludeDefaultDirectories>
<filesets>
<fileset>
<directory>${project.build.directory}/quarkus/bootstrap</directory>
<followSymlinks>false</followSymlinks>
<useDefaultExcludes>false</useDefaultExcludes>
<includes>
<include>test-app-model.dat</include>
</includes>
</fileset>
</filesets>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<!-- workaround for https://github.com/quarkusio/quarkus/issues/22552 (for JavaSourceTest) -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
<scope>compile</scope>
</dependency>
</dependencies>
</profile> |
Looks like |
Ah, no, it's not propagated to the default |
No, it is, sorry, ignore me. |
@aloubyansky FYI, I'm still seeing inconsistencies w.r.t. to that cache, so I need to reintroduce that workaround I posted previously: #23078 (comment) |
Is it still about changing the scope for lombok? |
No, this time it's about what I documented as a workaround in #23929, which is an exclusion for ArchUnit (in a profile). |
I think we need an option to ignore the cache then. |
Describe the bug
I added a workaround to my project for #22552 which is setting the scope of lombok to
test
instead ofprovided
via a specificqtest
maven profile (that has<defaultGoal>quarkus:test</defaultGoal>
).This works if cont' testing is started on a "clean" state, but if regular testing was run before via
mvn test
, this workaround does not have any effect anymore.In other words, I have to run
mvn clean quarkus:test
(clean!) ifmvn test
was run before, which is cumbersome and wastes time if you have many classes to generate/compile. It's also easy to forget.Expected behavior
Cont' testing should re-setup dependencies (if needed) and should not rely on what
mvn test
has left behind.Actual behavior
Doesn't re-setup dependencies and reuses what
mvn test
has left behind, which in this case means failing bedcause of theprovided
issue.How to Reproduce?
q_ct-provided-2.zip (note: uses 999-SNAPSHOT)
mvn quarkus:test -Dlombok.scope=test
(ok)mvn clean test
(ok)mvn quarkus:test -Dlombok.scope=test
(fails withClassNotFoundException
)mvn clean quarkus:test -Dlombok.scope=test
(ok)PS: This reproducer simply toggles the scope via a property instead of via a profile, but that's not relevant.
Output of
uname -a
orver
No response
Output of
java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.6.3.Final and current 999-SNAPSHOT
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
FWIW,
-Dquarkus.bootstrap.effective-model-builder=true
doesn't make a difference.The text was updated successfully, but these errors were encountered: