You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by Dmitry Avtonomov <dm...@gmail.com> on 2019/10/28 01:00:48 UTC

Clarify how to use locally built platform with maven

Hello everyone,
This is a continuation thread on using a locally built platform for "NB
Platform App with Maven". I still can't figure out how to produce and
consume maven platform artefacts locally.

Tim has provided this nice script and pom that builds the platform/ide and
installs jars, nbms, poms, whatnot, into local maven repo:
https://github.com/timboudreau/netbeans-local-maven-repo-populator as
RELEASExxx (xxx of your choice).

I ran it with specifying RELEASE123, all went fine and in my local .m2 repo
I see things like
'~\.m2\repository\org\netbeans\modules\org-netbeans-core\RELEASE123'
alongside with RELEASE110, for example, which was downloaded by maven when
I tried building a test app.
Now in IDE 11.2-vc1 I updated maven indexes. Then I try to create a 'Java
with Maven -> NetBeans Application'. The wizard dropdown shows me platforms
:RELEASE90,RELEASE100, RELEASE110, RELEASE111, dev-SNAPSHOT. But not
RELEASE123 which I have just built and which is in my local repo.

I have tried still creating an app selecting RELEASE111 from the dropdown
menu. This action creates 3 projects named:
x-app, x-branding, x-parent. Now in the produced projects "RELEASE111"
literal is found in only one place, in x-parent's pom.xml properties:

<properties><netbeans.version>RELEASE111</netbeans.version>

First I tried x-parent project's "Build with Dependencies". That works and
then I can "Run" the x-app project.

Then tried changing RELEASE111 to RELEASE123 int x-parent's pom and "Build
with Dependencies" again. This time I get errors (warnings) about module
versions:

Warning - could not install some modules:
com.mycompany.mavenproject19.branding - The module
org.netbeans.api.annotations.common was requested in version >= 1.33 but
only 1.32 was found.
Warning - could not install some modules:
mavenproject19-branding - The module Common Annotations was requested in
version >= 1.33 but only 1.32 was found.

But those versions are not listed in pom files anywhere. I understand that
these are implementation versions that I used to specify manually in each
module's properties with the Ant build. If I run the app built with those
warnings, it shows a dialog offering to turn those modules off of course.

When I built my app previously, I downloaded zip files with the platform
from nb website, tweaked the harness, registered all this in "Tools ->
NetBeans Platforms" as a new named platform (e.g. nb-81-with-my-harness)
and then specified that platform name when creating new projects. I want to
switch to maven as I can't do manual dependency resolution anymore, but I
don't see how to consume the self-built platform in that scenario.

People working on their apps, and fixing stuff in the platform as they go
about it, I think, is a good way to get more involvement in the platform
development.

Please help, any input is welcome!
I've seen a few requests on this mailing list recently asking roughly the
same questions about hacking on the NBP itself. I believe that this is in
the save vein - I want to port my application to the new platform and be
able to hack on the platform in case I stumble upon issues. Have not
figured out how to do that with maven yet.

Thank you,
Dmitry

RE: Clarify how to use locally built platform with maven

Posted by Eric Barboni <sk...@apache.org>.
Hi,
 AFAIK, Wizard scan for version in central so your locally build will not be seen. You have to change the pom. The coordinate org.netbeans.api for example are only writable for Apache NetBeans, means that others dev, forks who would like to populated their own should change the groupid. Changing groupid is not very compatible with existing Maven modules, and NetBeans itself (we try once). Apache NetBeans cannot scan for maven central "potential" fork I guess this is too much pain.
 
 I'm not sure how you build your local maven, from git/apache/netbeans master ? or another branch. 
 Did you try to rebuild RELEASE123 artefacts with the script ? Do you delete your .m2.repository.org.netbeans folder to be sure. Or increment version like RELEASE1231 whatever to avoid uncertain rewrite. Comparing manifest of a few RELEASE123 jar and official RELEASE111 may also be nice. 

If you can expose your test project on github would be nice also.

Best Regards
Eric
-----Message d'origine-----
De : Dmitry Avtonomov <dm...@gmail.com> 
Envoyé : lundi 28 octobre 2019 02:01
À : dev@netbeans.apache.org
Objet : Clarify how to use locally built platform with maven

Hello everyone,
This is a continuation thread on using a locally built platform for "NB Platform App with Maven". I still can't figure out how to produce and consume maven platform artefacts locally.

Tim has provided this nice script and pom that builds the platform/ide and installs jars, nbms, poms, whatnot, into local maven repo:
https://github.com/timboudreau/netbeans-local-maven-repo-populator as RELEASExxx (xxx of your choice).

I ran it with specifying RELEASE123, all went fine and in my local .m2 repo I see things like '~\.m2\repository\org\netbeans\modules\org-netbeans-core\RELEASE123'
alongside with RELEASE110, for example, which was downloaded by maven when I tried building a test app.
Now in IDE 11.2-vc1 I updated maven indexes. Then I try to create a 'Java with Maven -> NetBeans Application'. The wizard dropdown shows me platforms :RELEASE90,RELEASE100, RELEASE110, RELEASE111, dev-SNAPSHOT. But not
RELEASE123 which I have just built and which is in my local repo.

I have tried still creating an app selecting RELEASE111 from the dropdown menu. This action creates 3 projects named:
x-app, x-branding, x-parent. Now in the produced projects "RELEASE111"
literal is found in only one place, in x-parent's pom.xml properties:

<properties><netbeans.version>RELEASE111</netbeans.version>

First I tried x-parent project's "Build with Dependencies". That works and then I can "Run" the x-app project.

Then tried changing RELEASE111 to RELEASE123 int x-parent's pom and "Build with Dependencies" again. This time I get errors (warnings) about module
versions:

Warning - could not install some modules:
com.mycompany.mavenproject19.branding - The module org.netbeans.api.annotations.common was requested in version >= 1.33 but only 1.32 was found.
Warning - could not install some modules:
mavenproject19-branding - The module Common Annotations was requested in version >= 1.33 but only 1.32 was found.

But those versions are not listed in pom files anywhere. I understand that these are implementation versions that I used to specify manually in each module's properties with the Ant build. If I run the app built with those warnings, it shows a dialog offering to turn those modules off of course.

When I built my app previously, I downloaded zip files with the platform from nb website, tweaked the harness, registered all this in "Tools -> NetBeans Platforms" as a new named platform (e.g. nb-81-with-my-harness) and then specified that platform name when creating new projects. I want to switch to maven as I can't do manual dependency resolution anymore, but I don't see how to consume the self-built platform in that scenario.

People working on their apps, and fixing stuff in the platform as they go about it, I think, is a good way to get more involvement in the platform development.

Please help, any input is welcome!
I've seen a few requests on this mailing list recently asking roughly the same questions about hacking on the NBP itself. I believe that this is in the save vein - I want to port my application to the new platform and be able to hack on the platform in case I stumble upon issues. Have not figured out how to do that with maven yet.

Thank you,
Dmitry


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

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




RE: Re: Clarify how to use locally built platform with maven

Posted by Eric Barboni <sk...@apache.org>.
Hi Dimitry,

I personally setup  an Apache Archiva (can be done with nexus or others)  that cache maven central and others repository(need configuration). 

Other idea
You build your application using RELEASE112, all the bits needed will go to your local repo.
Once stable you can edit settings.xml and  put <offline>true</offline> so maven will not try to go to internet.
Only when you add a dependency you need a connection to download a missing one and put false to offline.

It's possible to change the way we detect NetBeans artefacts but that needs coding with a new algorithm that IMHO will be insecure (org.netbeans.clusters:platform are known that us,  my.company.clusters:platform may be a dangerous software that is build with artefatcs to mimic NetBeans)

Regards
Eric


-----Message d'origine-----
De : Eric Bresie <eb...@gmail.com> 
Envoyé : mardi 19 novembre 2019 20:08
À : dev@netbeans.apache.org
Objet : Re: Re: Clarify how to use locally built platform with maven

Don’t suppose any of this would help...

https://maven.apache.org/guides/introduction/introduction-to-repositories.html

Eric Bresie
Ebresie@gmail.com
> On November 19, 2019 at 5:30:39 AM CST, Dmitry Avtonomov <dm...@gmail.com> wrote:
> Hi Eric,
> Nothing to be sorry about, but I didn't quite understand your point. 
> It does feel like you know much about the topic though.
> So imagine there's me, wanting to develop a NBP app with maven. How do 
> I go about it without a reliable internet connection? Why is the scan 
> only done on Central and local is skipped? What if Central doesn't exist anymore.
> It's the same situation like it is now with the old Oracle 
> infrastructure, is it?. I have basically experienced that myself. I'm 
> still scrambling to revive the development of my old app now. And I'm 
> still hoping that npb can be used instead of going Electron with a 
> whole shitload of headache to make this happen.
>
> On Tue, Nov 19, 2019 at 2:23 AM Eric Barboni <sk...@apache.org> wrote:
>
> > Hi,
> > Sorry to insist but the wizard will not find your version of NetBeans.
> > Because the scan is done on central only, not in the local repository.
> > The reference version are taken from the following artefatct 
> > org.netbeans.cluster:platform. It doesn't scan the former 
> > bits.netbeans repo too.
> >
> > A user that build his own NetBeans mavenized is not supposed to use 
> > groups like org.netbeans. or org.apache.netbeans because 
> > synchronization with central is limited to Apache NetBeans. That’s 
> > why wizard not have to scan locally because your group should differ.
> >
> > However the nbm-plugin has some hardcoded detection that make it 
> > hard to use (util a fix) outside org.netbeans so keep org.netbeans 
> > group for your own release.
> >
> > Best Regards
> > Eric
> >
> >
> > -----Message d'origine-----
> > De : Tim Boudreau <ni...@gmail.com> Envoyé : mardi 19 novembre 
> > 2019 03:02 À : dev@netbeans.apache.org Objet : Re: Clarify how to 
> > use locally built platform with maven
> >
> > Regardless, all you have to do is set it in the parent pom (ideally 
> > with a good <dependencyManagement> section with everything you're 
> > going to use), and then if the IDE adds <version> to anything, 
> > delete it (really, I think the dependency adding feature should 
> > detect if the library is already referenced from the parent's 
> > <dependencyManagement> section - but Maven can get really weird 
> > about dependencies [add a library with a <scope>provided</scope> 
> > library you already depend on, and it can make the library disappear 
> > from your runtime classpath), so I can imagine that might break things once in a while).
> >
> > -Tim
> >
> > On Mon, Nov 18, 2019 at 8:54 PM Dmitry Avtonomov < 
> > dmitriy.avtonomov@gmail.com> wrote:
> >
> > > Thanks for the suggestion John, I tried both buttons - nothing 
> > > worked for me. I also tried building the complete NBP:
> > >
> > > *ant -Dcluster.config=full build-nozip build-nbms 
> > > build-source-zips
> > > build-javadoc*
> > >
> > > Tried building just the platform:
> > >
> > > *ant -Dcluster.config=platform build-nozip build-nbms 
> > > build-source-zips
> > > build-javadoc*
> > >
> > > None worked.
> > > And I do see the built artifacts in ~/.m2/repository. They are 
> > > right there next to RELEASE110, RELEASE111 etc downloaded by maven 
> > > when I tried building a test app after first installing netbeans.
> > >
> > > The only difference between the downloaded artifacts (like 
> > > RELEASE112) compared to my built ones is that the downloaded ones' 
> > > pom files had the
> > > *<parent>* entry:
> > >
> > > *<parent> <groupId>org.apache.netbeans</* *groupId> 
> > > <artifactId>netbeans-parent</*
> > >
> > > *artifactId> <version>2</version></parent>*
> > >
> > > That parent pom doesn't seem to add anything build-related, it's 
> > > mostly license notices etc. But in the end I added parentGAV 
> > > configuration entry to nb-repository-plugin like this:
> > >
> > >
> > >
> > >
> > >
> > >
> > > *<plugin> <groupId>org.apache.netbeans.utilities</groupId>
> > > <artifactId>nb-repository-plugin</artifactId> 
> > > <version>1.4</version> <configuration> 
> > > <parentGAV>org.apache.netbeans:netbeans-parent:2</parentGAV> ....*
> > >
> > > Now the NetBeans wizard (New Project -> Java with Maven -> 
> > > NetBeans
> > > Application) still does not see my artifacts. But if I still 
> > > create an app with one of the RELEASExxx versions it does see and 
> > > change RELEASExxx in the parent project pom to my version, it seems to work.
> > > At least I don't get build errors as before. I frankly don't know 
> > > what might have changed except for me adding the praentGAV, but it 
> > > does seem to work. In the pom.xml of *...-parent* project created 
> > > by the wizard set netbeans.version to RELEASE1236 (which is locally built):
> > >
> > >
> > >
> > > *<properties> <netbeans.version>RELEASE1236</netbeans.version>
> > > <brandingToken>mavenproject4</brandingToken> </properties>*
> > >
> > > This is a new computer with a fresh install of everything, 
> > > including the OS, so hard to tell.
> > > I also didn't have any luck building+running with Java 11 (tried 
> > > zulu and
> > > adoptopenjdk) so switched everything back to 8.
> > >
> > >
> > >
> > >
> > > On Sun, Nov 17, 2019 at 10:43 AM John Neffenger <jo...@status6.com>
> > wrote:
> > >
> > > > On 11/17/19 2:06 AM, Dmitry Avtonomov wrote:
> > > > > I did do that - there's a button to re-index maven repos afair.
> > > >
> > > > If that's the button in the Options under Java > Maven, I think 
> > > > that just pulls down the latest list from Maven Central again.
> > > >
> > > > Instead, open the Services Window (Ctrl-5), expand Maven 
> > > > Repositories, right-click the entry for Local, and select Update 
> > > > Index to re-index the local repository and save it in the 
> > > > NetBeans
> > cache.
> > > >
> > > > That's how I got NetBeans to recognize the artifacts that I had 
> > > > copied into the local Maven cache when working around NETBEANS-1396.
> > > >
> > > > John
> > > >
> > > > ----------------------------------------------------------------
> > > > ----
> > > > - To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
> > > > For additional commands, e-mail: dev-help@netbeans.apache.org
> > > >
> > > > For further information about the NetBeans mailing lists, visit:
> > > > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lis
> > > > ts
> > > >
> > > >
> > > >
> > > >
> > >
> >
> >
> > --
> > http://timboudreau.com
> >
> >
> > --------------------------------------------------------------------
> > - To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
> > For additional commands, e-mail: dev-help@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: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

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




Re: Re: Clarify how to use locally built platform with maven

Posted by Eric Bresie <eb...@gmail.com>.
Don’t suppose any of this would help...

https://maven.apache.org/guides/introduction/introduction-to-repositories.html

Eric Bresie
Ebresie@gmail.com
> On November 19, 2019 at 5:30:39 AM CST, Dmitry Avtonomov <dm...@gmail.com> wrote:
> Hi Eric,
> Nothing to be sorry about, but I didn't quite understand your point. It
> does feel like you know much about the topic though.
> So imagine there's me, wanting to develop a NBP app with maven. How do I go
> about it without a reliable internet connection? Why is the scan only done
> on Central and local is skipped? What if Central doesn't exist anymore.
> It's the same situation like it is now with the old Oracle infrastructure,
> is it?. I have basically experienced that myself. I'm still scrambling to
> revive the development of my old app now. And I'm still hoping that npb can
> be used instead of going Electron with a whole shitload of headache to make
> this happen.
>
> On Tue, Nov 19, 2019 at 2:23 AM Eric Barboni <sk...@apache.org> wrote:
>
> > Hi,
> > Sorry to insist but the wizard will not find your version of NetBeans.
> > Because the scan is done on central only, not in the local repository.
> > The reference version are taken from the following artefatct
> > org.netbeans.cluster:platform. It doesn't scan the former bits.netbeans
> > repo too.
> >
> > A user that build his own NetBeans mavenized is not supposed to use
> > groups like org.netbeans. or org.apache.netbeans because synchronization
> > with central is limited to Apache NetBeans. That’s why wizard not have to
> > scan locally because your group should differ.
> >
> > However the nbm-plugin has some hardcoded detection that make it hard to
> > use (util a fix) outside org.netbeans so keep org.netbeans group for your
> > own release.
> >
> > Best Regards
> > Eric
> >
> >
> > -----Message d'origine-----
> > De : Tim Boudreau <ni...@gmail.com>
> > Envoyé : mardi 19 novembre 2019 03:02
> > À : dev@netbeans.apache.org
> > Objet : Re: Clarify how to use locally built platform with maven
> >
> > Regardless, all you have to do is set it in the parent pom (ideally with a
> > good <dependencyManagement> section with everything you're going to use),
> > and then if the IDE adds <version> to anything, delete it (really, I think
> > the dependency adding feature should detect if the library is already
> > referenced from the parent's <dependencyManagement> section - but Maven can
> > get really weird about dependencies [add a library with a
> > <scope>provided</scope> library you already depend on, and it can make the
> > library disappear from your runtime classpath), so I can imagine that might
> > break things once in a while).
> >
> > -Tim
> >
> > On Mon, Nov 18, 2019 at 8:54 PM Dmitry Avtonomov <
> > dmitriy.avtonomov@gmail.com> wrote:
> >
> > > Thanks for the suggestion John, I tried both buttons - nothing worked
> > > for me. I also tried building the complete NBP:
> > >
> > > *ant -Dcluster.config=full build-nozip build-nbms build-source-zips
> > > build-javadoc*
> > >
> > > Tried building just the platform:
> > >
> > > *ant -Dcluster.config=platform build-nozip build-nbms
> > > build-source-zips
> > > build-javadoc*
> > >
> > > None worked.
> > > And I do see the built artifacts in ~/.m2/repository. They are right
> > > there next to RELEASE110, RELEASE111 etc downloaded by maven when I
> > > tried building a test app after first installing netbeans.
> > >
> > > The only difference between the downloaded artifacts (like RELEASE112)
> > > compared to my built ones is that the downloaded ones' pom files had
> > > the
> > > *<parent>* entry:
> > >
> > > *<parent> <groupId>org.apache.netbeans</*
> > > *groupId> <artifactId>netbeans-parent</*
> > >
> > > *artifactId> <version>2</version></parent>*
> > >
> > > That parent pom doesn't seem to add anything build-related, it's
> > > mostly license notices etc. But in the end I added parentGAV
> > > configuration entry to nb-repository-plugin like this:
> > >
> > >
> > >
> > >
> > >
> > >
> > > *<plugin> <groupId>org.apache.netbeans.utilities</groupId>
> > > <artifactId>nb-repository-plugin</artifactId> <version>1.4</version>
> > > <configuration>
> > > <parentGAV>org.apache.netbeans:netbeans-parent:2</parentGAV> ....*
> > >
> > > Now the NetBeans wizard (New Project -> Java with Maven -> NetBeans
> > > Application) still does not see my artifacts. But if I still create an
> > > app with one of the RELEASExxx versions it does see and change
> > > RELEASExxx in the parent project pom to my version, it seems to work.
> > > At least I don't get build errors as before. I frankly don't know what
> > > might have changed except for me adding the praentGAV, but it does
> > > seem to work. In the pom.xml of *...-parent* project created by the
> > > wizard set netbeans.version to RELEASE1236 (which is locally built):
> > >
> > >
> > >
> > > *<properties> <netbeans.version>RELEASE1236</netbeans.version>
> > > <brandingToken>mavenproject4</brandingToken> </properties>*
> > >
> > > This is a new computer with a fresh install of everything, including
> > > the OS, so hard to tell.
> > > I also didn't have any luck building+running with Java 11 (tried zulu
> > > and
> > > adoptopenjdk) so switched everything back to 8.
> > >
> > >
> > >
> > >
> > > On Sun, Nov 17, 2019 at 10:43 AM John Neffenger <jo...@status6.com>
> > wrote:
> > >
> > > > On 11/17/19 2:06 AM, Dmitry Avtonomov wrote:
> > > > > I did do that - there's a button to re-index maven repos afair.
> > > >
> > > > If that's the button in the Options under Java > Maven, I think that
> > > > just pulls down the latest list from Maven Central again.
> > > >
> > > > Instead, open the Services Window (Ctrl-5), expand Maven
> > > > Repositories, right-click the entry for Local, and select Update
> > > > Index to re-index the local repository and save it in the NetBeans
> > cache.
> > > >
> > > > That's how I got NetBeans to recognize the artifacts that I had
> > > > copied into the local Maven cache when working around NETBEANS-1396.
> > > >
> > > > John
> > > >
> > > > --------------------------------------------------------------------
> > > > - To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
> > > > For additional commands, e-mail: dev-help@netbeans.apache.org
> > > >
> > > > For further information about the NetBeans mailing lists, visit:
> > > > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> > > >
> > > >
> > > >
> > > >
> > >
> >
> >
> > --
> > http://timboudreau.com
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
> > For additional commands, e-mail: dev-help@netbeans.apache.org
> >
> > For further information about the NetBeans mailing lists, visit:
> > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> >
> >
> >
> >

Re: Clarify how to use locally built platform with maven

Posted by Dmitry Avtonomov <dm...@gmail.com>.
Hi Eric,
Nothing to be sorry about, but I didn't quite understand your point. It
does feel like you know much about the topic though.
So imagine there's me, wanting to develop a NBP app with maven. How do I go
about it without a reliable internet connection? Why is the scan only done
on Central and local is skipped? What if Central doesn't exist anymore.
It's the same situation like it is now with the old Oracle infrastructure,
is it?. I have basically experienced that myself. I'm still scrambling to
revive the development of my old app now. And I'm still hoping that npb can
be used instead of going Electron with a whole shitload of headache to make
this happen.

On Tue, Nov 19, 2019 at 2:23 AM Eric Barboni <sk...@apache.org> wrote:

> Hi,
>  Sorry to insist but the wizard will not find your version of NetBeans.
> Because the scan is done on central only, not in the local repository.
>  The reference version are taken from the following artefatct
> org.netbeans.cluster:platform. It doesn't scan the former bits.netbeans
> repo too.
>
>   A user that build his own NetBeans mavenized is not supposed to use
> groups like  org.netbeans. or org.apache.netbeans because synchronization
> with central is limited to Apache NetBeans. That’s why wizard not have to
> scan locally because your group should differ.
>
> However the nbm-plugin has some hardcoded detection that make it hard to
> use (util a fix) outside org.netbeans so keep org.netbeans group for your
> own release.
>
> Best Regards
> Eric
>
>
> -----Message d'origine-----
> De : Tim Boudreau <ni...@gmail.com>
> Envoyé : mardi 19 novembre 2019 03:02
> À : dev@netbeans.apache.org
> Objet : Re: Clarify how to use locally built platform with maven
>
> Regardless, all you have to do is set it in the parent pom (ideally with a
> good <dependencyManagement> section with everything you're going to use),
> and then if the IDE adds <version> to anything, delete it (really, I think
> the dependency adding feature should detect if the library is already
> referenced from the parent's <dependencyManagement> section - but Maven can
> get really weird about dependencies [add a library with a
> <scope>provided</scope> library you already depend on, and it can make the
> library disappear from your runtime classpath), so I can imagine that might
> break things once in a while).
>
> -Tim
>
> On Mon, Nov 18, 2019 at 8:54 PM Dmitry Avtonomov <
> dmitriy.avtonomov@gmail.com> wrote:
>
> > Thanks for the suggestion John, I tried both buttons - nothing worked
> > for me. I also tried building the complete NBP:
> >
> > *ant -Dcluster.config=full build-nozip build-nbms build-source-zips
> > build-javadoc*
> >
> > Tried building just the platform:
> >
> > *ant -Dcluster.config=platform build-nozip build-nbms
> > build-source-zips
> > build-javadoc*
> >
> > None worked.
> > And I do see the built artifacts in ~/.m2/repository. They are right
> > there next to RELEASE110, RELEASE111 etc downloaded by maven when I
> > tried building a test app after first installing netbeans.
> >
> > The only difference between the downloaded artifacts (like RELEASE112)
> > compared to my built ones is that the downloaded ones' pom files had
> > the
> > *<parent>* entry:
> >
> > *<parent>    <groupId>org.apache.netbeans</*
> > *groupId>    <artifactId>netbeans-parent</*
> >
> > *artifactId>    <version>2</version></parent>*
> >
> > That parent pom doesn't seem to add anything build-related, it's
> > mostly license notices etc. But in the end I added parentGAV
> > configuration entry to nb-repository-plugin like this:
> >
> >
> >
> >
> >
> >
> > *<plugin>  <groupId>org.apache.netbeans.utilities</groupId>
> > <artifactId>nb-repository-plugin</artifactId>  <version>1.4</version>
> > <configuration>
> > <parentGAV>org.apache.netbeans:netbeans-parent:2</parentGAV>      ....*
> >
> > Now the NetBeans wizard (New Project -> Java with Maven -> NetBeans
> > Application) still does not see my artifacts. But if I still create an
> > app with one of the RELEASExxx versions it does see and change
> > RELEASExxx in the parent project pom to my version, it seems to work.
> > At least I don't get build errors as before. I frankly don't know what
> > might have changed except for me adding the praentGAV, but it does
> > seem to work. In the pom.xml of *...-parent* project created by the
> > wizard set netbeans.version to RELEASE1236 (which is locally built):
> >
> >
> >
> > *<properties>        <netbeans.version>RELEASE1236</netbeans.version>
> >   <brandingToken>mavenproject4</brandingToken>    </properties>*
> >
> > This is a new computer with a fresh install of everything, including
> > the OS, so hard to tell.
> > I also didn't have any luck building+running with Java 11 (tried zulu
> > and
> > adoptopenjdk) so switched everything back to 8.
> >
> >
> >
> >
> > On Sun, Nov 17, 2019 at 10:43 AM John Neffenger <jo...@status6.com>
> wrote:
> >
> > > On 11/17/19 2:06 AM, Dmitry Avtonomov wrote:
> > > > I did do that - there's a button to re-index maven repos afair.
> > >
> > > If that's the button in the Options under Java > Maven, I think that
> > > just pulls down the latest list from Maven Central again.
> > >
> > > Instead, open the Services Window (Ctrl-5), expand Maven
> > > Repositories, right-click the entry for Local, and select Update
> > > Index to re-index the local repository and save it in the NetBeans
> cache.
> > >
> > > That's how I got NetBeans to recognize the artifacts that I had
> > > copied into the local Maven cache when working around NETBEANS-1396.
> > >
> > > John
> > >
> > > --------------------------------------------------------------------
> > > - To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
> > > For additional commands, e-mail: dev-help@netbeans.apache.org
> > >
> > > For further information about the NetBeans mailing lists, visit:
> > > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> > >
> > >
> > >
> > >
> >
>
>
> --
> http://timboudreau.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: dev-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>
>

RE: Clarify how to use locally built platform with maven

Posted by Eric Barboni <sk...@apache.org>.
Hi,
 Sorry to insist but the wizard will not find your version of NetBeans. Because the scan is done on central only, not in the local repository.
 The reference version are taken from the following artefatct org.netbeans.cluster:platform. It doesn't scan the former bits.netbeans repo too.

  A user that build his own NetBeans mavenized is not supposed to use groups like  org.netbeans. or org.apache.netbeans because synchronization with central is limited to Apache NetBeans. That’s why wizard not have to scan locally because your group should differ. 

However the nbm-plugin has some hardcoded detection that make it hard to use (util a fix) outside org.netbeans so keep org.netbeans group for your own release.

Best Regards
Eric 


-----Message d'origine-----
De : Tim Boudreau <ni...@gmail.com> 
Envoyé : mardi 19 novembre 2019 03:02
À : dev@netbeans.apache.org
Objet : Re: Clarify how to use locally built platform with maven

Regardless, all you have to do is set it in the parent pom (ideally with a good <dependencyManagement> section with everything you're going to use), and then if the IDE adds <version> to anything, delete it (really, I think the dependency adding feature should detect if the library is already referenced from the parent's <dependencyManagement> section - but Maven can get really weird about dependencies [add a library with a <scope>provided</scope> library you already depend on, and it can make the library disappear from your runtime classpath), so I can imagine that might break things once in a while).

-Tim

On Mon, Nov 18, 2019 at 8:54 PM Dmitry Avtonomov < dmitriy.avtonomov@gmail.com> wrote:

> Thanks for the suggestion John, I tried both buttons - nothing worked 
> for me. I also tried building the complete NBP:
>
> *ant -Dcluster.config=full build-nozip build-nbms build-source-zips
> build-javadoc*
>
> Tried building just the platform:
>
> *ant -Dcluster.config=platform build-nozip build-nbms 
> build-source-zips
> build-javadoc*
>
> None worked.
> And I do see the built artifacts in ~/.m2/repository. They are right 
> there next to RELEASE110, RELEASE111 etc downloaded by maven when I 
> tried building a test app after first installing netbeans.
>
> The only difference between the downloaded artifacts (like RELEASE112) 
> compared to my built ones is that the downloaded ones' pom files had 
> the
> *<parent>* entry:
>
> *<parent>    <groupId>org.apache.netbeans</*
> *groupId>    <artifactId>netbeans-parent</*
>
> *artifactId>    <version>2</version></parent>*
>
> That parent pom doesn't seem to add anything build-related, it's 
> mostly license notices etc. But in the end I added parentGAV 
> configuration entry to nb-repository-plugin like this:
>
>
>
>
>
>
> *<plugin>  <groupId>org.apache.netbeans.utilities</groupId>
> <artifactId>nb-repository-plugin</artifactId>  <version>1.4</version> 
> <configuration>
> <parentGAV>org.apache.netbeans:netbeans-parent:2</parentGAV>      ....*
>
> Now the NetBeans wizard (New Project -> Java with Maven -> NetBeans
> Application) still does not see my artifacts. But if I still create an 
> app with one of the RELEASExxx versions it does see and change 
> RELEASExxx in the parent project pom to my version, it seems to work. 
> At least I don't get build errors as before. I frankly don't know what 
> might have changed except for me adding the praentGAV, but it does 
> seem to work. In the pom.xml of *...-parent* project created by the 
> wizard set netbeans.version to RELEASE1236 (which is locally built):
>
>
>
> *<properties>        <netbeans.version>RELEASE1236</netbeans.version>
>   <brandingToken>mavenproject4</brandingToken>    </properties>*
>
> This is a new computer with a fresh install of everything, including 
> the OS, so hard to tell.
> I also didn't have any luck building+running with Java 11 (tried zulu 
> and
> adoptopenjdk) so switched everything back to 8.
>
>
>
>
> On Sun, Nov 17, 2019 at 10:43 AM John Neffenger <jo...@status6.com> wrote:
>
> > On 11/17/19 2:06 AM, Dmitry Avtonomov wrote:
> > > I did do that - there's a button to re-index maven repos afair.
> >
> > If that's the button in the Options under Java > Maven, I think that 
> > just pulls down the latest list from Maven Central again.
> >
> > Instead, open the Services Window (Ctrl-5), expand Maven 
> > Repositories, right-click the entry for Local, and select Update 
> > Index to re-index the local repository and save it in the NetBeans cache.
> >
> > That's how I got NetBeans to recognize the artifacts that I had 
> > copied into the local Maven cache when working around NETBEANS-1396.
> >
> > John
> >
> > --------------------------------------------------------------------
> > - To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
> > For additional commands, e-mail: dev-help@netbeans.apache.org
> >
> > For further information about the NetBeans mailing lists, visit:
> > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> >
> >
> >
> >
>


--
http://timboudreau.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

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




Re: Clarify how to use locally built platform with maven

Posted by Tim Boudreau <ni...@gmail.com>.
Regardless, all you have to do is set it in the parent pom (ideally with a
good <dependencyManagement> section with everything you're going to use),
and then if the IDE adds <version> to anything, delete it (really, I think
the dependency adding feature should detect if the library is already
referenced from the parent's <dependencyManagement> section - but Maven can
get really weird about dependencies [add a library with a
<scope>provided</scope> library you already depend on, and it can make the
library disappear from your runtime classpath), so I can imagine that might
break things once in a while).

-Tim

On Mon, Nov 18, 2019 at 8:54 PM Dmitry Avtonomov <
dmitriy.avtonomov@gmail.com> wrote:

> Thanks for the suggestion John, I tried both buttons - nothing worked for
> me. I also tried building the complete NBP:
>
> *ant -Dcluster.config=full build-nozip build-nbms build-source-zips
> build-javadoc*
>
> Tried building just the platform:
>
> *ant -Dcluster.config=platform build-nozip build-nbms build-source-zips
> build-javadoc*
>
> None worked.
> And I do see the built artifacts in ~/.m2/repository. They are right there
> next to RELEASE110, RELEASE111 etc downloaded by maven when I tried
> building a test app after first installing netbeans.
>
> The only difference between the downloaded artifacts (like RELEASE112)
> compared to my built ones is that the downloaded ones' pom files had the
> *<parent>* entry:
>
> *<parent>    <groupId>org.apache.netbeans</*
> *groupId>    <artifactId>netbeans-parent</*
>
> *artifactId>    <version>2</version></parent>*
>
> That parent pom doesn't seem to add anything build-related, it's mostly
> license notices etc. But in the end I added parentGAV configuration entry
> to nb-repository-plugin like this:
>
>
>
>
>
>
> *<plugin>  <groupId>org.apache.netbeans.utilities</groupId>
> <artifactId>nb-repository-plugin</artifactId>  <version>1.4</version>
> <configuration>
> <parentGAV>org.apache.netbeans:netbeans-parent:2</parentGAV>      ....*
>
> Now the NetBeans wizard (New Project -> Java with Maven -> NetBeans
> Application) still does not see my artifacts. But if I still create an app
> with one of the RELEASExxx versions it does see and change RELEASExxx in
> the parent project pom to my version, it seems to work. At least I don't
> get build errors as before. I frankly don't know what might have changed
> except for me adding the praentGAV, but it does seem to work. In the
> pom.xml of *...-parent* project created by the wizard set netbeans.version
> to RELEASE1236 (which is locally built):
>
>
>
> *<properties>        <netbeans.version>RELEASE1236</netbeans.version>
>   <brandingToken>mavenproject4</brandingToken>    </properties>*
>
> This is a new computer with a fresh install of everything, including the
> OS, so hard to tell.
> I also didn't have any luck building+running with Java 11 (tried zulu and
> adoptopenjdk) so switched everything back to 8.
>
>
>
>
> On Sun, Nov 17, 2019 at 10:43 AM John Neffenger <jo...@status6.com> wrote:
>
> > On 11/17/19 2:06 AM, Dmitry Avtonomov wrote:
> > > I did do that - there's a button to re-index maven repos afair.
> >
> > If that's the button in the Options under Java > Maven, I think that
> > just pulls down the latest list from Maven Central again.
> >
> > Instead, open the Services Window (Ctrl-5), expand Maven Repositories,
> > right-click the entry for Local, and select Update Index to re-index the
> > local repository and save it in the NetBeans cache.
> >
> > That's how I got NetBeans to recognize the artifacts that I had copied
> > into the local Maven cache when working around NETBEANS-1396.
> >
> > John
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
> > For additional commands, e-mail: dev-help@netbeans.apache.org
> >
> > For further information about the NetBeans mailing lists, visit:
> > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> >
> >
> >
> >
>


-- 
http://timboudreau.com

Re: Clarify how to use locally built platform with maven

Posted by Dmitry Avtonomov <dm...@gmail.com>.
Thanks for the suggestion John, I tried both buttons - nothing worked for
me. I also tried building the complete NBP:

*ant -Dcluster.config=full build-nozip build-nbms build-source-zips
build-javadoc*

Tried building just the platform:

*ant -Dcluster.config=platform build-nozip build-nbms build-source-zips
build-javadoc*

None worked.
And I do see the built artifacts in ~/.m2/repository. They are right there
next to RELEASE110, RELEASE111 etc downloaded by maven when I tried
building a test app after first installing netbeans.

The only difference between the downloaded artifacts (like RELEASE112)
compared to my built ones is that the downloaded ones' pom files had the
*<parent>* entry:

*<parent>    <groupId>org.apache.netbeans</*
*groupId>    <artifactId>netbeans-parent</*

*artifactId>    <version>2</version></parent>*

That parent pom doesn't seem to add anything build-related, it's mostly
license notices etc. But in the end I added parentGAV configuration entry
to nb-repository-plugin like this:






*<plugin>  <groupId>org.apache.netbeans.utilities</groupId>
<artifactId>nb-repository-plugin</artifactId>  <version>1.4</version>
<configuration>
<parentGAV>org.apache.netbeans:netbeans-parent:2</parentGAV>      ....*

Now the NetBeans wizard (New Project -> Java with Maven -> NetBeans
Application) still does not see my artifacts. But if I still create an app
with one of the RELEASExxx versions it does see and change RELEASExxx in
the parent project pom to my version, it seems to work. At least I don't
get build errors as before. I frankly don't know what might have changed
except for me adding the praentGAV, but it does seem to work. In the
pom.xml of *...-parent* project created by the wizard set netbeans.version
to RELEASE1236 (which is locally built):



*<properties>        <netbeans.version>RELEASE1236</netbeans.version>
  <brandingToken>mavenproject4</brandingToken>    </properties>*

This is a new computer with a fresh install of everything, including the
OS, so hard to tell.
I also didn't have any luck building+running with Java 11 (tried zulu and
adoptopenjdk) so switched everything back to 8.




On Sun, Nov 17, 2019 at 10:43 AM John Neffenger <jo...@status6.com> wrote:

> On 11/17/19 2:06 AM, Dmitry Avtonomov wrote:
> > I did do that - there's a button to re-index maven repos afair.
>
> If that's the button in the Options under Java > Maven, I think that
> just pulls down the latest list from Maven Central again.
>
> Instead, open the Services Window (Ctrl-5), expand Maven Repositories,
> right-click the entry for Local, and select Update Index to re-index the
> local repository and save it in the NetBeans cache.
>
> That's how I got NetBeans to recognize the artifacts that I had copied
> into the local Maven cache when working around NETBEANS-1396.
>
> John
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: dev-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>
>

Re: Clarify how to use locally built platform with maven

Posted by John Neffenger <jo...@status6.com>.
On 11/17/19 2:06 AM, Dmitry Avtonomov wrote:
> I did do that - there's a button to re-index maven repos afair.

If that's the button in the Options under Java > Maven, I think that 
just pulls down the latest list from Maven Central again.

Instead, open the Services Window (Ctrl-5), expand Maven Repositories, 
right-click the entry for Local, and select Update Index to re-index the 
local repository and save it in the NetBeans cache.

That's how I got NetBeans to recognize the artifacts that I had copied 
into the local Maven cache when working around NETBEANS-1396.

John

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

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




Re: Clarify how to use locally built platform with maven

Posted by Dmitry Avtonomov <dm...@gmail.com>.
I did do that - there's a button to re-index maven repos afair. I'll try
again from scratch tomorrow.

On Sun, Nov 17, 2019 at 1:06 AM Tim Boudreau <ni...@gmail.com> wrote:

> I think it won’t show up until NetBeans’s reindexes your local repository.
> They eventually did for me. There may be a way to force it to in the
> options dialog (or delete the cache dir so it has to).
>
> -Tim
>
> On Sun, Nov 17, 2019 at 1:12 AM Dmitry Avtonomov <
> dmitriy.avtonomov@gmail.com> wrote:
>
> > But we've been through that already, I did use the repo you're pointing
> to,
> > I changed the version to  RELEASE1234, it did build fine and I see all
> the
> > stuff in my local m2 repo.
> > Then I go to Netbeans IDE, create new maven nbp project, but the wizard
> > only shows me the RELEASExxx that are found on Central. I tried creating
> an
> > app with one of those versions available on Central (e.g. RELEASE111) and
> > then changing all occurrences of RELEASE111 to RELEASE1234, but that
> didn't
> > work. It doesn't want to check the local m2 repo at all.
> >
> > On Sat, Nov 16, 2019 at 8:29 PM Tim Boudreau <ni...@gmail.com>
> wrote:
> >
> > > Use this.  It will build NBMs of all NetBeans modules from a source
> > > checkout and populate your local repo with them.  Just set the version
> > > number to something unique and use that in your dependencies (hopefully
> > as
> > > a property set in one place).  See the readme for details:
> > >
> > > https://github.com/timboudreau/netbeans-local-maven-repo-populator
> > >
> > > -Tim
> > >
> > > On Sat, Nov 16, 2019 at 7:35 PM Dmitry Avtonomov <
> > > dmitriy.avtonomov@gmail.com> wrote:
> > >
> > > > I want to not be dependent on the platform nbms published to Central
> or
> > > any
> > > > other online repository. I want to be able to clone NB sources from
> > > Github,
> > > > disconnect from the internet, and create a maven-based platform app
> > with
> > > > just that. If the platform I build the app against ever becomes
> > > unavailable
> > > > online, I want to still be able to build the app.
> > > >
> > > > Like exactly the same as what Geertjan is showing in the first video
> > from
> > > > [1]: https://youtu.be/VC8gQJknPaU. He builds netbeans from sources,
> > > > registers the built platform using the UI for that in Netbeans IDE
> > (Tools
> > > > -> Netbeans Platforms) and creates a NBP app that uses that
> platform. I
> > > > wanted to do the same, but the maven way.
> > > >
> > > > [1]
> > > https://netbeans.apache.org/participate/build-run-debug-tutorials.html
> > > >
> > > >
> > > >
> > > > On Fri, Nov 15, 2019 at 1:06 PM Tim Boudreau <ni...@gmail.com>
> > > wrote:
> > > >
> > > > > If you mean, have a multi-module parent pom, and some way to run a
> > > module
> > > > > and have all its dependencies be found and included... as far as I
> > > know,
> > > > > there is simply no good way to do that with the nbm-maven-plugin -
> it
> > > is
> > > > a
> > > > > glaring feature gap.
> > > > >
> > > > > The (painful) workaround is to create an nbm-application project,
> > that
> > > > > depends on everything you need, and build and run that (which means
> > > > > rebuilding the entire application structure every time you want to
> > run,
> > > > > which can take several minutes).  Here's an example of that (see
> the
> > > pom
> > > > > and the shell scripts in this dir):
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
> https://github.com/timboudreau/ANTLR4-Plugins-for-NetBeans/tree/master/antlr-suite
> > > > >
> > > > > I've thought about writing a patch for the nbm plugin to do the
> right
> > > > thing
> > > > > - build the application structure in the project's target/ dir,
> find
> > > all
> > > > > dependencies that can be resolved as projects in the reactor and
> only
> > > > > update those that have changed - but I've only got about 2000 other
> > > > things
> > > > > I need to get done in front of that :-/
> > > > >
> > > > > -Tim
> > > > >
> > > >
> > >
> > >
> > > --
> > > http://timboudreau.com
> > >
> >
> --
> http://timboudreau.com
>

Re: Clarify how to use locally built platform with maven

Posted by Tim Boudreau <ni...@gmail.com>.
I think it won’t show up until NetBeans’s reindexes your local repository.
They eventually did for me. There may be a way to force it to in the
options dialog (or delete the cache dir so it has to).

-Tim

On Sun, Nov 17, 2019 at 1:12 AM Dmitry Avtonomov <
dmitriy.avtonomov@gmail.com> wrote:

> But we've been through that already, I did use the repo you're pointing to,
> I changed the version to  RELEASE1234, it did build fine and I see all the
> stuff in my local m2 repo.
> Then I go to Netbeans IDE, create new maven nbp project, but the wizard
> only shows me the RELEASExxx that are found on Central. I tried creating an
> app with one of those versions available on Central (e.g. RELEASE111) and
> then changing all occurrences of RELEASE111 to RELEASE1234, but that didn't
> work. It doesn't want to check the local m2 repo at all.
>
> On Sat, Nov 16, 2019 at 8:29 PM Tim Boudreau <ni...@gmail.com> wrote:
>
> > Use this.  It will build NBMs of all NetBeans modules from a source
> > checkout and populate your local repo with them.  Just set the version
> > number to something unique and use that in your dependencies (hopefully
> as
> > a property set in one place).  See the readme for details:
> >
> > https://github.com/timboudreau/netbeans-local-maven-repo-populator
> >
> > -Tim
> >
> > On Sat, Nov 16, 2019 at 7:35 PM Dmitry Avtonomov <
> > dmitriy.avtonomov@gmail.com> wrote:
> >
> > > I want to not be dependent on the platform nbms published to Central or
> > any
> > > other online repository. I want to be able to clone NB sources from
> > Github,
> > > disconnect from the internet, and create a maven-based platform app
> with
> > > just that. If the platform I build the app against ever becomes
> > unavailable
> > > online, I want to still be able to build the app.
> > >
> > > Like exactly the same as what Geertjan is showing in the first video
> from
> > > [1]: https://youtu.be/VC8gQJknPaU. He builds netbeans from sources,
> > > registers the built platform using the UI for that in Netbeans IDE
> (Tools
> > > -> Netbeans Platforms) and creates a NBP app that uses that platform. I
> > > wanted to do the same, but the maven way.
> > >
> > > [1]
> > https://netbeans.apache.org/participate/build-run-debug-tutorials.html
> > >
> > >
> > >
> > > On Fri, Nov 15, 2019 at 1:06 PM Tim Boudreau <ni...@gmail.com>
> > wrote:
> > >
> > > > If you mean, have a multi-module parent pom, and some way to run a
> > module
> > > > and have all its dependencies be found and included... as far as I
> > know,
> > > > there is simply no good way to do that with the nbm-maven-plugin - it
> > is
> > > a
> > > > glaring feature gap.
> > > >
> > > > The (painful) workaround is to create an nbm-application project,
> that
> > > > depends on everything you need, and build and run that (which means
> > > > rebuilding the entire application structure every time you want to
> run,
> > > > which can take several minutes).  Here's an example of that (see the
> > pom
> > > > and the shell scripts in this dir):
> > > >
> > > >
> > > >
> > >
> >
> https://github.com/timboudreau/ANTLR4-Plugins-for-NetBeans/tree/master/antlr-suite
> > > >
> > > > I've thought about writing a patch for the nbm plugin to do the right
> > > thing
> > > > - build the application structure in the project's target/ dir, find
> > all
> > > > dependencies that can be resolved as projects in the reactor and only
> > > > update those that have changed - but I've only got about 2000 other
> > > things
> > > > I need to get done in front of that :-/
> > > >
> > > > -Tim
> > > >
> > >
> >
> >
> > --
> > http://timboudreau.com
> >
>
-- 
http://timboudreau.com

Re: Clarify how to use locally built platform with maven

Posted by Dmitry Avtonomov <dm...@gmail.com>.
But we've been through that already, I did use the repo you're pointing to,
I changed the version to  RELEASE1234, it did build fine and I see all the
stuff in my local m2 repo.
Then I go to Netbeans IDE, create new maven nbp project, but the wizard
only shows me the RELEASExxx that are found on Central. I tried creating an
app with one of those versions available on Central (e.g. RELEASE111) and
then changing all occurrences of RELEASE111 to RELEASE1234, but that didn't
work. It doesn't want to check the local m2 repo at all.

On Sat, Nov 16, 2019 at 8:29 PM Tim Boudreau <ni...@gmail.com> wrote:

> Use this.  It will build NBMs of all NetBeans modules from a source
> checkout and populate your local repo with them.  Just set the version
> number to something unique and use that in your dependencies (hopefully as
> a property set in one place).  See the readme for details:
>
> https://github.com/timboudreau/netbeans-local-maven-repo-populator
>
> -Tim
>
> On Sat, Nov 16, 2019 at 7:35 PM Dmitry Avtonomov <
> dmitriy.avtonomov@gmail.com> wrote:
>
> > I want to not be dependent on the platform nbms published to Central or
> any
> > other online repository. I want to be able to clone NB sources from
> Github,
> > disconnect from the internet, and create a maven-based platform app with
> > just that. If the platform I build the app against ever becomes
> unavailable
> > online, I want to still be able to build the app.
> >
> > Like exactly the same as what Geertjan is showing in the first video from
> > [1]: https://youtu.be/VC8gQJknPaU. He builds netbeans from sources,
> > registers the built platform using the UI for that in Netbeans IDE (Tools
> > -> Netbeans Platforms) and creates a NBP app that uses that platform. I
> > wanted to do the same, but the maven way.
> >
> > [1]
> https://netbeans.apache.org/participate/build-run-debug-tutorials.html
> >
> >
> >
> > On Fri, Nov 15, 2019 at 1:06 PM Tim Boudreau <ni...@gmail.com>
> wrote:
> >
> > > If you mean, have a multi-module parent pom, and some way to run a
> module
> > > and have all its dependencies be found and included... as far as I
> know,
> > > there is simply no good way to do that with the nbm-maven-plugin - it
> is
> > a
> > > glaring feature gap.
> > >
> > > The (painful) workaround is to create an nbm-application project, that
> > > depends on everything you need, and build and run that (which means
> > > rebuilding the entire application structure every time you want to run,
> > > which can take several minutes).  Here's an example of that (see the
> pom
> > > and the shell scripts in this dir):
> > >
> > >
> > >
> >
> https://github.com/timboudreau/ANTLR4-Plugins-for-NetBeans/tree/master/antlr-suite
> > >
> > > I've thought about writing a patch for the nbm plugin to do the right
> > thing
> > > - build the application structure in the project's target/ dir, find
> all
> > > dependencies that can be resolved as projects in the reactor and only
> > > update those that have changed - but I've only got about 2000 other
> > things
> > > I need to get done in front of that :-/
> > >
> > > -Tim
> > >
> >
>
>
> --
> http://timboudreau.com
>

Re: Clarify how to use locally built platform with maven

Posted by Tim Boudreau <ni...@gmail.com>.
Use this.  It will build NBMs of all NetBeans modules from a source
checkout and populate your local repo with them.  Just set the version
number to something unique and use that in your dependencies (hopefully as
a property set in one place).  See the readme for details:

https://github.com/timboudreau/netbeans-local-maven-repo-populator

-Tim

On Sat, Nov 16, 2019 at 7:35 PM Dmitry Avtonomov <
dmitriy.avtonomov@gmail.com> wrote:

> I want to not be dependent on the platform nbms published to Central or any
> other online repository. I want to be able to clone NB sources from Github,
> disconnect from the internet, and create a maven-based platform app with
> just that. If the platform I build the app against ever becomes unavailable
> online, I want to still be able to build the app.
>
> Like exactly the same as what Geertjan is showing in the first video from
> [1]: https://youtu.be/VC8gQJknPaU. He builds netbeans from sources,
> registers the built platform using the UI for that in Netbeans IDE (Tools
> -> Netbeans Platforms) and creates a NBP app that uses that platform. I
> wanted to do the same, but the maven way.
>
> [1] https://netbeans.apache.org/participate/build-run-debug-tutorials.html
>
>
>
> On Fri, Nov 15, 2019 at 1:06 PM Tim Boudreau <ni...@gmail.com> wrote:
>
> > If you mean, have a multi-module parent pom, and some way to run a module
> > and have all its dependencies be found and included... as far as I know,
> > there is simply no good way to do that with the nbm-maven-plugin - it is
> a
> > glaring feature gap.
> >
> > The (painful) workaround is to create an nbm-application project, that
> > depends on everything you need, and build and run that (which means
> > rebuilding the entire application structure every time you want to run,
> > which can take several minutes).  Here's an example of that (see the pom
> > and the shell scripts in this dir):
> >
> >
> >
> https://github.com/timboudreau/ANTLR4-Plugins-for-NetBeans/tree/master/antlr-suite
> >
> > I've thought about writing a patch for the nbm plugin to do the right
> thing
> > - build the application structure in the project's target/ dir, find all
> > dependencies that can be resolved as projects in the reactor and only
> > update those that have changed - but I've only got about 2000 other
> things
> > I need to get done in front of that :-/
> >
> > -Tim
> >
>


-- 
http://timboudreau.com

Re: Clarify how to use locally built platform with maven

Posted by Dmitry Avtonomov <dm...@gmail.com>.
I want to not be dependent on the platform nbms published to Central or any
other online repository. I want to be able to clone NB sources from Github,
disconnect from the internet, and create a maven-based platform app with
just that. If the platform I build the app against ever becomes unavailable
online, I want to still be able to build the app.

Like exactly the same as what Geertjan is showing in the first video from
[1]: https://youtu.be/VC8gQJknPaU. He builds netbeans from sources,
registers the built platform using the UI for that in Netbeans IDE (Tools
-> Netbeans Platforms) and creates a NBP app that uses that platform. I
wanted to do the same, but the maven way.

[1] https://netbeans.apache.org/participate/build-run-debug-tutorials.html



On Fri, Nov 15, 2019 at 1:06 PM Tim Boudreau <ni...@gmail.com> wrote:

> If you mean, have a multi-module parent pom, and some way to run a module
> and have all its dependencies be found and included... as far as I know,
> there is simply no good way to do that with the nbm-maven-plugin - it is a
> glaring feature gap.
>
> The (painful) workaround is to create an nbm-application project, that
> depends on everything you need, and build and run that (which means
> rebuilding the entire application structure every time you want to run,
> which can take several minutes).  Here's an example of that (see the pom
> and the shell scripts in this dir):
>
>
> https://github.com/timboudreau/ANTLR4-Plugins-for-NetBeans/tree/master/antlr-suite
>
> I've thought about writing a patch for the nbm plugin to do the right thing
> - build the application structure in the project's target/ dir, find all
> dependencies that can be resolved as projects in the reactor and only
> update those that have changed - but I've only got about 2000 other things
> I need to get done in front of that :-/
>
> -Tim
>

Re: Clarify how to use locally built platform with maven

Posted by Tim Boudreau <ni...@gmail.com>.
If you mean, have a multi-module parent pom, and some way to run a module
and have all its dependencies be found and included... as far as I know,
there is simply no good way to do that with the nbm-maven-plugin - it is a
glaring feature gap.

The (painful) workaround is to create an nbm-application project, that
depends on everything you need, and build and run that (which means
rebuilding the entire application structure every time you want to run,
which can take several minutes).  Here's an example of that (see the pom
and the shell scripts in this dir):

https://github.com/timboudreau/ANTLR4-Plugins-for-NetBeans/tree/master/antlr-suite

I've thought about writing a patch for the nbm plugin to do the right thing
- build the application structure in the project's target/ dir, find all
dependencies that can be resolved as projects in the reactor and only
update those that have changed - but I've only got about 2000 other things
I need to get done in front of that :-/

-Tim