nbm-maven-plugin

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

nbm-maven-plugin

Damian O'Neill
Hi Guys, I was looking for an example of multibranding using the plugin.  Specifically I would like to create multiple brands for a netbeans platform application and based on the brandingToken build one or the other. 

Using Netbeans 7.3.1 I created a sample project, this created a branding module which contains directories in src/main called; nbm, nbm-branding and resources.  I copied the nbm-branding directory (contains branding content) and renamed to new brand name and then supplied this as the brandingToken on the command line.  

Unfortunately this wasn’t picked up.  

Could any provide instructions on how to do this or point me at a repo that contains an example. 

Thanks in advance. 

Regards,
Damian.


Reply | Threaded
Open this post in threaded view
|

Re: nbm-maven-plugin

Milos Kleint-3
you will need to create a module project per branding and include them
all into your application.

Milos

On Fri, Oct 11, 2013 at 2:17 PM, Damian O'Neill <[hidden email]> wrote:

> Hi Guys, I was looking for an example of multibranding using the plugin.
> Specifically I would like to create multiple brands for a netbeans platform
> application and based on the brandingToken build one or the other.
>
> Using Netbeans 7.3.1 I created a sample project, this created a branding
> module which contains directories in src/main called; nbm, nbm-branding and
> resources.  I copied the nbm-branding directory (contains branding content)
> and renamed to new brand name and then supplied this as the brandingToken on
> the command line.
>
> Unfortunately this wasn’t picked up.
>
> Could any provide instructions on how to do this or point me at a repo that
> contains an example.
>
> Thanks in advance.
>
> Regards,
> Damian.
>
>

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: nbm-maven-plugin

Damian O'Neill
Thanks Milos, if I create a nbm for each branding (with the same structure
as the branding module) and associate each with the application module,
how/where does the brandingToken name get defined?

Regards,
Damian.





On 11/10/2013 13:43, "Milos Kleint" <[hidden email]> wrote:

you will need to create a module project per branding and include them
all into your application.

Milos

On Fri, Oct 11, 2013 at 2:17 PM, Damian O'Neill <[hidden email]>
wrote:

> Hi Guys, I was looking for an example of multibranding using the plugin.
> Specifically I would like to create multiple brands for a netbeans
>platform
> application and based on the brandingToken build one or the other.
>
> Using Netbeans 7.3.1 I created a sample project, this created a branding
> module which contains directories in src/main called; nbm, nbm-branding
>and
> resources.  I copied the nbm-branding directory (contains branding
>content)
> and renamed to new brand name and then supplied this as the
>brandingToken on
> the command line.
>
> Unfortunately this wasn¹t picked up.
>
> Could any provide instructions on how to do this or point me at a repo
>that
> contains an example.
>
> Thanks in advance.
>
> Regards,
> Damian.
>
>

---------------------------------------------------------------------
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 | Threaded
Open this post in threaded view
|

Re: nbm-maven-plugin

Milos Kleint-3
brandingToken is used when assembling the app (eg. to rename the
bin/*.exe executables etc.)
http://mojo.codehaus.org/nbm-maven/nbm-maven-plugin/cluster-app-mojo.html#brandingToken

So let's say you create 2 profiles in nbm-application project with
the branding module in
<dependencies>
and <brandingToken> configuration setup.

then you jut activate the appropriate profile and things should just build.

Milos



On Fri, Oct 11, 2013 at 3:47 PM, Damian O'Neill <[hidden email]> wrote:

> Thanks Milos, if I create a nbm for each branding (with the same structure
> as the branding module) and associate each with the application module,
> how/where does the brandingToken name get defined?
>
> Regards,
> Damian.
>
>
>
>
>
> On 11/10/2013 13:43, "Milos Kleint" <[hidden email]> wrote:
>
> you will need to create a module project per branding and include them
> all into your application.
>
> Milos
>
> On Fri, Oct 11, 2013 at 2:17 PM, Damian O'Neill <[hidden email]>
> wrote:
>> Hi Guys, I was looking for an example of multibranding using the plugin.
>> Specifically I would like to create multiple brands for a netbeans
>>platform
>> application and based on the brandingToken build one or the other.
>>
>> Using Netbeans 7.3.1 I created a sample project, this created a branding
>> module which contains directories in src/main called; nbm, nbm-branding
>>and
>> resources.  I copied the nbm-branding directory (contains branding
>>content)
>> and renamed to new brand name and then supplied this as the
>>brandingToken on
>> the command line.
>>
>> Unfortunately this wasn¹t picked up.
>>
>> Could any provide instructions on how to do this or point me at a repo
>>that
>> contains an example.
>>
>> Thanks in advance.
>>
>> Regards,
>> Damian.
>>
>>
>
> ---------------------------------------------------------------------
> 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
>
>

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: nbm-maven-plugin

Damian O'Neill
Thankyou Milos, I went through this procedure this morning and it works as
you describe.

For those that are interested, to clarify the steps.

1. Create a Netbeans Sample Maven project. File -> New Proj -> Maven ->
Netbeans Application

This creates a multimodule project with two (optional three) child
modules; application, branding and optionally client-sample

2. Right mouse on the client-branding module and Copy… this will create a
new module with your chosen name.

3. Modify the branding contents under this new module.

4. Open the application module's pom.xml and add two profiles, one each
for your two brands.  For e.g.

<profile>
            <id>pepsi</id>
            <dependencies>
                <dependency>
                    <groupId>org.netbeans.cluster</groupId>
                    <artifactId>platform</artifactId>
                    <version>${netbeans.version}</version>
                    <type>pom</type>
                </dependency>
                <!-- NbModuleSuite functional in RELEASE70 or later: -->
                <dependency>
                    <groupId>org.netbeans.api</groupId>
                    <artifactId>org-netbeans-modules-nbjunit</artifactId>
                    <version>${netbeans.version}</version>
                    <scope>test</scope> <!-- beyond platform cluster, this
often needs to be dropped down to compile/runtime, some other modules in
IDE clusters depend on it -->
                </dependency>
                <!-- To use Jelly Tools in your functional tests, add or
replace with:
                <dependency>
                    <groupId>org.netbeans.api</groupId>
                   
<artifactId>org-netbeans-modules-jellytools-platform</artifactId>
                    <version>${netbeans.version}</version>
                    <scope>test</scope>
                </dependency>
                -->
                <dependency>
                    <groupId>${project.groupId}</groupId>
                    <artifactId>client-sample</artifactId>
                    <version>${project.version}</version>
                </dependency>
                <dependency>
                    <groupId>${project.groupId}</groupId>
                    <artifactId>client-pepsi-branding</artifactId>
                    <version>${project.version}</version>
                </dependency>
            </dependencies>
        </profile>


5. In the applications module's pom.xml remove the standard dependency
section from build as this is now covered by your profiles.



6. When completed, you can build and run the application using the
profile.

$ mvn clean install -Ppepsi; cd application; mvn nbm:run-platform

Regards,
Damian.





On 11/10/2013 15:01, "Milos Kleint" <[hidden email]> wrote:

brandingToken is used when assembling the app (eg. to rename the
bin/*.exe executables etc.)
http://mojo.codehaus.org/nbm-maven/nbm-maven-plugin/cluster-app-mojo.html#b
randingToken

So let's say you create 2 profiles in nbm-application project with
the branding module in
<dependencies>
and <brandingToken> configuration setup.

then you jut activate the appropriate profile and things should just build.

Milos



On Fri, Oct 11, 2013 at 3:47 PM, Damian O'Neill <[hidden email]>
wrote:

> Thanks Milos, if I create a nbm for each branding (with the same
>structure
> as the branding module) and associate each with the application module,
> how/where does the brandingToken name get defined?
>
> Regards,
> Damian.
>
>
>
>
>
> On 11/10/2013 13:43, "Milos Kleint" <[hidden email]> wrote:
>
> you will need to create a module project per branding and include them
> all into your application.
>
> Milos
>
> On Fri, Oct 11, 2013 at 2:17 PM, Damian O'Neill <[hidden email]>
> wrote:
>> Hi Guys, I was looking for an example of multibranding using the plugin.
>> Specifically I would like to create multiple brands for a netbeans
>>platform
>> application and based on the brandingToken build one or the other.
>>
>> Using Netbeans 7.3.1 I created a sample project, this created a branding
>> module which contains directories in src/main called; nbm, nbm-branding
>>and
>> resources.  I copied the nbm-branding directory (contains branding
>>content)
>> and renamed to new brand name and then supplied this as the
>>brandingToken on
>> the command line.
>>
>> Unfortunately this wasn¹t picked up.
>>
>> Could any provide instructions on how to do this or point me at a repo
>>that
>> contains an example.
>>
>> Thanks in advance.
>>
>> Regards,
>> Damian.
>>
>>
>
> ---------------------------------------------------------------------
> 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
>
>

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

    http://xircles.codehaus.org/manage_email