Skip to content

Multi-Module Project - codeserver #178

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
osmanolgun opened this issue May 2, 2025 · 3 comments
Open

Multi-Module Project - codeserver #178

osmanolgun opened this issue May 2, 2025 · 3 comments
Labels
question Further information is requested

Comments

@osmanolgun
Copy link

Unfortunately I can't start CodeServer succesfully.
I'm trying to migrate to TBroyer's plugin. Build is successful but I can not start codeserver.

I have the following warning and error.
java.lang.ClassNotFoundException: com.google.gwt.dev.codeserver.CodeServer
Failed to execute goal net.ltgt.gwt.maven:gwt-maven-plugin:1.1.0:codeserver

It is most probably because of a wrong configuration.
I am using GWT 2.11 and Java 11.

Root POM:
build > plugins>

        <plugin>
            <groupId>net.ltgt.gwt.maven</groupId>
            <artifactId>gwt-maven-plugin</artifactId>
            <version>1.1.0</version>
            <executions>
                <execution>
                    <goals>
                        <goal>codeserver</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

build > plugins> pluginmanagement > plugins

            <plugin>
                <groupId>net.ltgt.gwt.maven</groupId>
                <artifactId>gwt-maven-plugin</artifactId>
                <version>${v.gwt-maven-plugin}</version>
                <extensions>true</extensions>
            </plugin>

Module POM:
gwt-app

	<profile>
		<id>DEV</id>
		<properties>
			<gwt.module>--my module---</gwt.module>
		</properties>
		<build>
			<plugins>
				<plugin>
					<groupId>net.ltgt.gwt.maven</groupId>
					<artifactId>gwt-maven-plugin</artifactId>
					<configuration>
						<skipModule>true</skipModule>
						<moduleName>-- my module---</moduleName>
					</configuration>
				</plugin>
			</plugins>
		</build>
	</profile>

dependencies

	<dependency>
		<groupId>org.gwtproject</groupId>
		<artifactId>gwt-codeserver</artifactId>
		<scope>provided</scope>
	</dependency>

Has anyone same problem?
Thanks in advance.
Sincerely.

@tbroyer
Copy link
Owner

tbroyer commented May 2, 2025

You shouldn't need the gwt-codeserver dependency, as the classes are already included into gwt-dev, but those also must not be declared with <scope>provided</scope>.

Have you read https://tbroyer.github.io/gwt-maven-plugin/codeserver.html ? Have you looked at the archetypes linked from the home page?

@tbroyer tbroyer added the question Further information is requested label May 2, 2025
@osmanolgun
Copy link
Author

osmanolgun commented May 5, 2025

@tbroyer
thank you for the feedback.

I think <scope>provided</scope> was there because of the old plugin settings. As you said, the problem was solved when I removed them.

Now CodeServer is working properly. I used the <codeServerPort>12345</codeServerPort> configuration. I learned later that this is not the way it works.

<codeserverArgs><arg>-port</arg><arg>12345</arg></codeserverArgs>

There is one more problem I need to solve right now.
When I stop CodeServer in Intellij (Windows), it actually keeps running in the background. I have to close it from TaskManager every time.

@tbroyer
Copy link
Owner

tbroyer commented May 5, 2025

This is #110. It's specific to Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants