jtulach commented on code in PR #375:
URL:
https://github.com/apache/netbeans-mavenutils-nbm-maven-plugin/pull/375#discussion_r4464816931
##########
nb-repository-plugin/src/main/java/org/apache/netbeans/nbm/repository/PopulateRepositoryMojo.java:
##########
@@ -977,13 +971,61 @@ private File createClusterProject(Artifact cluster,
Collection<ModuleWrapper> mo
return null;
}
+ private File createCatalog(Artifact catalog, Collection<ModuleWrapper>
mods) throws MojoExecutionException {
+ File xml = null;
+ try {
+ xml = Files.createTempFile("maven-catalog", ".xml.gz").toFile();
+ xml.setLastModified(0L); // always out of date
+
+ Project project = new Project();
+ MakeUpdateDesc generateCatalogTask = new MakeUpdateDesc();
+ generateCatalogTask.setProject(project);
+ generateCatalogTask.setDesc(xml);
+ File parentDir = null;
+ OrSelector allFiles = new OrSelector();
+ allFiles.setProject(project);
+ for (var m : mods) {
+ File nbm = m.getNbm();
+ getLog().info("file: " + nbm + " for " + m.getArtifact() + "
file: " + m.getFile());
+ if (nbm == null) {
+ getLog().warn("No NBM for " + m);
Review Comment:
@ebarboni, here I need an advice where to download these `.nbm`-less modules
(external OSGi JARs I assume) from? I assume I should constract a _relative
URL_ to Maven central location using GAV, right?
##########
nb-repository-plugin/src/main/java/org/apache/netbeans/nbm/repository/PopulateRepositoryMojo.java:
##########
@@ -977,13 +971,61 @@ private File createClusterProject(Artifact cluster,
Collection<ModuleWrapper> mo
return null;
}
+ private File createCatalog(Artifact catalog, Collection<ModuleWrapper>
mods) throws MojoExecutionException {
+ File xml = null;
+ try {
+ xml = Files.createTempFile("maven-catalog", ".xml.gz").toFile();
+ xml.setLastModified(0L); // always out of date
+
+ Project project = new Project();
+ MakeUpdateDesc generateCatalogTask = new MakeUpdateDesc();
+ generateCatalogTask.setProject(project);
+ generateCatalogTask.setDesc(xml);
+ File parentDir = null;
+ OrSelector allFiles = new OrSelector();
+ allFiles.setProject(project);
+ for (var m : mods) {
+ File nbm = m.getNbm();
+ getLog().info("file: " + nbm + " for " + m.getArtifact() + "
file: " + m.getFile());
+ if (nbm == null) {
+ getLog().warn("No NBM for " + m);
Review Comment:
@ebarboni, here I need an advice where to download these `.nbm`-less modules
(external OSGi JARs I assume) from? I assume I should construct a _relative
URL_ to Maven central location using GAV, right?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists