@Test public void generatePomFileWhenPomFileNameDoesNotExistTest() throws IOException { artifact.setUri(artifactFileFolder.newFile(DEFAULT_POM_FILE_NAME).toURI()); File generatedPomFile = new File(outputFolder.getRoot(), POM_FILE_NAME); assertThat("Pom file should not exist", generatedPomFile.exists(), is(false)); installer.generatePomFile(artifact, outputFolder.getRoot()); assertThat("Pom file should have been created", generatedPomFile.exists(), is(true)); }
protected void generatePomFile(Artifact artifact, File artifactFolderDestination) throws IOException { String artifactPomFilename = artifact.getPomFileName(); File srcPomFolder = new File(artifact.getUri()).getParentFile(); File srcPomFile = new File(srcPomFolder, artifactPomFilename); File destinationPomFile = new File(artifactFolderDestination, artifactPomFilename); if (!srcPomFile.exists()) { srcPomFile = new File(srcPomFolder, POM_FILE_NAME); } copyFile(srcPomFile, destinationPomFile); }
ArtifactInstaller { protected void generatePomFile(Artifact artifact, File artifactFolderDestination) throws IOException { String artifactPomFilename = artifact.getPomFileName(); File srcPomFolder = new File(artifact.getUri()).getParentFile(); File srcPomFile = new File(srcPomFolder, artifactPomFilename); File destinationPomFile = new File(artifactFolderDestination, artifactPomFilename); if (!srcPomFile.exists()) { srcPomFile = new File(srcPomFolder, POM_FILE_NAME); } copyFile(srcPomFile, destinationPomFile); } }
ArtifactInstaller { protected void generatePomFile(Artifact artifact, File artifactFolderDestination) throws IOException { String artifactPomFilename = artifact.getPomFileName(); File srcPomFolder = new File(artifact.getUri()).getParentFile(); File srcPomFile = new File(srcPomFolder, artifactPomFilename); File destinationPomFile = new File(artifactFolderDestination, artifactPomFilename); if (!srcPomFile.exists()) { srcPomFile = new File(srcPomFolder, POM_FILE_NAME); } copyFile(srcPomFile, destinationPomFile); } ArtifactInstaller(PackagerLog log); }
ArtifactInstaller { protected void generatePomFile(Artifact artifact, File artifactFolderDestination) throws IOException { String artifactPomFilename = artifact.getPomFileName(); File srcPomFolder = new File(artifact.getUri()).getParentFile(); File srcPomFile = new File(srcPomFolder, artifactPomFilename); File destinationPomFile = new File(artifactFolderDestination, artifactPomFilename); if (!srcPomFile.exists()) { srcPomFile = new File(srcPomFolder, POM_FILE_NAME); } copyFile(srcPomFile, destinationPomFile); } ArtifactInstaller(PackagerLog log); @Deprecated void installArtifact(File repositoryFile, Artifact artifact, Optional<ClassLoaderModel> classLoaderModel); void installArtifact(File repositoryFile, Artifact artifact, Optional<ClassLoaderModel> classLoaderModel,
                              boolean prettyPrinting); }
ArtifactInstaller { protected void generatePomFile(Artifact artifact, File artifactFolderDestination) throws IOException { String artifactPomFilename = artifact.getPomFileName(); File srcPomFolder = new File(artifact.getUri()).getParentFile(); File srcPomFile = new File(srcPomFolder, artifactPomFilename); File destinationPomFile = new File(artifactFolderDestination, artifactPomFilename); if (!srcPomFile.exists()) { srcPomFile = new File(srcPomFolder, POM_FILE_NAME); } copyFile(srcPomFile, destinationPomFile); } ArtifactInstaller(PackagerLog log); @Deprecated void installArtifact(File repositoryFile, Artifact artifact, Optional<ClassLoaderModel> classLoaderModel); void installArtifact(File repositoryFile, Artifact artifact, Optional<ClassLoaderModel> classLoaderModel,
                              boolean prettyPrinting);  }