Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[m2e-dev] javascript-maven-plugin-m2e opinions wanted on implementation

Hi all,

I've just completed the first commit of the _javascript_-maven-plugin-m2e, an m2e extension which provides lifecycle support for the _javascript_-maven-plugin [1].
    If anyone would be able to take a quick look at the source code (available online here [2] - with the main class here [3]) and provide feedback it would be much appreciated.
    Does it look like we've used the right approach? Are there things we've done badly or could do better? Any thoughts would be great.

The items I'm most concerned about are:
- I've used MavenSession.getContainer() to get the PlexusContainer, and then I use it to locate our configured extension class instance. I then use reflection to call the afterProjectsRead() method on the extension to configure it (via components.xml and the extension code itself), after which I can inspect the MavenProject to read the dynamically configured dependencies and resource paths. Is there a better way to do this?
- I see a lot of 'Discouraged Access' errors from the PDE. It seems the cause is that the implementation of those classes discourages access because the classes are not part of the public API. Is this something to worry about? I see this on ILifecycleMapping2 for example, which is the interface Igor suggested we could use, so I think it's probably nothing to worry about.

Thanks,
Ben Jones.

[1] http://mojo.codehaus.org/_javascript_-maven-tools/_javascript_-maven-plugin/index.html
[2] https://fisheye.codehaus.org/browse/mojo/trunk/mojo/_javascript_-maven-tools/_javascript_-ide-helpers/_javascript_-maven-plugin-m2e/
[3] https://fisheye.codehaus.org/browse/mojo/trunk/mojo/_javascript_-maven-tools/_javascript_-ide-helpers/_javascript_-maven-plugin-m2e/src/org/codehaus/mojo/_javascript_/m2e/_javascript_MavenToolsLifecycleMapping.java?r=15572


Back to the top