TechnologyBrewery / habushu

In Maven, Habushu allows virtual environment-based Python projects to be included as part a Maven build. This brings some order and consistency to what can otherwise be haphazardly structured projects.
MIT License
3 stars 3 forks source link

Managed dependency logic fails if you specify packages without spaces around equal sign #192

Open lemuelwatts opened 1 month ago

lemuelwatts commented 1 month ago

Stack trace of error:

Caused by: java.lang.StringIndexOutOfBoundsException: begin 0, end -1, length 14
  at java.lang.String.checkBoundsBeginEnd (String.java:3319)
  at java.lang.String.substring (String.java:1874)
  at org.technologybrewery.habushu.InstallDependenciesMojo.performPendingDependencyReplacements (InstallDependenciesMojo.java:367)
  at org.technologybrewery.habushu.InstallDependenciesMojo.processManagedDependencyMismatches (InstallDependenciesMojo.java:273)
  at org.technologybrewery.habushu.InstallDependenciesMojo.doExecute (InstallDependenciesMojo.java:130)
  at org.technologybrewery.habushu.AbstractHabushuMojo.execute (AbstractHabushuMojo.java:236)
  at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
  at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
  at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
  at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
  at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
  at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
  at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
  at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
  at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
  at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
  at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
  at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
  at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
  at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
  at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
  at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
  at org.apache.maven.cli.MavenCli.execute (MavenCli.java:903)
  at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:280)
  at org.apache.maven.cli.MavenCli.main (MavenCli.java:203)
  at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
  at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
  at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke (Method.java:566)
  at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:255)
  at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:201)
  at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:361)
  at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:314)

pyproject.toml file snippet showing dependencies specified without a space around equal sign:

[tool.poetry]
name = "example-pipeline"
version = "1.0.0.dev"
description = "Pipeline for ingesting a sample dataset"
authors = ["Your Name <you@example.com>"]
include = ["src/example_pipeline/generated/**/*"]

[tool.poetry.dependencies]
python = ">=3.11.4,<3.12"
krausening = ">=19"
pyspark = "3.4.0"
jsonpickle = "^2.1.0"
pyyaml = "^6.0"
google-cloud-storage = "2.18.2"
grpcio = "1.66.1"
boto3 = "1.34.144"
pandas = "1.5.3"
joblib = "1.1.1"
colorama = "0.4.6"
numpy="1.24.2"
scipy="1.9.0"
tensorflow="2.13.0"
d-ryan-ashcraft commented 1 month ago

@lemuelwatts - which version of habushu are you using?

lemuelwatts commented 3 weeks ago

@lemuelwatts - which version of habushu are you using?

We're currently using version 2.12.1