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

  • SEARCH
  • Home
  • 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 6541991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:10:20+00:00 2026-05-25T11:10:20+00:00

I have created a maven android project using this archetype . I want to

  • 0

I have created a maven android project using this archetype. I want to integrate mirah source files inside my project. So I added the plugin mentioned here to my pom.xml. I setup the configuration section for the plugin to point the source directory to src/main/mirah.

But when I run mvn compile it only compiles the sources inside src/main/java. I have tried running it with mvn -X compile to try and debug the issue, but I can’t find anything related to mirah or the mirah-maven-plugin there.

Using the archetype it created two projects – project and project-it (tests) , there is a pom.xml in the root directory as well as a pom.xml in project and project-it directories. I have tried the above configurations in both the root directory as well as in project’s pom.xml.

I have come across this question related to using the build-helper plugin but I don’t know if it will help in my case. Since my mirah plugin isn’t getting called at all.

Is this the right way to do what I’m trying to do? Any help on the setup, or pointer to how to troubleshoot this would be much appreciated.

The relevant bit of my pom.xml

<plugin>
   <groupId>org.mirah.maven</groupId>
   <artifactId>maven-mirah-plugin</artifactId>
   <version>1.0</version>
   <configuration>
       <sourceDirectory>src/main/mirah</sourceDirectory>
       <outputDirectory>target/classes</outputDirectory>
       <bytecode>true</bytecode>
       <verbose>false</verbose>
   </configuration>
   <executions>
      <execution>
         <phase>compile</phase>
         <goals><goal>compile</goal></goals>
      </execution>
   </executions>
</plugin>

Edited as per answer below.

I have added the source directory using the build-helper plugin and I’m able to get the mirah sources to compile using mvn org.mirah.maven:maven-mirah-plugin:1.0:compile from the answer below. But mvn compile still only compiles the sources in src/main/java and not src/main/mirah.

For anyone interested in the output of mvn -X compile here is the pastie.

  • 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-05-25T11:10:20+00:00Added an answer on May 25, 2026 at 11:10 am

    This page https://github.com/calavera/maven-mirah-plugin#readme says that the mirah plugin extends the default compiler plugin. So this would suggest that the build helper plugin would work for multiple source directories, if it works for the default compiler plugin.

    Looking at the mirah plugin, you probably don’t need to specify sourceDirectory and outputDirectory yourself, as it seems you’re using the defaults.

    The -X switch won’t have any impact on the mirah plugin directly, as it doesn’t do any tracing itself (above what the default compiler plugin does).

    Can you show your -X output anyway to show that the mirah plugin isn’t invoked?

    Alternatively, you could build the mirah plugin yourself and add tracing. It doesn’t seem a complicated plugin.

    What happens when you try and invoke the plugin directly? E.g.

    mvn org.mirah.maven:maven-mirah-plugin:1.0:compile

    EDIT:

    Tried it myself and this works for me (by ‘works’ I mean the plugin gets invoked – my build actually fails).

    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>
        <groupId>temp</groupId>
        <artifactId>temp</artifactId>
        <version>0.0.1-SNAPSHOT</version>
        <build>
            <plugins>
                <plugin>
                    <groupId>org.mirah.maven</groupId>
                    <artifactId>maven-mirah-plugin</artifactId>
                    <version>1.0</version>
                    <configuration>
                        <bytecode>true</bytecode>
                        <verbose>true</verbose>
                    </configuration>
                    <executions>
                        <execution>
                            <phase>compile</phase>
                            <goals>
                                <goal>compile</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </build>
    </project>
    

    With this output:

    D:\dev\workspaces\3.6\temp>mvn compile
    [INFO] Scanning for projects...
    [INFO] ------------------------------------------------------------------------
    [INFO] Building Unnamed - temp:temp:jar:0.0.1-SNAPSHOT
    [INFO]    task-segment: [compile]
    [INFO] ------------------------------------------------------------------------
    [INFO] [resources:resources {execution: default-resources}]
    [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
    [INFO] Copying 0 resource
    [INFO] [compiler:compile {execution: default-compile}]
    [INFO] Nothing to compile - all classes are up to date
    [INFO] [mirah:compile {execution: default}]
    [INFO] No sources to compile
    Parsing...
      D:\dev\workspaces\3.6\temp\src\main\mirah/test.mirah
    Inferring types...
    * [Mirah::Typer] Learned local type under #<Mirah::AST::StaticScope:0xbc5245> : a = Type(int)
    
    ... ETC ...
    
    [ERROR] BUILD ERROR
    [INFO] ------------------------------------------------------------------------
    [INFO] Unknown error - Unknown Error (20047) - D:\dev\workspaces\3.6\temp\target\classes\D:
    

    I don’t know what the error means as I’m not a mirah user.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just created a new Maven project using the default archetype and added the
I have created a project using maven in Spring STS. I opened a source
I have a maven project created with maven-archetype-webapp. As i use on Windows machine,
I have created a Maven project and I want to add all Maven dependencies
I have a maven pom file for an open source project. This pom file
We have created a jar(Spring project) which we are including using Maven in another
Following this question (in short: I have created a web project with maven and
I have created a project in Eclipse and built it using Maven. I need
I have created a Spring 3 + Hibernate project using Maven in Eclipse. How
I have created a multi module maven project. Now I have shared the project

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.