This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 216276 - Please publish org.netbeans.modules.maven.api
Summary: Please publish org.netbeans.modules.maven.api
Status: REOPENED
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.2
Hardware: All All
: P3 normal (vote)
Assignee: Tomas Stupka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-01 20:02 UTC by mpartel
Modified: 2016-07-10 19:39 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mpartel 2012-08-01 20:02:43 UTC
I need to write a NetBeans plugin that runs Maven tasks. I can do this with org.netbeans.modules.maven.api.execute, but the module is not public.

My use case:
    import org.netbeans.modules.maven.api.execute.RunConfig;
    import org.netbeans.modules.maven.api.execute.RunUtils;

    RunConfig cfg = RunUtils.createRunConfig(projectDir, project, projectName, goals);
    RunUtils.executeMaven(cfg);

As per the FAQ (http://wiki.netbeans.org/DevFaqImplementationDependency) I'm requesting the API be made public.


P.S.

As I understand it, marking the module as an implementation dependency significantly increases the chances my plugin will not work with future NB versions even if source compatibility happens to be retained. I'd really appreciate a stop-gap solution as I'd like to deploy this feature soon.

For the time being, I probably only want it to compile tests. I've failed to find a generic API for this. Is there one?
Comment 1 mpartel 2012-08-01 22:12:49 UTC
I found a kind of workaround. I call ActionProvider.COMMAND_BUILD and wait for it using ActionProgress (introduced in 7.2). This also runs the test and install goals, which I don't want but can probably live with for now.
Comment 2 Milos Kleint 2012-08-12 09:17:47 UTC
the problem with public api is that we would need to make maven.embedder public as well (as we are leaking several classes from the public signatures).

that one in turn exposes several 3rd party apis as public api, but we cannot guarantee backward compatibility there, so most likely every upgrade of maven binaries would mean bumping the major version up, effectively requiring modules to depend on major version ranges, which resembles implementation dependencies in some ways.
Comment 3 Martin Balin 2016-07-07 08:39:05 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss
Comment 4 markiewb 2016-07-10 19:39:20 UTC
Still valid in 8.2 dev 
Product Version: NetBeans IDE Dev (Build 201607100002)