manifold-systems / manifold

Manifold is a Java compiler plugin, its features include Metaprogramming, Properties, Extension Methods, Operator Overloading, Templates, a Preprocessor, and more.
http://manifold.systems/
Apache License 2.0
2.42k stars 125 forks source link

Maven: document how to add source path for eclipse (and VSCode) #582

Closed avertx closed 6 months ago

avertx commented 6 months ago

maybe there's something I missed from maven-compiler-plugin, but I'm pretty sure a build-helper-maven-plugin to "include generated source path" should be included in the documentation everywhere maven-compiler-plugin is used....

Unless I missed something in maven-compiler-plugin?

I know its possible see Rocker's maven-plugin mojo, but I decline to consider the politics behind modification of such a core plugin. Line 183:

project.addCompileSourceRoot(this.outputDirectory.getAbsolutePath());

Anyways, as such, this makes VSCode(Eclipse internally) and Eclipse happy...

<arg>-Amanifold.source.target=target/generated-sources</arg>
     <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>3.5.0</version>
        <executions>
          <execution>
            <id>add-source</id>
            <phase>compile</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>target/generated-sources</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>
rsmckinney commented 6 months ago

Manifold is not an annotation processor, resources and DSLs such as SQL, XML, template files, etc. are the single source of truth. As such there isn’t any indirection. But if you or your external tooling need to analyze generated glue code, you can indeed instruct manifold to dump it at a location of your choosing. See the dumping source documentation.

avertx commented 6 months ago

I was referring to "dumping source." Following the Properties example, where is the generated "MyProperties.java" supposed to be found by my IDE otherwise? thx