On Mon, Mar 22, 2010 at 1:39 PM, Milos Kleint <[email protected]> wrote:
> that's weird, as the -J-ea and -J-Dnetbeans.logger.console=true parameter
> shall have enabled the console printing..
> can you try
> 1. not via maven in the IDE, but on the console?
> 2. not via maven at all, but just by running the netbeans.exe?
> if either of those works (or if none works and you make something else work)
> , please file an issue against the nbm plugin.
> Thanks.
> Milos
>

I create a new netbeans module project (new project->Maven
Project->Maven NetBeans Module Archetype), build it and try to run it.
The module complains about missing path to netbeans in pom
(<netbeansInstallation>VALUE</netbeansInstallation>), I add it,
rebuild and run it.

In the output window or the netbeans I am running module from appears
following output:

         NetBeans: Executing '"C:\Program Files\Apache Software
Foundation\apache-maven-2.2.1\bin\mvn.bat" -Dnetbeans.execution=true
nbm:cluster nbm:run-ide'
         NetBeans:      JAVA_HOME=C:\Program Files\Java\jdk1.6.0_03
         Scanning for projects...
         
------------------------------------------------------------------------
         Building Netbeans Module TestModule
            task-segment: [nbm:cluster, nbm:run-ide] (aggregator-style)
         
------------------------------------------------------------------------
         [nbm:cluster]
         Created NetBeans module cluster(s) at
D:\TestModule\target\netbeans_clusters
         [nbm:run]
         Additional arguments=null
               --userdir
               D:\TestModule\target\userdir
               -J-Dnetbeans.logger.console=true
               -J-ea
         Executing: cmd.exe /X /C ""c:\Program files\NetBeans
6.8\bin\netbeans.exe" --userdir D:\TestModule\target\userdir
-J-Dnetbeans.logger.console=true -J-ea"
         
------------------------------------------------------------------------
         BUILD SUCCESSFUL
         
------------------------------------------------------------------------
         Total time: 13 seconds
         Finished at: Mon Mar 22 17:40:09 CET 2010
         Final Memory: 5M/11M
         
------------------------------------------------------------------------

As you can see, there is are no log outputs.

If I try to run it (the cmd.exe /X /C .... command) in console or
through Start->Run... the console window appears with stuff I expect

        Microsoft Windows XP [Verze 5.1.2600]
        (C) Copyright 1985-2001 Microsoft Corp.

        C:\Documents and Settings\Admin>cmd.exe /X /C ""c:\Program
files\NetBeans 6.8\bin\netbeans.exe" --userdir
D:\TestModule\target\userdir -J-Dnetbeans.logger.console=true -J-ea"


        The launcher has determined that the parent process has a
console and will reuse it for its own console output. Closing
        the console will result in termination of the running program.
        Use '--console suppress' to suppress console output.
        Use '--console new' to create a separate console window.
        
-------------------------------------------------------------------------------
        >Log Session: Monday, March 22, 2010 5:56:21 PM CET
        >System Info:
          Product Version         = NetBeans IDE 6.8 (Build
200912041610) (#ec9be6a6486c)
          Operating System        = Windows XP version 5.1 running on x86
          Java; VM; Vendor        = 1.6.0_03; Java HotSpot(TM) Client
VM 1.6.0_03-b05; Sun Microsystems Inc.
          Runtime                 = Java(TM) SE Runtime Environment 1.6.0_03-b05
          Java Home               = C:\Program Files\Java\jdk1.6.0_03\jre
          System Locale; Encoding = cs_CZ (nb); Cp1250
          Home Directory          = C:\Documents and Settings\Admin
          Current Directory       = C:\Documents and Settings\Admin
          User Directory          = D:\TestModule\target\userdir
          Installation            = C:\Program Files\NetBeans 6.8\nb6.8
                                    C:\Program Files\NetBeans 6.8\ide12
                                    C:\Program Files\NetBeans 6.8\java3
                                    C:\Program Files\NetBeans 6.8\apisupport1
                                    C:\Program Files\NetBeans 6.8\websvccommon1
                                    C:\Program Files\NetBeans 6.8\profiler3
                                    C:\Program Files\NetBeans 6.8\harness
                                    C:\Program Files\NetBeans 6.8\foobar

D:\TestModule\target\netbeans_clusters\maven1
                                    c:\Program files\NetBeans 6.8\platform11
          Boot & Ext. Classpath   = C:\Program
Files\Java\jdk1.6.0_03\jre\lib\resources.jar;C:\Program
Files\Java\jdk1.6.0_03\jr
        e\lib\rt.jar;C:\Program
Files\Java\jdk1.6.0_03\jre\lib\sunrsasign.jar;C:\Program
Files\Java\jdk1.6.0_03\jre\lib\jsse.jar
        ....
        ....
        Non heap memory usage: initial 32,2MB maximum 232,0MB
        Garbage collector: Copy (Collections=72 Total time spent=0s)
        Garbage collector: MarkSweepCompact (Collections=1 Total time spent=0s)
        Classes: loaded=4840 total loaded=4840 unloaded 0
        INFO [org.netbeans.core.ui.warmup.DiagnosticTask]: Total
memory 2á145á824á768
        INFO [org.netbeans.modules.autoupdate.updateprovider.AutoupdateCatalog]:
No content in cache for URL_Standard provider.
        Returns EMPTY_MAP



When I run netbeans by itself, I get following (no logs or anything)

        C:\Program Files\NetBeans 6.8\bin>netbeans.exe
        C:\Program Files\NetBeans 6.8\bin>

        The launcher has determined that the parent process has a
console and will reuse it for its own console output. Closing
        the console will result in termination of the running program.
        Use '--console suppress' to suppress console output.
        Use '--console new' to create a separate console window.

        C:\Program Files\NetBeans 6.8\bin>

It's possible that I have misdescribed the problem, it is not the
problem with maven itself, but with the goal run-ide in
nbm-maven-plugin (at least I think so). To clarify: I want to see the
the log output (not only netbeans logs, but mainly my own) I can see
when I run the module from the console in the output window when I run
the module from NetBeans.

I guess the console can count as working so I filled bug
http://jira.codehaus.org/browse/MNBMODULE-78

Honza



> 2010/3/17 Honza Havlíček <[email protected]>
>>
>> Hello,
>> I am trying to move our project from ant based netbeans modules to
>> maven netbeans modules, but when I was using the ant based, System.out
>> and System.err were printed into the output window of the platform I
>> was developing the module from. I
>>
>> When I use nbm:run-ide goal, Maven executed something like
>>
>> cmd.exe /X /C ""c:\Program Files\NetBeans 6.8\bin\netbeans.exe"
>> --userdir E:\TestApp\target\userdir -J-Dnetbeans.logger.console=true
>> -J-ea"
>>
>> and no output is shown in the output window of the netbeans I am
>> developing from. I can get the output in log directory of module (like
>> TestApp\target\userdir\var\log\messages.log ), but I want to see it in
>> output window just like before.
>>
>> Is there a way to achieve that?
>>
>> Thanks in advance
>> Honza
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to