Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support mill init from an existing Maven project (1500USD Bounty) #3449

Open
lihaoyi opened this issue Sep 3, 2024 · 4 comments
Open

Support mill init from an existing Maven project (1500USD Bounty) #3449

lihaoyi opened this issue Sep 3, 2024 · 4 comments
Labels

Comments

@lihaoyi
Copy link
Member

lihaoyi commented Sep 3, 2024


From the maintainer Li Haoyi: I'm putting a 1500USD bounty on this issue, payable by bank transfer on a merged PR implementing this.


We should be able to run ./mill init to do a best effort conversion of an existing Maven project to Mill:

  • Code-generate a build.mill containing a MavenModulefor the root pom.xml, the package.mill for any subfolder pom.xmls
  • Convert the main and test dependencies on third-party libraries to ivyDeps
  • Convert inter-subproject dependencies to moduleDeps
  • Set any necessary javacOptions
  • Implement PublishModule with relevant metadata
  • Support POM inheritance, dependency management, etc.

Such a conversion will never be 100%, but if we can automate 80% of the conversion that will already be a huge help for people migrating to Mill or even just trying it out

Some prior art that can be used as reference:

@lihaoyi lihaoyi changed the title Support mill init from a Maven project Support mill init from a Maven project (1500USD Bounty) Sep 3, 2024
@lihaoyi lihaoyi changed the title Support mill init from a Maven project (1500USD Bounty) Support mill init from a SBT project (1500USD Bounty) Sep 3, 2024
@lihaoyi lihaoyi changed the title Support mill init from a SBT project (1500USD Bounty) Support mill init from a Maven project (1500USD Bounty) Sep 3, 2024
@lihaoyi lihaoyi changed the title Support mill init from a Maven project (1500USD Bounty) Support mill init from an existing Maven project (1500USD Bounty) Sep 3, 2024
@lefou lefou added the bounty label Sep 3, 2024
@arturaz
Copy link
Contributor

arturaz commented Sep 9, 2024

Is there any infrastructure for this already? For example, does mill init entry point exists?

@lihaoyi
Copy link
Member Author

lihaoyi commented Sep 9, 2024

@arturaz mill init already exists, and uses giter8 to initialize a repo based on some github URL:

def init(evaluator: Evaluator, args: String*): Command[Unit] = Target.command {

It should be pretty easy to add logic to check if there's an existing pom.xml in the project root and initialize based on that instead

@arturaz
Copy link
Contributor

arturaz commented Sep 9, 2024

I'll try to implement this :)

@lihaoyi
Copy link
Member Author

lihaoyi commented Sep 9, 2024

@arturaz go for it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants