You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "jmborer (via GitHub)" <gi...@apache.org> on 2023/12/22 07:58:07 UTC
[I] No updater.jar specified, cannot validate Info.xml against DTD [netbeans-mavenutils-nbm-maven-plugin]
jmborer opened a new issue, #128:
URL: https://github.com/apache/netbeans-mavenutils-nbm-maven-plugin/issues/128
There is this warning message that appears during the creation of the NBM file.
This occurs when CreateNbmMojo.java is invoked during the build process. The mojo uses the ant harness from Netbeans where it invokes:
```
MakeNBM` nbmTask = (MakeNBM) antProject.createTask( "makenbm" )
```
which is an Ant task that lives in the Netbeans Build System..
The warning message appears because the method createUpdaterJar is never invoked in CreateNbmMojo.java:
MakeNBM.java
```
public Path createUpdaterJar() {
return updaterJar = new Path(getProject());
}
...
if (updaterJar != null && updaterJar.size() > 0) {
try {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
XMLUtil.write(doc, baos);
validateAgainstAUDTDs(new InputSource(new ByteArrayInputStream(baos.toByteArray())), updaterJar, this);
} catch (Exception x) {
throw new BuildException("Could not validate Info.xml before writing: " + x, x, getLocation());
}
} else {
log("No updater.jar specified, cannot validate Info.xml against DTD", Project.MSG_WARN);
}
```
This is how Netbeans build.xml uses it:
```
<makenbm file="${build.dir}/${nbm}"
productdir="${cluster}"
module="${module.jar}"
homepage="${nbm.homepage}"
distribution="${nbm.distribution}"
needsrestart="${nbm.needs.restart}"
global="${nbm.is.global}"
preferredupdate="${nbm.is.preferredupdate}"
usepack200="${use.pack200}"
pack200excludes="${pack200.excludes}"
alwayscreatenbm="${nbm.always.create}"
targetcluster="${nbm.target.cluster}"
releasedate="${nbm.release.date}"
moduleauthor="${nbm.module.author}"
locales="${nbm.locales}"
>
<license file="${license.file.override}"/>
<signature keystore="${keystore}" storepass="${storepass}" alias="${nbm_alias}" tsaurl="${tsaurl}" tsacert="${tsacert}"/>
<updaterjar>
<pathfileset>
<path refid="cluster.path.id"/>
<filename name="modules/ext/updater.jar"/>
</pathfileset>
</updaterjar>
<executables refid="module.executable.files"/>
<extranbmfiles refid="extra.nbm.files"/>
</makenbm>
```
So somehow, CreateNbmMojo.java shall call the the method `createUpdaterJar` on the `MakeNBM` Ant task to properly initialize the updater.jar value.
--
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: notifications-unsubscribe@netbeans.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [I] No updater.jar specified, cannot validate Info.xml against DTD [netbeans-mavenutils-nbm-maven-plugin]
Posted by "ebarboni (via GitHub)" <gi...@apache.org>.
ebarboni closed issue #128: No updater.jar specified, cannot validate Info.xml against DTD
URL: https://github.com/apache/netbeans-mavenutils-nbm-maven-plugin/issues/128
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [I] No updater.jar specified, cannot validate Info.xml against DTD [netbeans-mavenutils-nbm-maven-plugin]
Posted by "jmborer (via GitHub)" <gi...@apache.org>.
jmborer commented on issue #128:
URL: https://github.com/apache/netbeans-mavenutils-nbm-maven-plugin/issues/128#issuecomment-1883634329
Absolutely. The only issue I need to solve currently is once you get access to the updater.jar file, the code currently doesn't support !jar in the resource path. Only plain files are supporte and therefore is not able to retrieve the DTDs for the archive. I need to find a solution to probably temporarily extract the required files. I need to study a bit more the Mojo code.
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [I] No updater.jar specified, cannot validate Info.xml against DTD [netbeans-mavenutils-nbm-maven-plugin]
Posted by "ebarboni (via GitHub)" <gi...@apache.org>.
ebarboni commented on issue #128:
URL: https://github.com/apache/netbeans-mavenutils-nbm-maven-plugin/issues/128#issuecomment-1946039959
Merged #142
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [I] No updater.jar specified, cannot validate Info.xml against DTD [netbeans-mavenutils-nbm-maven-plugin]
Posted by "ebarboni (via GitHub)" <gi...@apache.org>.
ebarboni commented on issue #128:
URL: https://github.com/apache/netbeans-mavenutils-nbm-maven-plugin/issues/128#issuecomment-1956778902
fixed by #142
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [I] No updater.jar specified, cannot validate Info.xml against DTD [netbeans-mavenutils-nbm-maven-plugin]
Posted by "ebarboni (via GitHub)" <gi...@apache.org>.
ebarboni commented on issue #128:
URL: https://github.com/apache/netbeans-mavenutils-nbm-maven-plugin/issues/128#issuecomment-1895636389
@jmborer I tried a PR that download or get the artefacts "updater" that is provided by NetBeans maven artefacts. Version is hardcoded but it avoid a local path
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [I] No updater.jar specified, cannot validate Info.xml against DTD [netbeans-mavenutils-nbm-maven-plugin]
Posted by "neilcsmith-net (via GitHub)" <gi...@apache.org>.
neilcsmith-net commented on issue #128:
URL: https://github.com/apache/netbeans-mavenutils-nbm-maven-plugin/issues/128#issuecomment-1867906064
I presume you want `platform/modules/ext/updater.jar` relative to `clusterDir`, which is already passed into the task.
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [I] No updater.jar specified, cannot validate Info.xml against DTD [netbeans-mavenutils-nbm-maven-plugin]
Posted by "jmborer (via GitHub)" <gi...@apache.org>.
jmborer commented on issue #128:
URL: https://github.com/apache/netbeans-mavenutils-nbm-maven-plugin/issues/128#issuecomment-1867742782
The solution is to provide the location of the updater.jar as follows in `CreateNbmMojo::execute()`
```
public void execute()
throws MojoExecutionException, MojoFailureException
{
...
// start add
Path updaterPath = nbmTask.createUpdaterJar();
updaterPath.setPath("/Users/jeanmarc/code/oss/GitHub/netbeans/nbbuild/netbeans/platform/modules/ext/updater.jar");
// end add
try
{
nbmTask.execute();
}
catch ( BuildException e )
{
throw new MojoExecutionException( "Cannot Generate nbm file:" + e.getMessage(), e );
}
...
}
```
However the path to the updater.jar is still hard coded (just for testing purpose). It should be replaced by the updater.jar provided by the build process. Not sure how to this currently, but it is the solution.
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists