Re: Unusual Error on Maven build within Netbeans

2020-06-03 Thread William Reynolds

ugh. My apologies, file name is "jvm.config". From mvn.cmd:

set "jvmConfig=\.mvn\jvm.config"
if not exist "%MAVEN_PROJECTBASEDIR%%jvmConfig%" goto 
endReadAdditionalConfig


@setlocal EnableExtensions EnableDelayedExpansion
for /F "usebackq delims=" %%a in 
("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set 
JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a

@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%

:endReadAdditionalConfig

On 6/3/2020 2:34 PM, William Reynolds wrote:
Create a file .mvn/java-config in the root directory of the maven 
project. Add '-Xss100M' (for a 100M stack size, and no quotes) to this 
file.


Haven't tested, since I don't have my dev machine to hand, but this or 
some variant should work. Look at the file
\Program Files\apache-maven-3.6.2\bin\mvn.cmd (you can use a text 
editor) to see how maven finds the arguments to pass to java.exe (it 
should open .mvn/java-config and add it's contents to the java 
argument list)


On 6/3/2020 5:32 AM, Nelligan, Steven M wrote:


I have multiple projects, but one project returns the following error.

What does this mean and how can I fix it?

If I run MVN directly from the console window, it builds.

Using Netbeans IDE 11.2 on Windows 10

---OUTPUT 
– Build Window


cd C:\dev\Projects\mobileapp; "JAVA_HOME=C:\\Program 
Files\\Java\\jdk-11" "M2_HOME=C:\\Program Files\\apache-maven-3.6.2" 
cmd /c "\"\"C:\\Program Files\\apache-maven-3.6.2\\bin\\mvn.cmd\" 
-DskipTests=true -Dmaven.ext.class.path=\"C:\\Program 
Files\\NetBeans-11.2\\netbeans\\java\\maven-nblib\\netbeans-eventspy.jar\" 
-Dfile.encoding=Cp1252 --update-snapshots --update-snapshots -PvDev 
clean install\""


*The Java thread stack size specified is too small. Specify at least 
180k*


*Error: Could not create the Java Virtual Machine.*

*Error: A fatal exception has occurred. Program will exit.*

*Steven M Nelligan*
/APPLICATION DEVELOPER/


Facilities and Services

Information Technology Services
University of Illinois at Urbana-Champaign
Facilities and Services
1501 S. Oak Street | M/C 800
Champaign, IL 61820
217.244.8097 | /other/: 217.244.8097 | snell...@illinois.edu 
<mailto:snell...@illinois.edu>

www.fs.illinois.edu <http://www.fs.illinois.edu/>

facebook 
<https://www.facebook.com/UniversityOfIllinoisFacilitiesServices>twitter 
<https://twitter.com/UofIFS>instagram 
<https://www.instagram.com/uofifs/>youtube 
<https://www.youtube.com/user/UofIFS>


https://webtools.illinois.edu/webservices/js/ds/signature_logo.png 
<http://illinois.edu/>


/Under the Illinois Freedom of Information Act any written 
communication to or from university employees regarding university 
business is a public record and may be subject to public disclosure./




--
William Reynolds, Ph.D.
Stellar Science, LLC
wnreyno...@stellarscience.com
www.stellarscience.com
877-763-8268 x710 (v)


--
William Reynolds, Ph.D.
Stellar Science, LLC
wnreyno...@stellarscience.com
www.stellarscience.com
877-763-8268 x710 (v)



smime.p7s
Description: S/MIME Cryptographic Signature


Re: Unusual Error on Maven build within Netbeans

2020-06-03 Thread William Reynolds
Create a file .mvn/java-config in the root directory of the maven 
project. Add '-Xss100M' (for a 100M stack size, and no quotes) to this 
file.


Haven't tested, since I don't have my dev machine to hand, but this or 
some variant should work. Look at the file
\Program Files\apache-maven-3.6.2\bin\mvn.cmd (you can use a text 
editor) to see how maven finds the arguments to pass to java.exe (it 
should open .mvn/java-config and add it's contents to the java argument 
list)


On 6/3/2020 5:32 AM, Nelligan, Steven M wrote:


I have multiple projects, but one project returns the following error.

What does this mean and how can I fix it?

If I run MVN directly from the console window, it builds.

Using Netbeans IDE 11.2 on Windows 10

---OUTPUT 
– Build Window


cd C:\dev\Projects\mobileapp; "JAVA_HOME=C:\\Program 
Files\\Java\\jdk-11" "M2_HOME=C:\\Program Files\\apache-maven-3.6.2" 
cmd /c "\"\"C:\\Program Files\\apache-maven-3.6.2\\bin\\mvn.cmd\" 
-DskipTests=true -Dmaven.ext.class.path=\"C:\\Program 
Files\\NetBeans-11.2\\netbeans\\java\\maven-nblib\\netbeans-eventspy.jar\" 
-Dfile.encoding=Cp1252 --update-snapshots --update-snapshots -PvDev 
clean install\""


*The Java thread stack size specified is too small. Specify at least 180k*

*Error: Could not create the Java Virtual Machine.*

*Error: A fatal exception has occurred. Program will exit.*

*Steven M Nelligan*
/APPLICATION DEVELOPER/


Facilities and Services

Information Technology Services
University of Illinois at Urbana-Champaign
Facilities and Services
1501 S. Oak Street | M/C 800
Champaign, IL 61820
217.244.8097 | /other/: 217.244.8097 | snell...@illinois.edu 
<mailto:snell...@illinois.edu>

www.fs.illinois.edu <http://www.fs.illinois.edu/>

facebook 
<https://www.facebook.com/UniversityOfIllinoisFacilitiesServices>twitter 
<https://twitter.com/UofIFS>instagram 
<https://www.instagram.com/uofifs/>youtube 
<https://www.youtube.com/user/UofIFS>


https://webtools.illinois.edu/webservices/js/ds/signature_logo.png 
<http://illinois.edu/>


/Under the Illinois Freedom of Information Act any written 
communication to or from university employees regarding university 
business is a public record and may be subject to public disclosure./




--
William Reynolds, Ph.D.
Stellar Science, LLC
wnreyno...@stellarscience.com
www.stellarscience.com
877-763-8268 x710 (v)



smime.p7s
Description: S/MIME Cryptographic Signature


Re: Maven run properties bugs

2020-01-22 Thread William Reynolds

You need to provide more information.

Go to your output window, what is that command that is actually being run?

What is the error message?

What happens when you run the same maven command from the command line?

Does the command line make sense given the maven goal you're trying to 
execute? Maven is self documenting, so you can lookup the documentation 
of any maven goal, eg:


'mvn help:describe -Dcmd=exec:java -Ddetail=true'.

will provide documentation on the 'exec:java' command.

To learn how to use the maven help module, you can do

'mvn help:describe -Dcmd=help:describe -Ddetail=true'.

I suspect if you go through these steps, you will answer your own question.

On 1/22/2020 5:36 PM, Ty Young wrote:


On 1/21/20 3:36 PM, Ty Young wrote:

Hi,


Whenever I go to "run" in my Maven project properties the command 
line arguments are all messed up[1]. Why is it doing this?



Nothing on this? At all?





[1] https://imgur.com/a/pOdKIOR



-
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


--
William Reynolds, Ph.D.
Stellar Science, LLC
wnreyno...@stellarscience.com
www.stellarscience.com
877-763-8268 x710 (v)




smime.p7s
Description: S/MIME Cryptographic Signature


Re: deployable javafx app

2019-12-01 Thread William Reynolds

I sent this out a couple of weeks ago:



For my application, I've had need of some reliable, reusable NBI installer 
scripts, so I've implemented some:

https://github.com/wnreynoldsWork/InstallersWithEmbeddedJVM.git

Here is the README:

This is a demonstration of a Netbeans Rich Client Platform (RCP)
application that shows how to embed a JRE into the installer that will
be used by the application.  The package works around numerous bugs in
the current Netbeans Installer (NBI) harness. See the JIRA issues:

https://issues.apache.org/jira/browse/NETBEANS-1157
https://issues.apache.org/jira/browse/NETBEANS-1145
https://issues.apache.org/jira/browse/NETBEANS-3332

The application consists of a trivial window (module HiMom), a branding
module, and an application module, where all of the action happens. The
objective is for the application module to be droppable into any RCP
application, providing robust NBI installers for Windows and Linux.

The application package enables Windows installers to work on modern
versions of Java.  The application is built using Maven and the
nbm-maven-plugin, however, the modified harness files should be usable
with an ant build, with some modification of the embedded properties.

All of the custom NBI files are found in
application/src/main/resources/dist.  The package includes two binary
JREs, one for windows (jre.exe) and one for linux (jre-linux). It would
have been nice to download and build these from the package, but that was
sufficiently complex with Maven/Ant that it destroyed any educational
benefit. Bot files are self-extracting zips, so if you rename them to
"jre.zip" or "jre-linux.zip", you will be able to examine their contents.

Much of this was guided by an old post of Geertjan Wielenga at
https://blogs.oracle.com/geertjan/installing-the-jre-via-an-applications-installer-via-windows
and the article at https://dzone.com/articles/including-jre-in-nbi. These
posts provide instructions on how to construct the sfx JRE files. Note
that the linux JRE is expected to have the jre under a directory called
"jre", while the windows JRE is expected the directories bin/, conf/,
lib/ and legal/ to be top level directories in the zip.

Currently only linux and windows have been tested. MacOS might work.

The pom provides several configuration variables, in the application pom under 
the nbm-maven-plugin configuration:



true

true

true

true

true

false

The package works around bugs in the NBI in several ways. If the
configuration variable hackEngineJar is set to "true" in the pom,
the NBI engine will be modified during the installation.  The package
includes modifications of the NBI engine classes CommonLauncher and
CreateNativeLauncherAction. These will be compiled and put in the engine
jar during the install process. CreateNativeLauncherAction supports
a property specifying information on a "compatible" Java that will be
embedded in the installer and used to validate the JRE being used.

The other trick is that the test file TestJDK is replaced in the engine
jar. This version returns a java version string that is compatible with
the one embedded in the installer, and will not be rejected by the buggy
NBI code.

In addition, the package corrects numerous textual errors in the various
ant scripts and config files in the harness. See the pom to enable/disable
these fixes.

Finally, the package provides a means to test new windows installer
"launchers". Place the candidate launcher, called "nlw.exe" in
main/src/resources/installers, set testWindowLauncher to true and
hackEngineJar to false. If this yields a working installer, the nlw.exe
is good.

A useful trick when diagnosing a windows installer is to run it
"installerName --verbose --output installLog". installLog will have a full
transcript of the install process.  If you have set hackEngineJar, you
will see the "fake" version numbers that are generated by the installer.

I hope this is helpful.

--
William Reynolds, Ph.D.
Stellar Science, LLC
wnreyno...@stellarscience.com
www.stellarscience.com
877-763-8268 x710 (v)






On 12/1/2019 4:03 AM, joe schmo wrote:
I have created a javafx application using Netbeans 11.1, it is a maven 
based project.  I want to create a deployable executable jar file.  Is 
there a good tutorial or documentation on how to do this with 
Netbeans/maven?


Thanks


--
William Reynolds, Ph.D.
Stellar Science, LLC
wnreyno...@stellarscience.com
www.stellarscience.com
877-763-8268 x710 (v)



smime.p7s
Description: S/MIME Cryptographic Signature


Re: Abstract methods not implemented

2019-11-28 Thread William Reynolds
Yes, its' a known bug in 11.2. 
https://issues.apache.org/jira/browse/NETBEANS-3340 (it has been 
reported numerous times, each one which links back to 3300).


I've had to go back to 11.1, since this bug makes the ide unusable.

On 11/28/2019 6:05 AM, Richard Grin wrote:

Hello,

If I write this code:

Comparator c = new Comparator<>() {

};

I get an error " is not abstract and does not override
abstract method Compare(Town, Town) in Comparator. It's normal, but, if
I click on the red button at the left of the code, and then on
"implement all abstract method", nothing happens.

Is it a known problem?

Richard



-
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



--
William Reynolds, Ph.D.
Stellar Science, LLC
wnreyno...@stellarscience.com
www.stellarscience.com
877-763-8268 x710 (v)



smime.p7s
Description: S/MIME Cryptographic Signature


A Package for Generating Robust RCP Installers Using Maven

2019-11-20 Thread William Reynolds
For my application, I've had need of some reliable, reusable NBI 
installer scripts, so I've implemented some:


https://github.com/wnreynoldsWork/InstallersWithEmbeddedJVM.git

Here is the README:

This is a demonstration of a Netbeans Rich Client Platform (RCP)
application that shows how to embed a JRE into the installer that will
be used by the application.  The package works around numerous bugs in
the current Netbeans Installer (NBI) harness. See the JIRA issues:

https://issues.apache.org/jira/browse/NETBEANS-1157
https://issues.apache.org/jira/browse/NETBEANS-1145
https://issues.apache.org/jira/browse/NETBEANS-3332

The application consists of a trivial window (module HiMom), a branding
module, and an application module, where all of the action happens. The
objective is for the application module to be droppable into any RCP
application, providing robust NBI installers for Windows and Linux.

The application package enables Windows installers to work on modern
versions of Java.  The application is built using Maven and the
nbm-maven-plugin, however, the modified harness files should be usable
with an ant build, with some modification of the embedded properties.

All of the custom NBI files are found in
application/src/main/resources/dist.  The package includes two binary
JREs, one for windows (jre.exe) and one for linux (jre-linux). It would
have been nice to download and build these from the package, but that was
sufficiently complex with Maven/Ant that it destroyed any educational
benefit. Bot files are self-extracting zips, so if you rename them to
"jre.zip" or "jre-linux.zip", you will be able to examine their contents.

Much of this was guided by an old post of Geertjan Wielenga at
https://blogs.oracle.com/geertjan/installing-the-jre-via-an-applications-installer-via-windows
and the article at https://dzone.com/articles/including-jre-in-nbi. These
posts provide instructions on how to construct the sfx JRE files. Note
that the linux JRE is expected to have the jre under a directory called
"jre", while the windows JRE is expected the directories bin/, conf/,
lib/ and legal/ to be top level directories in the zip.

Currently only linux and windows have been tested. MacOS might work.

The pom provides several configuration variables, in the application pom 
under the nbm-maven-plugin configuration:


    
    

true
    

true
    
true
    
true
    

    true
    

false

The package works around bugs in the NBI in several ways. If the
configuration variable hackEngineJar is set to "true" in the pom,
the NBI engine will be modified during the installation.  The package
includes modifications of the NBI engine classes CommonLauncher and
CreateNativeLauncherAction. These will be compiled and put in the engine
jar during the install process. CreateNativeLauncherAction supports
a property specifying information on a "compatible" Java that will be
embedded in the installer and used to validate the JRE being used.

The other trick is that the test file TestJDK is replaced in the engine
jar. This version returns a java version string that is compatible with
the one embedded in the installer, and will not be rejected by the buggy
NBI code.

In addition, the package corrects numerous textual errors in the various
ant scripts and config files in the harness. See the pom to enable/disable
these fixes.

Finally, the package provides a means to test new windows installer
"launchers". Place the candidate launcher, called "nlw.exe" in
main/src/resources/installers, set testWindowLauncher to true and
hackEngineJar to false. If this yields a working installer, the nlw.exe
is good.

A useful trick when diagnosing a windows installer is to run it
"installerName --verbose --output installLog". installLog will have a full
transcript of the install process.  If you have set hackEngineJar, you
will see the "fake" version numbers that are generated by the installer.

I hope this is helpful.

--
William Reynolds, Ph.D.
Stellar Science, LLC
wnreyno...@stellarscience.com
www.stellarscience.com
877-763-8268 x710 (v)



smime.p7s
Description: S/MIME Cryptographic Signature


Re: [Netbeans platform] Maven build for custom netbeans platform

2019-11-13 Thread William Reynolds
Presumably your new pom.xml has all sorts of dependency for the netbeans 
platform poms, eg:


        
    org.netbeans.api
org-openide-util-lookup
    RELEASE111
    

    

    
    org.netbeans.api
    org-openide-util
    RELEASE111
    

(etc, etc - my application has 11 RCP modules in the dependency section)


So you can select a given platform using properties:


       
RELEASE111
       

   
    org.netbeans.api
org-openide-util-lookup
    ${netbeans.version}
   

(etc, etc)

Now if you've got your own version of the the platform jars, then you 
will have to set up poms for them and install them to a maven repository 
(either your local .m2 directory, done by doing a 'mvn install' in the 
build directory for each of your RCP modules, or push them up to an 
artifactory). Presumably, your custom modules have their own version 
string (or artifactId). For this case you would something like:


    
MY_HACKED_NETBEANS_VERSION
    
   
    org.netbeans.api
org-openide-util-lookup
    ${netbeans.version}
    

(etc, etc)


Does this help?

On 11/13/2019 1:55 PM, joe foe wrote:

Hello,

I have a module that is a toolbar with couple of actions developed in 
ant for a custom netbeans platform application. I would like to move 
the build  it to maven .


Issue is , if I want to build this module for a specific version of a 
netbeans platform in Ant , First I add the platform thorough Options 
-> Netbeans  platforms and then I just right click  the project - 
>Project properties -> choose platform .


How would I do this with maven? I only see the standard netbeans 
versions and don't have any option to select a custom netbeans 
platform (also in project properties) .


Any help would be appreciated.

Thanks !

Regards
Joefoe


--
William Reynolds, Ph.D.
Stellar Science, LLC
wnreyno...@stellarscience.com
www.stellarscience.com
877-763-8268 x710 (v)



smime.p7s
Description: S/MIME Cryptographic Signature


Re: Platform Installer Generation on JDK 11/Maven

2019-11-12 Thread William Reynolds

I posted below back in September - this works, but is painful.

A less hacky way to fix this would be to use the options in the 
nbm-maven-plugin to replace the broken harness files. Run mvn 
help:describe -Dplugin=nbm -Ddetail to get the documentation. Look at 
the options to build-installers, in particular templateFile and  
userSettings. I'm pretty sure you can redefine/replace the various 
harness file definitions there.


Note that I haven't tried this yet (although it's on  my list for next 
week). See also 
https://www.mojohaus.org/nbm-maven-plugin/plugin-info.html and 
https://www.mojohaus.org/nbm-maven-plugin/buildinstexample.html. I can't 
seem to find a more recent help page on the plugin, presumably one will 
show up  on the portal at some point, I had to read the plugin source to 
figure a lot of things out.



I've just migrated my RCP project to a Maven-based build, and fixing 
the installer bug was a bit more involved. To begin the migration,
I constructed a maven nb platform project using the guide on 
https://platform.netbeans.org/tutorials/nbm-maven-quickstart.html.
Note that adding child projects didn't work, I had to construct those 
projects by hand. The key thing is that your project will have
an "-App" module whose pom has nbm-application 
and a plugin block like:



    
    deployment
    
    
    
org.apache.netbeans.utilities
nbm-maven-plugin
4.2-installBugfix
    
    
    extra
    
autoupdate
webstart-app
build-installers
    
    
    
    
    
    
    


when you do a 'mvn -Pdeployment install', it should build an installer 
for you, but you get the error about Java version 1.5 being to old. As 
described
below, the problem is that there are two property files with bad 
properties in the ant-based build harness that need to be fixed.


It turns out that the harness of ant scripts is now installed and run 
by the plugin, not using the harness installed with your netbeans 
installation,
so you will have to fix the javac.{source,target}=1.5 bug in the 
plugin. (If you have an ant-based build system for your RCP, then fix 
the files in

your nb installation as in the message included below).

Instructions below are a hack, but they got me up and running:

First:
* Download nbm-maven-harness source from 
https://github.com/apache/netbeans-mavenutils-nbm-maven-harness/tree/nbm-maven-harness-11.0, 
unpack.
* 'mvn install' to build the source. Edit the two project.properties 
files under "target" to fix the javac.* properties (use find, or see 
below for paths).
* Edit the pom, change the version to 
11.0-installBugfix. Disable the large block in the 
pom beginning:
 org.apache.maven.plugins 
maven-antrun-plugin ... . This will 
prevent the second build

you are about to do from overwriting your fixes.
* Run 'mvn install'.  This installs a plugin with fixed harness files 
to your .m2 repository

.m2\repository\org\apache\netbeans\utilities\nbm-maven-harness\11.0-installBugfix.

Next:
* Download nbm-maven-plugin source from 
https://github.com/apache/netbeans-mavenutils-nbm-maven-plugin, unpack.
* Go into pom, modify version to be 
4.2-installBugfix, go to dependencies, change the 
version for nbm-maven-harness to 11.0-installBugfix.

