io.fabric8 generates kubernetes and openshift yaml when i include targetDir configuration
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>4.3.1</version>
<configuration>
<targetDir>${basedir}/fabric8/</targetDir>
</configuration>
</plugin>
by default it goes to goes to target/fabric8/deployment.yaml i want it to go to {basedir}/fabric8/ without it generating some extra extra folders and files, just /deployment.yaml, this is the command i ran mvn fabric8:resource
I'm from Fabric8 team. Fabric8 Maven Plugin has an option fabric8.targetDir with which you can override default target directory. Here is how it should work for your use case:
~/work/repos/fmp-demo-project : $ mkdir fabric8
~/work/repos/fmp-demo-project : $ mvn fabric8:resource -Dfabric8.targetDir="./fabric8"
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------------< meetup:random-generator >-----------------------
[INFO] Building random-generator 0.0.1
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- fabric8-maven-plugin:4.3.1:resource (default-cli) # random-generator ---
[INFO] F8: Using Container image name of namespace: rokumar
[INFO] F8: Running generator spring-boot
[INFO] F8: spring-boot: Using Container image fabric8/s2i-java:2.3 as base / builder
[INFO] F8: fmp-controller: Adding a default Deployment
[INFO] F8: fmp-service: Adding a default service 'random-generator' with ports [8080]
[INFO] F8: f8-healthcheck-spring-boot: Adding readiness probe on port 8080, path='//health', scheme='HTTP', with initial delay 10 seconds
[INFO] F8: f8-healthcheck-spring-boot: Adding liveness probe on port 8080, path='//health', scheme='HTTP', with initial delay 180 seconds
[INFO] F8: fmp-revision-history: Adding revision history limit to 2
[INFO] F8: validating /home/rohaan/work/repos/fmp-demo-project/fabric8/kubernetes/random-generator-service.yml resource
[INFO] F8: validating /home/rohaan/work/repos/fmp-demo-project/fabric8/kubernetes/random-generator-deployment.yml resource
[INFO] F8: fmp-controller: Adding a default DeploymentConfig
[INFO] F8: fmp-service: Adding a default service 'random-generator' with ports [8080]
[INFO] F8: f8-healthcheck-spring-boot: Adding readiness probe on port 8080, path='//health', scheme='HTTP', with initial delay 10 seconds
[INFO] F8: f8-healthcheck-spring-boot: Adding liveness probe on port 8080, path='//health', scheme='HTTP', with initial delay 180 seconds
[INFO] F8: fmp-revision-history: Adding revision history limit to 2
[INFO] F8: validating /home/rohaan/work/repos/fmp-demo-project/fabric8/openshift/random-generator-deploymentconfig.yml resource
[INFO] F8: validating /home/rohaan/work/repos/fmp-demo-project/fabric8/openshift/random-generator-service.yml resource
[INFO] F8: validating /home/rohaan/work/repos/fmp-demo-project/fabric8/openshift/random-generator-route.yml resource
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.127 s
[INFO] Finished at: 2020-01-08T12:37:50+05:30
[INFO] ------------------------------------------------------------------------
~/work/repos/fmp-demo-project : $ ls fabric8/
kubernetes kubernetes.yml openshift openshift.yml
~/work/repos/fmp-demo-project : $ ls fabric8/kubernetes
random-generator-deployment.yml random-generator-service.yml
Unfortunately, Fabric8 Maven Plugin generates resource descriptors for both Kubernetes and Openshift. In case of Kubernetes also, it generates a default Service, if you want to disable it, you can configure plugin like this to disable Service Enricher:
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>4.3.1</version>
<configuration>
<enricher>
<excludes>
<exclude>fmp-service</exclude>
</excludes>
</enricher>
</configuration>
</plugin>
This way Service won't be generated during the resource generation phase and you would be left with Deployment only. Here is a run after the plugin configuration:
"/work/repos/fmp-demo-project : $ mvn fabric8:resource -Dfabric8.targetDir="./fabric8
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------------< meetup:random-generator >-----------------------
[INFO] Building random-generator 0.0.1
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- fabric8-maven-plugin:4.3.1:resource (default-cli) # random-generator ---
[INFO] F8: Using Container image name of namespace: rokumar
[INFO] F8: Running generator spring-boot
[INFO] F8: spring-boot: Using Container image fabric8/s2i-java:2.3 as base / builder
[INFO] F8: fmp-controller: Adding a default Deployment
[INFO] F8: f8-healthcheck-spring-boot: Adding readiness probe on port 8080, path='/actuator/health', scheme='HTTP', with initial delay 10 seconds
[INFO] F8: f8-healthcheck-spring-boot: Adding liveness probe on port 8080, path='/actuator/health', scheme='HTTP', with initial delay 180 seconds
[INFO] F8: fmp-revision-history: Adding revision history limit to 2
[INFO] F8: validating /home/rohaan/work/repos/fmp-demo-project/fabric8/kubernetes/random-generator-deployment.yml resource
[INFO] F8: fmp-controller: Adding a default DeploymentConfig
[INFO] F8: f8-healthcheck-spring-boot: Adding readiness probe on port 8080, path='/actuator/health', scheme='HTTP', with initial delay 10 seconds
[INFO] F8: f8-healthcheck-spring-boot: Adding liveness probe on port 8080, path='/actuator/health', scheme='HTTP', with initial delay 180 seconds
[INFO] F8: fmp-revision-history: Adding revision history limit to 2
[INFO] F8: validating /home/rohaan/work/repos/fmp-demo-project/fabric8/openshift/random-generator-deploymentconfig.yml resource
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.598 s
[INFO] Finished at: 2020-01-08T14:20:52+05:30
[INFO] ------------------------------------------------------------------------
~/work/repos/fmp-demo-project : $ ls fabric8/
kubernetes kubernetes.yml openshift openshift.yml
~/work/repos/fmp-demo-project : $ ls fabric8/kubernetes
random-generator-deployment.yml
We have been refactoring/rebranding FMP into two different plugins, you can find it here: Eclipse Jkube, it has two plugins - Kubernetes Maven Plugin and Openshift Maven Plugin. They only generate Kubernetes or Openshift manifests respectively. That way you can only generate Kubernetes resources which seem to be fitting your current use case.
Hope that helps.
Related
I'm trying to set up acceptance tests for a Quarkus app, using quarkus-cucumber 0.6.0 (on Quarkus platform version 2.15.2.Final), but it fails to find the step definitions.
My package structure looks as follows:
src
main
api
backend
gui
test
java
com.example.test
AcceptanceTest.java
steps
BlahSteps.java
BlubbSteps.java
specifications
blah.feature
blubb.feature
The AcceptanceTest.java specifies the package for the glue:
package com.example.test
#CucumberOptions(
features = "src/test/specifications",
glue = "com.example.test.steps"
)
public class AcceptanceTest extends CucumberQuarkusTest {
public static void main(String[] args) {
runMain(AcceptanceTest.class, args);
}
}
And the BlahSteps.java in that package contains methods for the steps in blah.feature. (It also ends up correctly in target/test-classes.)
Still, no matter whether I run mvn clean test in the terminal (or ./mvnw quarkus:test after annotating the AcceptanceTest with #QuarkusTest) or run the test in IntelliJ, it runs the blah feature and tells me:
You can implement missing steps with the snippets below:
...
Why is it not finding the glue? Am I missing something?
Configure surefire plugin like below
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire-plugin.version}</version>
<configuration>
<includes>
<include>**/AcceptanceTest*.java</include>
</includes>
<testFailureIgnore>true</testFailureIgnore>
<systemPropertyVariables>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
</systemPropertyVariables>
</configuration>
</plugin>
below you can see how cucumber triggered.
mintozzy#laptop:~/tmp/quarkus-cucumber-example$ mvn test
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.example:quarkus-cucumber-example:jar:1.0.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for io.quarkus.platform:quarkus-maven-plugin is missing. # line 56, column 15
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ----------------< com.example:quarkus-cucumber-example >----------------
[INFO] Building quarkus-cucumber-example 1.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # quarkus-cucumber-example ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/mintozzy/tmp/quarkus-cucumber-example/src/main/resources
[INFO]
[INFO] --- quarkus-maven-plugin:3.0.0.Alpha2:generate-code (default) # quarkus-cucumber-example ---
[INFO]
[INFO] --- maven-compiler-plugin:3.10.1:compile (default-compile) # quarkus-cucumber-example ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- quarkus-maven-plugin:3.0.0.Alpha2:generate-code-tests (default) # quarkus-cucumber-example ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # quarkus-cucumber-example ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.10.1:testCompile (default-testCompile) # quarkus-cucumber-example ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:3.0.0-M7:test (default-test) # quarkus-cucumber-example ---
[INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running com.example.test.AcceptanceTestRunner
2023-01-16 20:05:56,769 INFO [io.quarkus] (main) quarkus-cucumber-example 1.0.0-SNAPSHOT on JVM (powered by Quarkus 2.15.2.Final) started in 2.091s. Listening on: http://localhost:8081
2023-01-16 20:05:56,771 INFO [io.quarkus] (main) Profile test activated.
2023-01-16 20:05:56,771 INFO [io.quarkus] (main) Installed features: [cdi, cucumber, resteasy, resteasy-jackson, smallrye-context-propagation, vertx]
Scenario: You're still alright # specifications/everything_is_fine.feature:9
Given you are having coffee # com.example.test.steps.EverythingIsFineSteps.you_are_having_coffee()
And there is a fire around you # com.example.test.steps.EverythingIsFineSteps.there_is_a_fire_around_you()
When you are still alright # com.example.test.steps.EverythingIsFineSteps.you_are_still_alright()
Then everything is fine # com.example.test.steps.EverythingIsFineSteps.everything_is_fine()
Scenario: You start to feel it # specifications/everything_is_fine.feature:14
Given you are having coffee # com.example.test.steps.EverythingIsFineSteps.you_are_having_coffee()
And there is a fire around you # com.example.test.steps.EverythingIsFineSteps.there_is_a_fire_around_you()
When you start to feel it # com.example.test.steps.EverythingIsFineSteps.you_start_to_feel_it()
Then panic # com.example.test.steps.EverythingIsFineSteps.panic()
2 Scenarios (2 passed)
8 Steps (8 passed)
0m0.893s
[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.11 s - in com.example.test.AcceptanceTestRunner
2023-01-16 20:05:58,732 INFO [io.quarkus] (main) quarkus-cucumber-example stopped in 0.035s
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.311 s
[INFO] Finished at: 2023-01-16T20:05:58Z
[INFO] ------------------------------------------------------------------------
here is the full code.
I want to start spring-boot maven application in debug mode in intellij Idea, but when I make breakpoints the application doesn't suspend and goes further. I've read a lot of topics but I still don't understand how to do it. Could you help me decide the best course of action.
Edit: I use spring-boot-maven-plugin and Maven Run/Debug configuration with spring-boot:run in command line.
Edit: So when I added Jvm Arguments to pom.xml I recieved such log:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building shop 0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> spring-boot-maven-plugin:1.5.8.RELEASE:run (default-cli) > test-compile # shop >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # shop ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # shop ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # shop ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\Валера\IdeaProjects\shop\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # shop ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] <<< spring-boot-maven-plugin:1.5.8.RELEASE:run (default-cli) < test-compile # shop <<<
[INFO]
[INFO] --- spring-boot-maven-plugin:1.5.8.RELEASE:run (default-cli) # shop ---
[INFO] Attaching agents: []
Listening for transport dt_socket at address: 5005
But when requesting localhost:5005/myPage I recieve Error 101 (net: : ERR_CONNECTION_RESET). Seems like some maven arguments did not specify.
Here my maven plagin in pom.xml:
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<jvmArguments>
-Xdebug - Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005
</jvmArguments>
</configuration>
</plugin>
</plugins>
</build>
In your Run/Debug Configurations enter the following into your command line:
spring-boot:run -Dspring.profiles.active=local,<mine> -Dfork=false -f pom.xml
My Maven spring-boot:run configuration debugs just fine with the -D fork=false added.
You may use below command in the CLI:
export MAVEN_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=n
Below is my project settings:
enter image description here
I can't understand why maven-surefire-plugin doesn't run jUnit4 test. My pom is (can't add it here because "it looks post is mostly code"): http://pastebin.com/Jj3iJZpY
When I execute mvn clean test cmd window shows:
C:\Users\maya\git\services>mvn clean test
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building services 1.0.18
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # services ---
[INFO] Deleting C:\Users\maya\git\services\target
[INFO]
[INFO] --- maven-mule-plugin:1.9:attach-test-resources (default-attach-test-resources) # services ---
[INFO] attaching test resource C:\Users\maya\git\services\src\main\app
[INFO]
[INFO] --- build-helper-maven-plugin:1.7:add-resource (add-resource) # services ---
[INFO]
[INFO] --- maven-resources-plugin:2.7:resources (default-resources) # services ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO] Copying 3 resources
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-mule-plugin:1.9:filter-resources (default-filter-resources) # services ---
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) # services ---
[INFO] Compiling 60 source files to C:\Users\maya\git\services\target\classes
[INFO]
[INFO] --- maven-resources-plugin:2.7:testResources (default-testResources) # services ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) # services ---
[INFO] Compiling 1 source file to C:\Users\maya\git\services\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.19:test (default-test) # services ---
[INFO]
[INFO] --- maven-surefire-plugin:2.19:test (default) # services ---
[INFO] Skipping execution of surefire because it has already been run for this configuration
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.554 s
[INFO] Finished at: 2015-12-11T15:48:05+03:00
[INFO] Final Memory: 48M/312M
[INFO] ------------------------------------------------------------------------
Test class is:
package com.comp.utils.UtilsTest;
import static org.junit.Assert.assertTrue;
import org.apache.log4j.Logger;
import org.junit.Test;
public class UtilsTest {
private static final Logger LOG = Logger.getLogger(UtilsTest.class.getName());
#Test
public void testHasPersonSameProd() {
boolean hasSameProduct = false;
assertTrue("Should be True", hasSameProduct);
}
}
Why maven-surefire-plugin:2.19 runs twice and doesn't want to run my test class? How to run test in my case? Thank you.
Given the pom you linked (which should be included into the question actually, as the link may be broken in the future):
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19</version>
<executions>
<execution>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>2.19</version>
</dependency>
</dependencies>
<configuration>
<includes>
<include>UtilTest.java</include>
</includes>
</configuration>
</plugin>
The Maven Surefire Plugin runs twice because you configured an additional execution of the plugin, without providing an id element and as such by default it is called default (maven-surefire-plugin:2.19:test (default)). This execution runs after the out-of-the-box Maven configuration for Surefire (maven-surefire-plugin:2.19:test (default-test)). So, as a consequence, you have two executions (default and default-test). Removing the executions section on the Surefire plugin configuration you would only have one execution (the default-test).
You also have a typo in the Surefire configuration, the <include>UtilTest.java</include> configuration points to the UtilTest.java class, while in your question it is named UtilsTest (note the additional 's').
If the test class is under src/test/java folder, then you don't need to configure its inclusion, since it also already follow the default convention of Surefire, "**/*Test.java".
The message you are having (Skipping execution of surefire because it has already been run for this configuration) is because your configuration element for the Surefire plugin is outside any executions element, which means is applied to all plugin executions, even the default one (default-test).
So you could probably remove the whole Surefire plugin section from your pom and the issue should be fixed.
I've worked with GWT and eclipse for a while now and I wanted to play a bit with maven and the GWT plugin (gwt-maven-plugin, enter link description here). I tried to use it out of eclipse (Luna 4.4), but obviously I didn't do it correctly, as it was extremely brittle to the point that it broke on a regular basis as the IDE overwrote it's settings when I changed something small in the pom.xml. So I decided to take a step back and eliminate the black magic that eclipse is and start a new project from scratch from the command line.
However, I cannot seem to be getting the hang of running the actual application, because when I execute the code server, navigate to the page, I see the following message:
Can't find any GWT Modules on this page.
Obviously, the code server is running, however the module files seem to not have been hosted. AFAIK I see after several hours of educating myself (and finding http://blog.ltgt.net/how-does-gwts-super-dev-mode-work/), there should be a second process actually hosting the code in parallel to the code server. What is the appropriate way of doing this with maven? Should I open a second terminal and run a jetty or something else in parallel to the code server? If so, could someone please give me a hint how I can do it most efficiently?
Thanks in advance!
Here is how I created the project:
mvn archetype:generate \
-DarchetypeGroupId=org.codehaus.mojo \
-DarchetypeArtifactId=gwt-maven-plugin \
-DarchetypeVersion=2.7.0
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:2.2:generate (default-cli) > generate-sources # standalone-pom >>>
[INFO]
[INFO] <<< maven-archetype-plugin:2.2:generate (default-cli) < generate-sources # standalone-pom <<<
[INFO]
[INFO] --- maven-archetype-plugin:2.2:generate (default-cli) # standalone-pom ---
[INFO] Generating project in Interactive mode
[INFO] Archetype repository missing. Using the one from [org.codehaus.mojo:gwt-maven-plugin:2.7.0] found in catalog remote
Define value for property 'groupId': : com.mytest
Define value for property 'artifactId': : gwtmvntest
Define value for property 'version': 1.0-SNAPSHOT: :
Define value for property 'package': com.mytest: : com.mytest.gwtmvntest
Define value for property 'module': : GwtMvnTest
Confirm properties configuration:
groupId: com.mytest
artifactId: gwtmvntest
version: 1.0-SNAPSHOT
package: com.mytest.gwtmvntest
module: GwtMvnTest
Y: :
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Archetype: gwt-maven-plugin:2.7.0
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: com.mytest
[INFO] Parameter: artifactId, Value: gwtmvntest
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Parameter: package, Value: com.mytest.gwtmvntest
[INFO] Parameter: packageInPathFormat, Value: com/mytest/gwtmvntest
[INFO] Parameter: package, Value: com.mytest.gwtmvntest
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Parameter: module, Value: GwtMvnTest
[INFO] Parameter: groupId, Value: com.mytest
[INFO] Parameter: artifactId, Value: gwtmvntest
[INFO] project created from Archetype in dir: /private/tmp/mvn/gwtmvntest
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 08:12 min
[INFO] Finished at: 2015-01-14T12:59:17+01:00
[INFO] Final Memory: 15M/310M
[INFO] ------------------------------------------------------------------------
Here is how I compiled the project:
mvn compile gwt:compile
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building GWT Maven Archetype 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- gwt-maven-plugin:2.7.0:generateAsync (default) # gwtmvntest ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # gwtmvntest ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # gwtmvntest ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 6 source files to /private/tmp/mvn/gwtmvntest/target/gwtmvntest-1.0-SNAPSHOT/WEB-INF/classes
[INFO]
[INFO] --- gwt-maven-plugin:2.7.0:compile (default-cli) # gwtmvntest ---
[INFO] Compiling module com.mytest.gwtmvntest.GwtMvnTest
[INFO] Compiling 5 permutations
[INFO] Compiling permutation 0...
[INFO] Process output
[INFO] Compiling
[INFO] Compiling permutation 4...
[INFO] Process output
[INFO] Compiling
[INFO] Compiling permutation 3...
[INFO] Process output
[INFO] Compiling
[INFO] Compiling permutation 2...
[INFO] Process output
[INFO] Compiling
[INFO] Compiling permutation 1...
[INFO] Compile of permutations succeeded
[INFO] Compilation succeeded -- 13.866s
[INFO] Linking into /private/tmp/mvn/gwtmvntest/target/gwtmvntest-1.0-SNAPSHOT/GwtMvnTest
[INFO] Link succeeded
[INFO] Linking succeeded -- 0.171s
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18.228 s
[INFO] Finished at: 2015-01-14T13:07:07+01:00
[INFO] Final Memory: 22M/310M
[INFO] ------------------------------------------------------------------------
Here is how I ran the project:
mvn gwt:run-codeserver
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building GWT Maven Archetype 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> gwt-maven-plugin:2.7.0:run-codeserver (default-cli) > process-classes # gwtmvntest >>>
[INFO]
[INFO] --- gwt-maven-plugin:2.7.0:generateAsync (default) # gwtmvntest ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # gwtmvntest ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # gwtmvntest ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] <<< gwt-maven-plugin:2.7.0:run-codeserver (default-cli) < process-classes # gwtmvntest <<<
[INFO]
[INFO] --- gwt-maven-plugin:2.7.0:run-codeserver (default-cli) # gwtmvntest ---
[INFO] Turning off precompile in incremental mode.
[INFO] Super Dev Mode starting up
[INFO] workDir: /var/folders/nk/58gyq85x7l3_mzb5rc0gw42w0000gn/T/gwt-codeserver-5859907708379954718.tmp
[INFO] Loading Java files in com.mytest.gwtmvntest.GwtMvnTest.
[INFO] Module setup completed in 11742 ms
[ERROR] 2015-01-14 13:14:35.800:INFO:oejs.Server:jetty-8.y.z-SNAPSHOT
[ERROR] 2015-01-14 13:14:35.833:INFO:oejs.AbstractConnector:Started SelectChannelConnector#127.0.0.1:9876
[INFO]
[INFO] The code server is ready at http://localhost:9876/
With GWT 2.7+ all you need is to launch mvn gwt:run and it'll use SuperDevMode under the cover, with "recompile on load" (instead of using bookmarklets).
Note that gwt:run won't copy your src/main/webapp or your dependencies, so you'll likely have to run mvn war:exploded (or mvn package) as a prerequisite (and every time you change a file in src/main/webapp or you need to refresh your dependencies)
That being said, unless your project is really simple, you should start using distinct Maven modules early for client and server code; this is because Maven insists that you cannot manage a "GWT client-side classpath" and a "server-side classpath" in the same POM.
I published archetypes to help setting everything up: https://github.com/tbroyer/gwt-maven-archetypes (I unfortunately haven't had the time yet to update them to GWT 2.7)
Either that or use Gradle…
I use Jboss-Maven-Plugin by 1.4 version. I look JBoss Maven Plugin Usage Example,And I pom.xml is
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jboss-maven-plugin</artifactId>
<version>1.4</version>
<configuration>
<jbossHome>E:\JavaWorkingTools\JBoss\jboss-5.1.0.GA</jbossHome>
<serverName>default</serverName>
<hostName>localhost</hostName>
<port>8080</port>
<fileName>${project.build.directory}/${{project.build.finalName}.war</fileName>
</configuration>
</plugin>
WHen I input the jboss:start console message is INfo! But Terminate isn't running?
Info Message is:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building SSH2Maven JEE5 Webapp 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- jboss-maven-plugin:1.4:start (default-cli) # SSH2Maven ---
[INFO] Starting JBoss...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.328s
[INFO] Finished at: Sun Jul 11 19:10:15 CST 2010
[INFO] Final Memory: 2M/15M
[INFO] ------------------------------------------------------------------------
Why?This version can only be used in 4.x below ?
Ok, first of all, the plugin is not really designed for JBoss AS 5 and while some features will work (start, stop, hard-deploy) some deployment features might not work.
Second, the jboss:start goal isn't "blocking", it will start JBoss in the background as an independent process.
Here is what I get after some time when running jboss:start with JBoss 5 (and a plugin configuration similar to yours):
$ mvn jboss:start
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building my-webapp Maven Webapp
[INFO] task-segment: [jboss:start] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] [jboss:start {execution: default-cli}]
[INFO] Starting JBoss...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
...
$ ps aux | grep -i jboss
pascal 23080 0.0 0.0 1828 292 pts/3 S 23:02 0:00 sh -c cd /home/pascal/opt/jboss-5.1.0.GA/bin; export JBOSS_HOME="/home/pascal/opt/jboss-5.1.0.GA"; ./run.sh null
pascal 23107 91.4 30.3 1116240 624824 pts/3 Sl 23:02 3:19 /usr/lib/jvm/java-6-sun/bin/java -Dprogram.name=run.sh -server -Xms128m -Xmx512m -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.net.preferIPv4Stack=true -Djava.endorsed.dirs=/home/pascal/opt/jboss-5.1.0.GA/lib/endorsed -classpath /home/pascal/opt/jboss-5.1.0.GA/bin/run.jar:/usr/lib/jvm/java-6-sun/lib/tools.jar org.jboss.Main null
pascal 23298 0.0 0.0 3324 916 pts/3 S+ 23:06 0:00 grep -i jboss
JBoss has been started, as expected.
Update: Here is the configuration I used (quick and dirty, for testing purposes):
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jboss-maven-plugin</artifactId>
<version>1.4.1</version>
<configuration>
<jbossHome>/home/pascal/opt/jboss-5.1.0.GA</jbossHome>
<serverName>default</serverName>
<fileName>target/my-project.war</fileName>
</configuration>
</plugin>