Skip to content

Conversation

@romain-grecourt
Copy link
Contributor

@romain-grecourt romain-grecourt commented Mar 26, 2021

Fix and improve plugins execution:

  • Use org.graalvm.nativeimage.ImageInfo.inImageRuntimeCode()
  • if in native-image spawn the execution, otherwise do it in-jvm.

Only bundle the plugin JAR as a resource in the native-image binary

  • stage it under target/native instead of target/classes
  • use manual class-path for native-image to include target/native

Replace BuildToolsProperties with Config.buildProperties and static method for buildVersion and buildRevision

  • This ensures that the file name of the plugin JAR bundled in the CLI will NEVER be out of sync.

Make all classes under plugin non public, except the Plugin class.

Fixes #370
Fixes #371

…able.

Make PluginFailed a runtime exception instead of a checked exception
Update Metadata to remove all the un-necessary exception handling
Wrap IOException with UncheckedIOException where needed
Add a builder to Metadata.
Remove InitCommandSimpleTest
Update MetadataAccessTest to remove the assertions related to forked plugin execution.
 - Use org.graalvm.nativeimage.ImageInfo.inImageRuntimeCode()
 - if in native-image spawn the execution, otherwise do it in-jvm.

Only bundle the plugin JAR as a resource in the native-image binary
 - stage it under target/native instead of target/classes
 - use manual class-path for native-image to include target/native

Replace BuildToolsProperties with Config.buildProperties and static method for buildVersion and buildRevision
 - This ensures that the file name of the plugin JAR bundled in the CLI will NEVER be out of sync.

Make all classes under plugin non public, except the Plugin class.
@romain-grecourt romain-grecourt changed the title Build info props cli Fix and improve plugins execution Mar 26, 2021
@romain-grecourt romain-grecourt changed the title Fix and improve plugins execution Fix and improve plugins Mar 26, 2021
@romain-grecourt romain-grecourt merged commit e9fbd1f into helidon-io:master Mar 26, 2021
@romain-grecourt romain-grecourt deleted the build-info-props-cli branch March 26, 2021 18:25
romain-grecourt added a commit to romain-grecourt/helidon-build-tools that referenced this pull request Apr 27, 2021
* Add support for embedded plugin execution if the plugin class is loadable.
Make PluginFailed a runtime exception instead of a checked exception
Update Metadata to remove all the un-necessary exception handling
Wrap IOException with UncheckedIOException where needed
Add a builder to Metadata.
Remove InitCommandSimpleTest
Update MetadataAccessTest to remove the assertions related to forked plugin execution.

* Fix and improve plugins execution:
 - Use org.graalvm.nativeimage.ImageInfo.inImageRuntimeCode()
 - if in native-image spawn the execution, otherwise do it in-jvm.

Only bundle the plugin JAR as a resource in the native-image binary
 - stage it under target/native instead of target/classes
 - use manual class-path for native-image to include target/native

Replace BuildToolsProperties with Config.buildProperties and static method for buildVersion and buildRevision
 - This ensures that the file name of the plugin JAR bundled in the CLI will NEVER be out of sync.

Make all classes under plugin non public, except the Plugin class.

(cherry picked from commit e9fbd1f)
romain-grecourt added a commit that referenced this pull request Apr 28, 2021
* Add support for embedded plugin execution if the plugin class is loadable.
Make PluginFailed a runtime exception instead of a checked exception
Update Metadata to remove all the un-necessary exception handling
Wrap IOException with UncheckedIOException where needed
Add a builder to Metadata.
Remove InitCommandSimpleTest
Update MetadataAccessTest to remove the assertions related to forked plugin execution.

* Fix and improve plugins execution:
 - Use org.graalvm.nativeimage.ImageInfo.inImageRuntimeCode()
 - if in native-image spawn the execution, otherwise do it in-jvm.

Only bundle the plugin JAR as a resource in the native-image binary
 - stage it under target/native instead of target/classes
 - use manual class-path for native-image to include target/native

Replace BuildToolsProperties with Config.buildProperties and static method for buildVersion and buildRevision
 - This ensures that the file name of the plugin JAR bundled in the CLI will NEVER be out of sync.

Make all classes under plugin non public, except the Plugin class.

(cherry picked from commit e9fbd1f)
@romain-grecourt romain-grecourt added this to the 2.2.0 milestone Jan 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add flag that can be used to detect native-image io.helidon.build.cli.plugin classes should be not be public

2 participants