* Run 'mvn install', this installs the fixed plugin to
.m2\repository\org\apache\netbeans\utilities\nbm-maven-plugin\4.2-installBugfix

Finally:
Go to the application pom for your Project (say MavenNBProject-app), 
and change the version of nbm-maven-plugin to 
4.2-installBugfix.

You should be able to build installers using the nbm-maven-plugin.


On 8/21/2019 11:55 PM, Andreas Hauffe wrote:


Hi,

thanks for the hint. In my case I had to change the entries in two files:

harness/nbi/stub/ext/components/products/helloworld/nbproject/project.properties
harness/nbi/stub/ext/engine/nbproject/project.properties

Now it is building the installers

Andreas

Am 21.08.19 um 17:17 schrieb William Reynolds:

I ran into this a few weeks ago using Coolbeans:




We have an RCP application that I was trying to create an installer 
for (right click the project, Package As->Installers). The build 
was failing with the following error:


-do-compile:
    [mkdir] Created dir: 
C:\Users\wnreynolds\Desktop\Work\\build\installer\nbi_all\ext\infra\build\products\helloworld\build\ext\components\products\helloworld\build\empty
    [javac] Compiling 2 source files to 
C:\Users\wnreynolds\Desktop\Work\\build\installer\nbi_all\ext\infra\build\products\helloworld\build\ext\components\products\helloworld\build\classes
    [javac] error: Source option 5 is no longer supported. Use 6 or 
later.
    [javac] error: Target option 1.5 is no longer supported. Use 
1.6 or later.


I don't have a deep und

Re: "New Project->Java with Maven -> Netbean" Module fails

2019-11-01 Thread William Reynolds
Confirmed that it works in 11.2. One weird thing - upon creation, the 
pom was showing an error, didn't recognize nbm. 
Adding removing some text to the pom and saving caused it to reload and 
to work. This was immediately after installing 11.2. Subsequent restarts 
and project creation did not exhibit this problem.


On 9/23/2019 12:16 PM, Geertjan Wielenga wrote:
Fixed in 11.2, try it in a daily build or wait for beta1 to be 
released this week, would be great if you'd verify it works for you 
there.


Gj

On Mon, Sep 23, 2019 at 8:01 PM William Reynolds 
mailto:wnreyno...@stellarscience.com>> 
wrote:


Per subject. Trying to create a new Maven RCP Module project
fails. It
prompts for a directory name and exits immediately after finish is
clicked.
A directory is created, but no project files. In my messages.log,
I have
the following error:

WARNING [org.openide.WizardDescriptor]
java.lang.NullPointerException
 at

org.apache.maven.artifact.versioning.ComparableVersion.parseVersion(ComparableVersion.java:357)
 at

org.apache.maven.artifact.versioning.ComparableVersion.(ComparableVersion.java:348)
 at

org.netbeans.modules.maven.apisupport.NBMNativeMWI$AdditionalOperations.performOperation(NBMNativeMWI.java:384)
 at

org.netbeans.modules.maven.apisupport.NBMNativeMWI$AdditionalOperations.performOperation(NBMNativeMWI.java:141)
 at

org.netbeans.modules.maven.model.Utilities.performPOMModelOperations(Utilities.java:318)
 at

org.netbeans.modules.maven.spi.newproject.CreateProjectBuilder.create(CreateProjectBuilder.java:146)
 at

org.netbeans.modules.maven.apisupport.NBMNativeMWI.instantiate(NBMNativeMWI.java:69)
 at

org.netbeans.modules.maven.apisupport.NbmWizardIterator.instantiate(NbmWizardIterator.java:130)
 at

org.openide.loaders.TemplateWizard$InstantiatingIteratorBridge.instantiate(TemplateWizard.java:1028)
 at

org.openide.loaders.TemplateWizard.handleInstantiate(TemplateWizard.java:580)
 at

org.netbeans.modules.project.ui.NewProjectWizard.handleInstantiate(NewProjectWizard.java:51)
 at

org.openide.loaders.TemplateWizard.instantiateNewObjects(TemplateWizard.java:414)
 at

org.openide.loaders.TemplateWizardIterImpl.instantiate(TemplateWizardIterImpl.java:223)
 at

org.openide.loaders.TemplateWizardIteratorWrapper.instantiate(TemplateWizardIteratorWrapper.java:135)
 at
org.openide.WizardDescriptor.callInstantiateOpen(WizardDescriptor.java:1605)
 at
org.openide.WizardDescriptor.callInstantiate(WizardDescriptor.java:1546)
 at
org.openide.WizardDescriptor.access$2300(WizardDescriptor.java:67)
[catch] at
org.openide.WizardDescriptor$Listener$2$1.run(WizardDescriptor.java:2233)
 at
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
 at
org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
 at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
 at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
INFO [org.netbeans.core.netigso.Netigso]: bundle
org.eclipse.osgi@3.9.1.
<mailto:org.eclipse.osgi@3.9.1.>v20140110-1610 256
INFO [org.netbeans.core.netigso.Netigso]: bundle
org.eclipse.osgi@3.9.1.
<mailto:org.eclipse.osgi@3.9.1.>v20140110-1610 stopped
INFO [null]: Last record repeated again.

    -- 
    William Reynolds, Ph.D.

