michael-o commented on code in PR #104:
URL: 
https://github.com/apache/maven-doxia-sitetools/pull/104#discussion_r1162026996


##########
doxia-integration-tools/src/main/java/org/apache/maven/doxia/tools/DefaultSiteTool.java:
##########
@@ -911,6 +924,29 @@ private File resolveSiteDescriptor(
         return siteDescriptor;
     }
 
+    // TODO Remove this transient method when everyone has migrated to Maven 
Site Plugin 4.0.0+
+    private void deletePseudoSiteDescriptorMarkerFile(RepositorySystemSession 
repoSession, ArtifactRequest request) {
+        LocalRepositoryManager lrm = repoSession.getLocalRepositoryManager();
+
+        LocalArtifactRequest localRequest = new LocalArtifactRequest();
+        localRequest.setArtifact(request.getArtifact());
+
+        LocalArtifactResult localResult = lrm.find(repoSession, localRequest);
+        File localArtifactFile = localResult.getFile();
+
+        try {
+            if (localResult.isAvailable() && 
Files.size(localArtifactFile.toPath()) == 0L) {
+                LOGGER.debug(
+                        "Deleting 0-byte pseudo marker file for artifact '{}' 
at '{}'",
+                        localRequest.getArtifact(),
+                        localArtifactFile);
+                Files.delete(localArtifactFile.toPath());
+            }
+        } catch (IOException e) {
+            LOGGER.debug("Failed to delete 0-byte pseudo marker file for 
artifact '{}'", localRequest.getArtifact());

Review Comment:
   Stupid me, it is late and  I am not fresh anymore ;-)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to