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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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....

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.

None yet

2 participants