Stellar Science, LLC
wnreyno...@stellarscience.com <mailto:wnreyno...@stellarscience.com>
www.stellarscience.com <http://www.stellarscience.com>
    877-763-8268 x710 (v)




--
William Reynolds, Ph.D.
Stellar Science, LLC
wnreyno...@stellarscience.com
www.stellarscience.com
877-763-8268 x710 (v)



smime.p7s
Description: S/MIME Cryptographic Signature


"New Project->Java with Maven -> Netbean" Module fails

2019-09-23 Thread William Reynolds
Per subject. Trying to create a new Maven RCP Module project fails. It 
prompts for a directory name and exits immediately after finish is clicked.
A directory is created, but no project files. In my messages.log, I have 
the following error:


WARNING [org.openide.WizardDescriptor]
java.lang.NullPointerException
    at 
org.apache.maven.artifact.versioning.ComparableVersion.parseVersion(ComparableVersion.java:357)
    at 
org.apache.maven.artifact.versioning.ComparableVersion.(ComparableVersion.java:348)
    at 
org.netbeans.modules.maven.apisupport.NBMNativeMWI$AdditionalOperations.performOperation(NBMNativeMWI.java:384)
    at 
org.netbeans.modules.maven.apisupport.NBMNativeMWI$AdditionalOperations.performOperation(NBMNativeMWI.java:141)
    at 
org.netbeans.modules.maven.model.Utilities.performPOMModelOperations(Utilities.java:318)
    at 
org.netbeans.modules.maven.spi.newproject.CreateProjectBuilder.create(CreateProjectBuilder.java:146)
    at 
org.netbeans.modules.maven.apisupport.NBMNativeMWI.instantiate(NBMNativeMWI.java:69)
    at 
org.netbeans.modules.maven.apisupport.NbmWizardIterator.instantiate(NbmWizardIterator.java:130)
    at 
org.openide.loaders.TemplateWizard$InstantiatingIteratorBridge.instantiate(TemplateWizard.java:1028)
    at 
org.openide.loaders.TemplateWizard.handleInstantiate(TemplateWizard.java:580)
    at 
org.netbeans.modules.project.ui.NewProjectWizard.handleInstantiate(NewProjectWizard.java:51)
    at 
org.openide.loaders.TemplateWizard.instantiateNewObjects(TemplateWizard.java:414)
    at 
org.openide.loaders.TemplateWizardIterImpl.instantiate(TemplateWizardIterImpl.java:223)
    at 
org.openide.loaders.TemplateWizardIteratorWrapper.instantiate(TemplateWizardIteratorWrapper.java:135)
    at 
org.openide.WizardDescriptor.callInstantiateOpen(WizardDescriptor.java:1605)
    at 
org.openide.WizardDescriptor.callInstantiate(WizardDescriptor.java:1546)

    at org.openide.WizardDescriptor.access$2300(WizardDescriptor.java:67)
[catch] at 
org.openide.WizardDescriptor$Listener$2$1.run(WizardDescriptor.java:2233)
    at 
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
    at 
org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)

    at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
    at 
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
INFO [org.netbeans.core.netigso.Netigso]: bundle 
org.eclipse.osgi@3.9.1.v20140110-1610 256
INFO [org.netbeans.core.netigso.Netigso]: bundle 
org.eclipse.osgi@3.9.1.v20140110-1610 stopped

INFO [null]: Last record repeated again.

--
William Reynolds, Ph.D.
Stellar Science, LLC
wnreyno...@stellarscience.com
www.stellarscience.com
877-763-8268 x710 (v)




smime.p7s
Description: S/MIME Cryptographic Signature


Re: Error while building the installers of a netbeans platform application

2019-09-19 Thread William Reynolds
I've just migrated my RCP project to a Maven-based build, and fixing the 
installer bug was a bit more involved. To begin the migration,
I constructed a maven nb platform project using the guide on 
https://platform.netbeans.org/tutorials/nbm-maven-quickstart.html.
Note that adding child projects didn't work, I had to construct those 
projects by hand. The key thing is that your project will have
an "-App" module whose pom has nbm-application 
and a plugin block like:



    
    deployment
    
    
    
org.apache.netbeans.utilities
nbm-maven-plugin
4.2-installBugfix
    
    
    extra
    
autoupdate
webstart-app
build-installers
    
    
    
    
    
    
    


when you do a 'mvn -Pdeployment install', it should build an installer 
for you, but you get the error about Java version 1.5 being to old. As 
described
below, the problem is that there are two property files with bad 
properties in the ant-based build harness that need to be fixed.


It turns out that the harness of ant scripts is now installed and run by 
the plugin, not using the harness installed with your netbeans 
installation,
so you will have to fix the javac.{source,target}=1.5 bug in the plugin. 
(If you have an ant-based build system for your RCP, then fix the files in

your nb installation as in the message included below).

Instructions below are a hack, but they got me up and running:

First:
* Download nbm-maven-harness source from 
https://github.com/apache/netbeans-mavenutils-nbm-maven-harness/tree/nbm-maven-harness-11.0, 
unpack.
* 'mvn install' to build the source. Edit the two project.properties 
files under "target" to fix the javac.* properties (use find, or see 
below for paths).
* Edit the pom, change the version to 
11.0-installBugfix. Disable the large block in the 
pom beginning:
 org.apache.maven.plugins 
maven-antrun-plugin ... . This will 
prevent the second build

you are about to do from overwriting your fixes.
* Run 'mvn install'.  This installs a plugin with fixed harness files to 
your .m2 repository

.m2\repository\org\apache\netbeans\utilities\nbm-maven-harness\11.0-installBugfix.

Next:
* Download nbm-maven-plugin source from 
https://github.com/apache/netbeans-mavenutils-nbm-maven-plugin, unpack.
* Go into pom, modify version to be 
4.2-installBugfix, go to dependencies, change the 
version for nbm-maven-harness to 11.0-installBugfix.

* Run 'mvn install', this installs the fixed plugin to
.m2\repository\org\apache\netbeans\utilities\nbm-maven-plugin\4.2-installBugfix

Finally:
Go to the application pom for your Project (say MavenNBProject-app), and 
change the version of nbm-maven-plugin to 
4.2-installBugfix.

You should be able to build installers using the nbm-maven-plugin.


On 8/21/2019 11:55 PM, Andreas Hauffe wrote:


Hi,

thanks for the hint. In my case I had to change the entries in two files:

harness/nbi/stub/ext/components/products/helloworld/nbproject/project.properties
harness/nbi/stub/ext/engine/nbproject/project.properties

Now it is building the installers

Andreas

Am 21.08.19 um 17:17 schrieb William Reynolds:

I ran into this a few weeks ago using Coolbeans:




We have an RCP application that I was trying to create an installer 
for (right click the project, Package As->Installers). The build was 
failing with the following error:


-do-compile:
    [mkdir] Created dir: 
C:\Users\wnreynolds\Desktop\Work\\build\installer\nbi_all\ext\infra\build\products\helloworld\build\ext\components\products\helloworld\build\empty
    [javac] Compiling 2 source files to 
C:\Users\wnreynolds\Desktop\Work\\build\installer\nbi_all\ext\infra\build\products\helloworld\build\ext\components\products\helloworld\build\classes
    [javac] error: Source option 5 is no longer supported. Use 6 or 
later.
    [javac] error: Target option 1.5 is no longer supported. Use 1.6 
or later.


I don't have a deep understanding of the build harness, but it 
looked like an empty application, helloworld, was being added to the 
installer, and the compile was failing it due to too low a 
javac.{source,target} specification.


Setting javac.{source,target}=1.8 in my toplevel project.properties 
didn't fix the problem.


Editing 
CoolBeans\harness\nbi\stub\ext\components\products\helloworld\nbproject\ 

project.properties and changing javac.source=1.8 javac.target=1.8 
fixed the problem.


I know folks are managing a lot of changes with the move to apache, 
and this is a little problem, but it should be simple to fix and 
will save others the couple of hours I took to track it down.


Thanks for your work.

FWiW, about my coolbeans:


Product Version: CoolBeans IDE 2018.12 (Build coolbeans-9-on-20190221)

Java: 11.0.2; OpenJDK 64-Bit Serv

Re: Appending data to file in a MemoryFileSystem.

2019-09-19 Thread William Reynolds
But can't you construct a FileChannel from the FileOutputStream? I 
thought the question was how to seek on an output stream, which the 
example generates.


On 9/19/2019 10:06 AM, Neil C Smith wrote:

On Thu, 19 Sep 2019 at 17:03, William Reynolds
 wrote:

 From https://stackoverflow.com/questions/9558979/java-outputstream-skip-offset

...

FileOutputStream out = new FileOutputStream(file);

There is no File! ;-)

Best wishes,

Neil


--
William Reynolds, Ph.D.
Stellar Science, LLC
wnreyno...@stellarscience.com
www.stellarscience.com
877-763-8268 x710 (v)




smime.p7s
Description: S/MIME Cryptographic Signature


Re: Appending data to file in a MemoryFileSystem.

2019-09-19 Thread William Reynolds
From 
https://stackoverflow.com/questions/9558979/java-outputstream-skip-offset


|try{FileOutputStreamout =newFileOutputStream(file);try{FileChannelch 
=out.getChannel();ch.position(offset);ch.write(ByteBuffer.wrap(data));}finally{out.close();}}catch(IOExceptionex){// 
handle error}|




On 9/19/2019 8:02 AM, Richard Linsdale wrote:

Hopefully somebody can help direct me to a solution to this problem

In a Netbeans plug-in which I am developing, I have created a 
MemoryFileSystem for storage of transient files.


I now wish to add a feature to append data to an existing file (in the 
MemoryFileSystem), but I can't find a solution.


If the file was in the OS file system, then I could use the 
FileUtils.toFile() method to get a  and then use new 
FileWriter (, true) to create a writer with which I could append 
the data.


As the file is in a MemoryFileSystem, use of FileUtils.toFile returns 
null, so it's not a route to follow.


Use of .getOutputStream() returns a valid outputstream, 
but is positioned at the start of the file and will therefore 
overwrite the existing data.


Any suggestions welcome, as I want to avoid copying the existing file 
content to a new file on every append request and then renaming the 
file (which is my probably short term fall back).


In the longer-term, it would be nice to have 
.getOutputStream(boolean append) as a extension to the 
API, but that can come later.


