Skip to content

Conversation

Copy link

Copilot AI commented Nov 11, 2025

Converts the Ant-based PluginTask from builder/src/builder/org/jnode/build/PluginTask.java to a Maven plugin. This enables plugin building in Maven-based workflows without Ant dependency.

Implementation

Created jnode-maven-plugin/ module containing:

  • PluginBuildMojo - Maven equivalent of PluginTask

    • Parses plugin descriptor XMLs via NanoXML
    • Generates plugin JARs with OSGi manifests (Bundle-SymbolicName, Bundle-Version)
    • Parallel building via ThreadPoolExecutor
    • Incremental builds (timestamp-based)
  • Dependencies - Uses build-time plugin classes from mavenizer/src/main/endorsed

    • Avoids runtime VM dependencies (org.jnode.vm.*)
    • Includes Factory, PluginDescriptor, Library, Runtime model classes

Configuration

<plugin>
    <groupId>org.jnode</groupId>
    <artifactId>jnode-maven-plugin</artifactId>
    <version>1.0-SNAPSHOT</version>
    <configuration>
        <descriptorsDirectory>${basedir}/descriptors</descriptorsDirectory>
        <outputDirectory>${project.build.directory}/plugins</outputDirectory>
        <pluginDirectory>${project.build.directory}/classes</pluginDirectory>
        <libraryAliases>
            <jnode-core.jar>${jnode-core.jar}</jnode-core.jar>
        </libraryAliases>
    </configuration>
</plugin>

Limitations

  • Library export/exclude filtering partially implemented (placeholder in addLibraryToJar())
  • Packager subtasks not converted (can be added if needed)
Original prompt

First, read documentation in docs/plugins directory of JNode project to understand how JNode plugins work.
jnode-.jar are not a real jar at runtime, they are only there to represent at build time all classes of the sub projects of jnode (fs, core, gui ...).
Example : jnode-fs.jar represents all classes of the fs sub project of jnode.

Then convert the nat task in builder/src/builder/org/jnode/build/PluginTask.java to maven


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 4 commits November 11, 2025 09:09
Co-authored-by: fduminy <143904+fduminy@users.noreply.github.com>
Co-authored-by: fduminy <143904+fduminy@users.noreply.github.com>
Co-authored-by: fduminy <143904+fduminy@users.noreply.github.com>
Co-authored-by: fduminy <143904+fduminy@users.noreply.github.com>
Copilot AI changed the title [WIP] Convert nat task in PluginTask.java to Maven Convert Ant PluginTask to Maven plugin Nov 11, 2025
Copilot AI requested a review from fduminy November 11, 2025 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants