Giter Site home page Giter Site logo

Comments (8)

hpehl avatar hpehl commented on June 4, 2024

What if you add the generated code using the build-helper maven plugin? I have a similar setup and added the following plugin configuration

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>build-helper-maven-plugin</artifactId>
    <executions>
        <execution>
            <id>add-source</id>
            <phase>prepare-package</phase>
            <goals>
                <goal>add-source</goal>
            </goals>
            <configuration>
                <sources>
                    <source>${project.build.directory}/generated-sources/annotations</source>
                </sources>
            </configuration>
        </execution>
    </executions>
</plugin>

Replace ${project.build.directory}/generated-sources/annotations in case your code is generated to a different folder.

from gwt-maven-plugin.

natros avatar natros commented on June 4, 2024

Done that. It's not working :(

[INFO]    Finding entry point classes
[INFO]       Tracing compile failure path for type 'pt.ipb.tests.gwtapp.client.Main'
[INFO]          [ERROR] Errors in 'file:/Users/fsousa/Projects/tmp/gwtapp/src/main/java/pt/ipb/tests/gwtapp/client/Main.java'
[INFO]             [ERROR] Line 9: No source code is available for type pt.ipb.tests.gwtapp.client.MyMapperImpl; did you forget to inherit a required module?
[INFO]       [ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly

from gwt-maven-plugin.

tbroyer avatar tbroyer commented on June 4, 2024

The way it's declared in your POM, gwt:compile is executed before build-helper:add-source (they're bound to the same phase, so Maven uses the document order, and you put gwt-maven-plugin before build-helper-maven-plugin).

Changing build-helper:add-source to run at process-classes fixes it. That also makes it possible to use gwt:devmode (which only runs up to the process-classes phase, so prepare-package definitely is too late).

Upgrading the maven-compiler-plugin to 3.2 would also fix it, without the need for the build-helper-maven-plugin, if it weren't for nasty side-effects (read: it's totally broken, stay with 3.1): https://issues.apache.org/jira/browse/MCOMPILER-235

from gwt-maven-plugin.

natros avatar natros commented on June 4, 2024

Now I'm able to compile but I still can't run gwt:devmode

 mvn gwt:devmode 
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building gwtapp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] >>> gwt-maven-plugin:1.0-rc-1:devmode (default-cli) > process-classes @ gwtapp >>>
[INFO] 
[INFO] --- gwt-maven-plugin:1.0-rc-1:enforce-encoding (default-enforce-encoding) @ gwtapp ---
[INFO] 
[INFO] --- gwt-maven-plugin:1.0-rc-1:add-super-sources (default-add-super-sources) @ gwtapp ---
[INFO] 
[INFO] --- gwt-maven-plugin:1.0-rc-1:add-test-super-sources (default-add-test-super-sources) @ gwtapp ---
[INFO] 
[INFO] --- gwt-maven-plugin:1.0-rc-1:import-sources (default-import-sources) @ gwtapp ---
[INFO] 
[INFO] --- gwt-maven-plugin:1.0-rc-1:generate-module (default-generate-module) @ gwtapp ---
[INFO] /Users/fsousa/Projects/tmp/gwtapp/target/classes/pt/ipb/tests/gwtapp/Main.gwt.xml up to date - skipping
[INFO] 
[INFO] --- maven-resources-plugin:2.7:resources (default-resources) @ gwtapp ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] skip non existing resourceDirectory /Users/fsousa/Projects/tmp/gwtapp/src/main/super
[INFO] Copying 4 resources
[INFO] Copying 0 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ gwtapp ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- build-helper-maven-plugin:1.9.1:add-source (add-source) @ gwtapp ---
[INFO] Source directory: /Users/fsousa/Projects/tmp/gwtapp/target/generated-sources/annotations added.
[INFO] 
[INFO] <<< gwt-maven-plugin:1.0-rc-1:devmode (default-cli) < process-classes @ gwtapp <<<
[INFO] 
[INFO] --- gwt-maven-plugin:1.0-rc-1:devmode (default-cli) @ gwtapp ---
[INFO] Super Dev Mode starting up
[INFO]    workDir: /Users/fsousa/Projects/tmp/gwtapp/target/gwt/devmode/work
[INFO]    Loading Java files in pt.ipb.tests.gwtapp.Main.
[INFO]    Ignored 1 unit with compilation errors in first pass.
[INFO] Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
[INFO]    Finding entry point classes
[INFO]       Tracing compile failure path for type 'pt.ipb.tests.gwtapp.client.Main'
[INFO]          [ERROR] Errors in 'file:/Users/fsousa/Projects/tmp/gwtapp/src/main/java/pt/ipb/tests/gwtapp/client/Main.java'
[INFO]             [ERROR] Line 9: No source code is available for type pt.ipb.tests.gwtapp.client.MyMapperImpl; did you forget to inherit a required module?
[INFO]       [ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------

from gwt-maven-plugin.

tbroyer avatar tbroyer commented on June 4, 2024

I'll have a look. I think I know what's going on.

from gwt-maven-plugin.

tbroyer avatar tbroyer commented on June 4, 2024

I'll cut an RC 2 soon with the fix, but if you could try the snapshot in the mean time and tell me if it fixes the issue for you (I tried it with your project and it worked for me)

from gwt-maven-plugin.

natros avatar natros commented on June 4, 2024

It's working with both devmode and codeserver.

Thank you Thomas.

from gwt-maven-plugin.

tbroyer avatar tbroyer commented on June 4, 2024

Just released 1.0-rc-2.

from gwt-maven-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.