regards

Richard


-
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



--
William Reynolds, Ph.D.
Stellar Science, LLC
wnreyno...@stellarscience.com
www.stellarscience.com
877-763-8268 x710 (v)



smime.p7s
Description: S/MIME Cryptographic Signature


Re: Error while building the installers of a netbeans platform application

2019-08-21 Thread William Reynolds

I ran into this a few weeks ago using Coolbeans:




We have an RCP application that I was trying to create an installer for (right 
click the project, Package As->Installers). The build was failing with the 
following error:

-do-compile:
[mkdir] Created dir: 
C:\Users\wnreynolds\Desktop\Work\\build\installer\nbi_all\ext\infra\build\products\helloworld\build\ext\components\products\helloworld\build\empty
[javac] Compiling 2 source files to 
C:\Users\wnreynolds\Desktop\Work\\build\installer\nbi_all\ext\infra\build\products\helloworld\build\ext\components\products\helloworld\build\classes
[javac] error: Source option 5 is no longer supported. Use 6 or later.
[javac] error: Target option 1.5 is no longer supported. Use 1.6 or later.

I don't have a deep understanding of the build harness, but it looked like an 
empty application, helloworld, was being added to the installer, and the 
compile was failing it due to too low a javac.{source,target} specification.

Setting javac.{source,target}=1.8 in my toplevel project.properties didn't fix 
the problem.

Editing CoolBeans\harness\nbi\stub\ext\components\products\helloworld\nbproject\
project.properties and changing javac.source=1.8 javac.target=1.8 fixed the 
problem.

I know folks are managing a lot of changes with the move to apache, and this is 
a little problem, but it should be simple to fix and will save others the 
couple of hours I took to track it down.

Thanks for your work.

FWiW, about my coolbeans:


Product Version: CoolBeans IDE 2018.12 (Build coolbeans-9-on-20190221)

Java: 11.0.2; OpenJDK 64-Bit Server VM 11.0.2+9

Runtime: OpenJDK Runtime Environment 11.0.2+9

System: Windows 10 version 10.0 running on amd64; Cp1252; en_US (nb)

User directory: C:\\AppData\Roaming\NetBeans\2018.12

Cache directory: C:\\AppData\Local\NetBeans\Cache\2018.12

--
William Reynolds, Ph.D.
Stellar Science, LLC
wnreyno...@stellarscience.com
www.stellarscience.com
877-763-8268 x710 (v)





On 8/21/2019 8:33 AM, Neil C Smith wrote:

Hi,

On Wed, 21 Aug 2019 at 15:28, Andreas Hauffe
 wrote:

thanks for the answer. With JDK 11 I'm still getting the same error.


Yes,as far as I know, the installers can't be built with JDK 11 yet.
See pending PR https://github.com/apache/netbeans/pull/1414

Best wishes,

Neil

-
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



--
William Reynolds, Ph.D.
Stellar Science, LLC
wnreyno...@stellarscience.com
www.stellarscience.com
877-763-8268 x710 (v)



smime.p7s
Description: S/MIME Cryptographic Signature


Problem Building an Installer Using Coolbeans 2018.12

2019-06-21 Thread William Reynolds
We have an RCP application that I was trying to create an installer for 
(right click the project, Package As->Installers). The build was failing 
with the following error:


-do-compile:
    [mkdir] Created dir: 
C:\Users\wnreynolds\Desktop\Work\\build\installer\nbi_all\ext\infra\build\products\helloworld\build\ext\components\products\helloworld\build\empty
    [javac] Compiling 2 source files to 
C:\Users\wnreynolds\Desktop\Work\\build\installer\nbi_all\ext\infra\build\products\helloworld\build\ext\components\products\helloworld\build\classes

    [javac] error: Source option 5 is no longer supported. Use 6 or later.
    [javac] error: Target option 1.5 is no longer supported. Use 1.6 or 
later.


I don't have a deep understanding of the build harness, but it looked 
like an empty application, helloworld, was being added to the installer, 
and the compile was failing it due to too low a javac.{source,target} 
specification.


Setting javac.{source,target}=1.8 in my toplevel project.properties 
didn't fix the problem.


Editing 
CoolBeans\harness\nbi\stub\ext\components\products\helloworld\nbproject\
project.properties and changing javac.source=1.8 javac.target=1.8 fixed 
the problem.


I know folks are managing a lot of changes with the move to apache, and 
this is a little problem, but it should be simple to fix and will save 
others the couple of hours I took to track it down.


Thanks for your work.

FWiW, about my coolbeans:


*Product Version:* CoolBeans IDE 2018.12 (Build coolbeans-9-on-20190221)

*Java:* 11.0.2; OpenJDK 64-Bit Server VM 11.0.2+9

*Runtime:* OpenJDK Runtime Environment 11.0.2+9

*System:* Windows 10 version 10.0 running on amd64; Cp1252; en_US (nb)

*User directory:* C:\\AppData\Roaming\NetBeans\2018.12

*Cache directory:* C:\\AppData\Local\NetBeans\Cache\2018.12

--
William Reynolds, Ph.D.
Stellar Science, LLC
wnreyno...@stellarscience.com
www.stellarscience.com
877-763-8268 x710 (v)



smime.p7s
Description: S/MIME Cryptographic Signature