Re: NetBeans 13, subversion, buildnumber plugin, Macintosh failed build

2022-04-11 Thread Mark Eggers

Alex,

Thanks for the reply. I suspected a NetBeans PATH issue but I didn't 
know where to tweak it. I'm a bit reluctant to experiment on other 
people's machines.


I'll have the users try that (one on 13 and one on 12.6) when I run them 
to ground.


It'll be much easier once I have a Macintosh.

Thanks again.

. . . just my two cents
/mde/

On 4/11/2022 2:42 AM, Alexander Kronenwett wrote:

Hello,

I am having the same issue on MacOs 12.3.1 with M1 chip and NetBeans 12.6.
I suppose there is a problem with NetBeans reading the Path variable from
the system, as building works fine in the terminal.

The following workaround made the issue disappear:
# create symlink from homebrew svn to usr local
sudo ln -s /opt/homebrew/bin/svn /usr/local/bin/svn
Quit NetBeans
# add the following lines to the top of netbeans.conf
PATH=$PATH:/usr/local/bin
export PATH

Start NetBeans.

I hope this helps.

Alex

On 2022/03/25 19:36:49 Mark Eggers wrote:

Hi,

Thanks for responding.

I can't check since the Macintosh user is not around at present.
However, while reading brew documentation it says that there are soft
links to /usr/local/bin for all the installations.

If I was writing an installation system, that's how I would do it. That
way you can upgrade by installing software in one place and moving the
links. If the upgrade causes grief, you can just move the links back. If
the upgrade is good, you can then uninstall the older version.

I do that with lots of frequently  upgraded software on my Linux

platforms.


. . . just my two cents
/mde/

On 3/25/2022 1:08 AM, Juan Miguel Escribano wrote:

Hi,

I think I installed Subversion with brew too, but my path to it is :

/usr/local/opt/svn/bin

¿Could you check it?

Juan Miguel


El 25 mar 2022, a las 0:06, Mark Eggers 

escribió:


I'm trying to help a user on a Macintosh use NetBeans 13. I do not

have a Macintosh.


Our pom.xml has the buildnumber-maven-plugin that runs in the validate

phase. It populates some properties (revision and branch) to be added to a
couple of files via resource filtering.


This works fine on Windows and Linux. It also works fine on the user's

Macintosh on the command line.


The build failed error only occurs on a Macintosh when running from

aproject->Clean and Build in NetBeans.


The error happens when executing the following (part of mvn -X):

Executing: /bin/sh -c cd '/Users/auser/NetBeansProjects/aproject' &&

'svn'

 '--username' 'auser' '--password' '*' '--no-auth-cache'
 '--non-interactive' 'info'

The error is:

Failed to execute goal
org.codehaus.mojo:buildnumber-maven-plugin:3.0.0:create (default) on
project aproject:
 Cannot get the revision information from the scm repository :
 Exception while executing SCM command.:
 Error while executing command.
 Error while executing process.
 Cannot run program "svn" (in directory
 "/Users/auser/NetBeansProjects/aproject"): error=2,
 No such file or directory

aproject->Subversion->Update->Update to HEAD works as expected.

The Preferences->Team->Subversion->Preferred Client (CLI) has the path

/usr/local/bin.


Opening a Terminal window in NetBeans (Window->IDE Tools->Terminal),

changing to /Users/auser/NetBeansProjects/aproject and executing mvn
package works as expected.


Subversion was installed via brew. NetBeans was installed from the

.dmg.


I'm currently at a loss.

Any ideas would be welcome.

. . . just my two cents
/mde/



-
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









-
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



RE: Re: NetBeans 13, subversion, buildnumber plugin, Macintosh failed build

2022-04-11 Thread Alexander Kronenwett
Hello,

I am having the same issue on MacOs 12.3.1 with M1 chip and NetBeans 12.6.
I suppose there is a problem with NetBeans reading the Path variable from
the system, as building works fine in the terminal.

The following workaround made the issue disappear:
# create symlink from homebrew svn to usr local
sudo ln -s /opt/homebrew/bin/svn /usr/local/bin/svn
Quit NetBeans
# add the following lines to the top of netbeans.conf
PATH=$PATH:/usr/local/bin
export PATH

Start NetBeans.

I hope this helps.

Alex

On 2022/03/25 19:36:49 Mark Eggers wrote:
> Hi,
>
> Thanks for responding.
>
> I can't check since the Macintosh user is not around at present.
> However, while reading brew documentation it says that there are soft
> links to /usr/local/bin for all the installations.
>
> If I was writing an installation system, that's how I would do it. That
> way you can upgrade by installing software in one place and moving the
> links. If the upgrade causes grief, you can just move the links back. If
> the upgrade is good, you can then uninstall the older version.
>
> I do that with lots of frequently  upgraded software on my Linux
platforms.
>
> . . . just my two cents
> /mde/
>
> On 3/25/2022 1:08 AM, Juan Miguel Escribano wrote:
> > Hi,
> >
> > I think I installed Subversion with brew too, but my path to it is :
/usr/local/opt/svn/bin
> > ¿Could you check it?
> >
> > Juan Miguel
> >
> >> El 25 mar 2022, a las 0:06, Mark Eggers 
escribió:
> >>
> >> I'm trying to help a user on a Macintosh use NetBeans 13. I do not
have a Macintosh.
> >>
> >> Our pom.xml has the buildnumber-maven-plugin that runs in the validate
phase. It populates some properties (revision and branch) to be added to a
couple of files via resource filtering.
> >>
> >> This works fine on Windows and Linux. It also works fine on the user's
Macintosh on the command line.
> >>
> >> The build failed error only occurs on a Macintosh when running from
aproject->Clean and Build in NetBeans.
> >>
> >> The error happens when executing the following (part of mvn -X):
> >>
> >> Executing: /bin/sh -c cd '/Users/auser/NetBeansProjects/aproject' &&
'svn'
> >> '--username' 'auser' '--password' '*' '--no-auth-cache'
> >> '--non-interactive' 'info'
> >>
> >> The error is:
> >>
> >> Failed to execute goal
> >> org.codehaus.mojo:buildnumber-maven-plugin:3.0.0:create (default) on
> >> project aproject:
> >> Cannot get the revision information from the scm repository :
> >> Exception while executing SCM command.:
> >> Error while executing command.
> >> Error while executing process.
> >> Cannot run program "svn" (in directory
> >> "/Users/auser/NetBeansProjects/aproject"): error=2,
> >> No such file or directory
> >>
> >> aproject->Subversion->Update->Update to HEAD works as expected.
> >>
> >> The Preferences->Team->Subversion->Preferred Client (CLI) has the path
/usr/local/bin.
> >>
> >> Opening a Terminal window in NetBeans (Window->IDE Tools->Terminal),
changing to /Users/auser/NetBeansProjects/aproject and executing mvn
package works as expected.
> >>
> >> Subversion was installed via brew. NetBeans was installed from the
.dmg.
> >>
> >> I'm currently at a loss.
> >>
> >> Any ideas would be welcome.
> >>
> >> . . . just my two cents
> >> /mde/
> >
> >
> > -
> > 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
> >
>
>


Re: [RCP] Setting Window Dimensions and LAF

2022-04-11 Thread Neil C Smith
On Fri, 8 Apr 2022 at 19:28, Amith, Muhammad F
 wrote:
> 2. How do I set the look and feel of the RCP to one of the new Flat LAF?

I'd suggest doing what the IDE itself does, which uses branding but
not the laf property.  It's much simpler.  See the PR that added this
to the IDE, and my own use of this in an RCP application.

https://github.com/apache/netbeans/pull/3332
https://github.com/praxis-live/praxis-live/blob/master/branding/modules/org-netbeans-swing-plaf.jar/org/netbeans/swing/plaf/Bundle.properties

One thing to be aware of, whichever method you use, is that you need a
dependency on org.netbeans.swing.laf.flatlaf in one of your modules to
force the customs to load.  It's a bug IMO that that module is set to
autoload.

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



RE: [RCP] Setting Window Dimensions and LAF

2022-04-11 Thread Giovanni Dal Maso
In your app branding resources folder create a file "laf.properties":
laf=com.formdev.flatlaf.FlatLightLaf

in the same folder create or edit the "layer.xml" file:

http://www.netbeans.org/dtds/filesystem-1_2.dtd>






The app branding folder is something like that:
[RCP_APP_ROOT]\branding\src\main\resources\[path]\branding

Tip: usually you can run your app, configure it as you like and then copy the 
preferences files/content from:
[RCP_APP_ROOT]\application\target\userdir\config
And recreate the same folder/file structure inside the "layer.xml".

HTH

From: Eirik Bakke 
Sent: sabato 9 aprile 2022 02:19
To: Amith, Muhammad F ; users@netbeans.apache.org
Subject: RE: [RCP] Setting Window Dimensions and LAF

1) From a module installer class, something like this:

  @Override
  public void restored() {
WindowManager.getDefault().invokeWhenUIReady(() -> {
  Frame mainWindow = WindowManager.getDefault().getMainWindow();
  mainWindow.setExtendedState(mainWindow.getExtendedState() | 
JFrame.MAXIMIZED_BOTH);
}
}

2) In my own RCP app, I added the line laf=com.formdev.flatlaf.FlatLightLaf to 
platform/config/Preferences/laf.properties in the distributed platform 
application's directory. Though this doesn't work when running the app from the 
IDE during development... let me know if you find a better way.

-- Eirik


From: Amith, Muhammad F 
mailto:muhammad.f.am...@uth.tmc.edu>>
Sent: Friday, April 8, 2022 8:28 PM
To: users@netbeans.apache.org
Subject: [RCP] Setting Window Dimensions and LAF

Hi,

I am working on a RCP-based Netbeans project (v13, Maven-based build). I am 
trying to find how to do the following:

1. How do I set up the initial windows dimension of the RCP app?
2. How do I set the look and feel of the RCP to one of the new Flat LAF?