Giter Site home page Giter Site logo

Comments (6)

asdnf avatar asdnf commented on May 25, 2024

seems like the plugin you built cannot be rescanned at runtime. You will have to rerun your code server each time yo build your external module. There is another option still.

       <profile>
            <id>superdevmode-server</id>
            <build>
                <defaultGoal>org.codehaus.mojo:exec-maven-plugin:java</defaultGoal>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <version>1.4.0</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>java</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <mainClass>com.google.gwt.dev.codeserver.CodeServer</mainClass>
                            <environmentVariables>-DlogLevel=DEBUG</environmentVariables>
                            <arguments>
                                <argument>org.something.gwt.demo.DemoWidgetSet</argument>
                                <argument>-src</argument>
                                <argument>../demo/src/main/java</argument>
                            </arguments>
                            <classpathScope>compile</classpathScope>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>```

Specify your sources path for _-src_ argument which corresponds your external module sources root.
This will make maven plugin to watch for these sources too. You will even have no need to rebuild that module every time.

from gwt-maven-archetypes.

vegegoku avatar vegegoku commented on May 25, 2024

Sorry, still not working,
is there anyway to debug or track why my external module changes are not picked up in the incremental compilation process? or is there a way to construct my external module to be detectable by incremental compilation?

from gwt-maven-archetypes.

tbroyer avatar tbroyer commented on May 25, 2024

@asdnf A much cleaner way when working on multiple projects simultaneously is to make an aggregator POM for your projects and work from it:

<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>whatever</groupId>
  <artifactId>whatever</artifactId>
  <version>1.0-SNAPSHOT</version>
  <packaging>pom</packaging>

  <modules>
    <module>/path/to/first/project</module>
    <module>/path/to/second/project</module>
  </modules>

  <build>
    <plugins>
      <plugin>
        <groupId>net.ltgt.gwt.maven</groupId>
        <artifactId>gwt-maven-plugin</artifactId>
        <version>1.0-rc-6</version>
        <inherited>false</inherited>
        <configuration>
           …
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>

That way, the "other project" will be part of the reactor build.

from gwt-maven-archetypes.

tbroyer avatar tbroyer commented on May 25, 2024

@vegegoku AFAICT, JARs in the classpath are cached by the JVM, so you have to restart the JVM whenever you make a change for it. To have the JVM see the changes, you have to give the sources as discrete files in a root folder, and for that you should (with the net.ltgt.gwt.maven:gwt-maven-plugin, and without hacks) put all your projects in the same reactor build, so that the gwt-maven-plugin passes the module's source roots as -src arguments to the GWT CodeServer.

from gwt-maven-archetypes.

vegegoku avatar vegegoku commented on May 25, 2024

By adding my external module to my workspace then add it as a sub module in the main module pom file -same as the shared module- it worked like a charm, now i can change that sub-module and when i refresh the browser it re-compiles.
the only thing remaining now is to apply incremental compilation, i wonder if this possible with the this plugin?!

from gwt-maven-archetypes.

branflake2267 avatar branflake2267 commented on May 25, 2024

I figured I'd follow up with my angle. It's possible in any configuration as long as the [project].nocache.js has the sdm initialization to do the first compile and subsequent incremental compiles. (As long as that xxx.nocache.js file hostname points to the code server.)

from gwt-maven-archetypes.

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.