Skip to content
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

fix outputDirectory not work at running spotbugs:spotbugs goal #807

Merged
merged 2 commits into from
Jul 15, 2024

Conversation

exiahuang
Copy link

outputDirectory is not working pretty well when I try to run mvn spotbugs:spotbugs command.
I think maybe the htmlTempFile should be use outputDirectory.
Can you take a look of my PR, Thank you.

@hazendaz
Copy link
Member

hazendaz commented May 8, 2024 via email

@hazendaz
Copy link
Member

@exiahuang Can you show what isn't working for you here? That location is a temp file and there are others in that same spot. project.build.directory is used in a lot of places.

@exiahuang
Copy link
Author

@hazendaz

If I set outputDirectory at build tag, run mvnw spotbugs:spotbugs, the output of html is in target/spotbugs.html.
not target/test-output-directory/spotbugs.html.

<build>
	<plugins>
		<plugin>
			<groupId>com.github.spotbugs</groupId>
			<artifactId>spotbugs-maven-plugin</artifactId>
			<!-- <version>4.8.5.1-SNAPSHOT</version> -->
			<version>4.8.5.0</version>
			<dependencies>
				<dependency>
				<groupId>com.github.spotbugs</groupId>
				<artifactId>spotbugs</artifactId>
				<version>4.8.5</version>
				</dependency>
			</dependencies>
			<configuration>
				<htmlOutput>true</htmlOutput>
				<outputDirectory>target/test-output-directory</outputDirectory>
			</configuration>
		</plugin>
	</plugins>
</build>

I Think htmlTempFile is not just a temp file,
it is not like xmlTempFile and sarifTempFile,
because they will be deleted, but htmlTempFile is never.

@hazendaz
Copy link
Member

ok I'll need to look more at it. Currently this PR breaks the integration tests....

@exiahuang exiahuang force-pushed the fix-report-outputdirectory branch 2 times, most recently from 5591f3c to f22809b Compare May 26, 2024 07:36
@exiahuang exiahuang force-pushed the fix-report-outputdirectory branch from 7790b6b to f449bf1 Compare May 26, 2024 08:17
@exiahuang
Copy link
Author

@hazendaz
Can you Run the workflows again? I fix the test code.

@exiahuang
Copy link
Author

@hazendaz
There are some thing wrong with JDK23 test. I don't think it's my fault, but I don't know how to fix it.

@hazendaz
Copy link
Member

hazendaz commented May 28, 2024 via email

@hazendaz hazendaz self-assigned this Jul 15, 2024
@hazendaz hazendaz merged commit c6b6416 into spotbugs:master Jul 15, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants