Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9012787
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:05:42+00:00 2026-06-16T03:05:42+00:00

I am pulling my hair using the sbt-jflex plugin to generate Java sources via

  • 0

I am pulling my hair using the sbt-jflex plugin to generate Java sources via JFlex, before the main javac phase of sbt (0.12).

The plugin is a clone of the ANTLR plugin, and I found this question which shows how to use the latter.

So I have the following in project/plugins.sbt:

addSbtPlugin("org.scalanlp" % "sbt-jflex" % "0.1-SNAPSHOT") 

And this in ./build.sbt:

jflexSettings

sourceGenerators in Compile <+= generate in jflex

But I must be either doing something wrong, or the javac phase comes before the source generators, because when I run sbt compile, I never see the message "JFlex: Using JFlex version X to generate source files". Instead sbt goes straight to compile the Java sources

[info] Compiling 91 Java sources to ...

And then fails because the JFlex output is missing at that stage. Running source-directories shows that src/main/jflex is indeed included, as is target/src_managed/main.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T03:05:43+00:00Added an answer on June 16, 2026 at 3:05 am

    After playing around with injecting debug prints, I found that the sbt-jflex plugin assumes sources are in src/main/flex whereas my project has them in src/main/jflex. Adding the following fixes it:

    sourceDirectory in jflex <<= (sourceDirectory in Compile) { _ / "jflex" }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am pulling my hair out on this one... I am using the ASIHTTPRequest
I'm pulling my hair out on this. I do some manual deserialization using XmlReader
I'm pulling my hair out here. I'm using the DropDownListFor HTML helper in MVC3
I'm having trouble sending email using my gmail account. I'm pulling my hair out.
I'm pulling my hair out over this MSBuild issue. We're using TeamCity to build
I am new to using div tags, and I have been pulling my hair
I'm pulling my hair out on this one. I'm using the FlexSlider on a
I'm building a simple blog using Jekyll, and I'm pulling my hair out trying
I am pulling my hair out. I have created some simple functions that generate
Pulling my hair out. Am using <supportedProfiles>extendedDesktop </supportedProfiles> in application descriptor My pathing is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.