Hi All,
Simple problem. Simple fix.
Validate that your project pom/gradle consist of log4j / slf4j and you aren't using the current logger.
If you have a log4j properties, or like i do the log4j2.xml file,
you need to change the root logger from info to debug for example.
Regards,
Dor
Showing posts with label maven. Show all posts
Showing posts with label maven. Show all posts
Jun 5, 2019
Aug 27, 2014
Exec Maven Plugin vm arguments
i configured mine to be used by using dedicated specific profile, here is the part from my pom.
<profiles>
<profile>
<id>myTest</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.3.2</version>
<executions>
<execution>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>java</executable>
<mainClass>com.mytest.Test</mainClass>
<!-- below are the command line parameters separated -->
<arguments>
<argument>0</argument>
</arguments>
<!-- for example -Dcom.blabla=1 put it under system properties with key and value -->
<systemProperties>
<systemProperty><key>com.blabla</key><value>1</value></systemProperty>
</systemProperties>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
hope it helps.
Dor
<profiles>
<profile>
<id>myTest</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.3.2</version>
<executions>
<execution>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>java</executable>
<mainClass>com.mytest.Test</mainClass>
<!-- below are the command line parameters separated -->
<arguments>
<argument>0</argument>
</arguments>
<!-- for example -Dcom.blabla=1 put it under system properties with key and value -->
<systemProperties>
<systemProperty><key>com.blabla</key><value>1</value></systemProperty>
</systemProperties>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
hope it helps.
Dor
Labels:
-D,
arguments,
exec:exec,
exec:java,
execution,
executions,
java,
maven,
mojo,
plugin,
plugins,
vm arguments
Jul 19, 2012
Maven parallel build
Hi All,
I have looked for a while for this option, wondered how could it be that they don't have it.
Finally i found it, since maven 3v, they add an experimental option, the T option.
You can now run maven build parallel way. Meaning, maven will check which parts from the project tree he can build in parallel and do it.
Performance ?
Big boost, something like >20%, Do it for your self and compare, you want regret it.
Good also for CI (Jenkins for example)
How?
First way,
"mvn -T 4 clean install"
-T => Stands for telling maven to use the parallel way.
4 => Means, 4 threads to use.
Second way and my preferred,
"mvn -T 4C clean install"
-T => Stands for telling maven to use the parallel way.
4C => Means, 4 threads on each core
Dor
I have looked for a while for this option, wondered how could it be that they don't have it.
Finally i found it, since maven 3v, they add an experimental option, the T option.
You can now run maven build parallel way. Meaning, maven will check which parts from the project tree he can build in parallel and do it.
Performance ?
Big boost, something like >20%, Do it for your self and compare, you want regret it.
Good also for CI (Jenkins for example)
How?
First way,
"mvn -T 4 clean install"
-T => Stands for telling maven to use the parallel way.
4 => Means, 4 threads to use.
Second way and my preferred,
"mvn -T 4C clean install"
-T => Stands for telling maven to use the parallel way.
4C => Means, 4 threads on each core
Dor
Labels:
build,
ci,
jenkins,
maven,
multithreading,
mvn,
parallel,
performance,
project
Jul 9, 2012
Spring Hibernate Envers java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.(I)V
Issue occurred to my college at work. It means that spring uses already the envers as a dependency inside it and you are trying to add it also with a different version. As result -> Conflict.
For me it happened with
spring 3.0.5
hibernate 3.6.0.FINAL
* We added hibernate-envers 3.6.0.FINAL.
Solution
Replacing hibernate-envers with the latest, current latest is 4.1.4 but you should look in maven repository.
For me it happened with
spring 3.0.5
hibernate 3.6.0.FINAL
* We added hibernate-envers 3.6.0.FINAL.
Solution
Replacing hibernate-envers with the latest, current latest is 4.1.4 but you should look in maven repository.
Apr 18, 2012
junit NoClassDefFoundError: org/codehaus/jackson/map/ObjectMapper
Got this error while trying to run one of my junits.
This junit annotated with spring annotations and works with spring-web3.0.5-RELEASE.
After a lot of digging, it seems that the issue is simple.
You need to add this to your pom :
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.4.2</version>
</dependency>
Jackson 1.4.2 suite to spring-web3.0.5
Problem caused since the jackson dependency in spring-web is an optional=true.
This junit annotated with spring annotations and works with spring-web3.0.5-RELEASE.
After a lot of digging, it seems that the issue is simple.
You need to add this to your pom :
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.4.2</version>
</dependency>
Jackson 1.4.2 suite to spring-web3.0.5
Problem caused since the jackson dependency in spring-web is an optional=true.
Nov 20, 2011
Override pom from command line
Hi Everyone,
I had this scenario but my solution catch them all.
I had this <skipTests>true</skipTests> in my pom.
Trying to "mvn -DskipTests=false test" => not good, it doesn't override the pom.
Solution:
Define a property like this
<skip.my.tests>true</skip.my.tests>
Add it to the <properties> section
In the above example, i will replace it and it will look like this <skipTests>${skip.my.tests}</skipTests>
This is the solution for all the thing you want to override from command line.
Hoped it helped,
Dor
I had this scenario but my solution catch them all.
I had this <skipTests>true</skipTests> in my pom.
Trying to "mvn -DskipTests=false test" => not good, it doesn't override the pom.
Solution:
Define a property like this
<skip.my.tests>true</skip.my.tests>
Add it to the <properties> section
In the above example, i will replace it and it will look like this <skipTests>${skip.my.tests}</skipTests>
This is the solution for all the thing you want to override from command line.
Hoped it helped,
Dor
Aug 23, 2011
the project does not have any gwt sdks on its build path
Strange when this occurs although everything is configured well, build path as well as maven pom.xml file.
The solution i have found here is working.
Bye,
Dor
The solution i have found here is working.
Bye,
Dor
Mar 20, 2011
No source code is available for type com.google.gwt.junit.client.GWTTestCase
Add this to your *.gwt.xml file
<source path="client" excludes="**/*Test.java" />
Dor
<source path="client" excludes="**/*Test.java" />
Dor
Jan 6, 2011
java.lang.ClassNotFoundException: javassist.util.proxy.MethodFilter
I got this error while using maven, jetty, wicket, spring and hibernate all with annotations.
Found two solutions
1) Get the java assist jar using maven, but them i got into some other problems.
2) Use this :
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
</dependency>
It seems that it solved the issue since the jaxrs contains this method filter.
If you know other or better solution, i am here to listen.
Hoped it helped,
Dor
Found two solutions
1) Get the java assist jar using maven, but them i got into some other problems.
2) Use this :
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
</dependency>
It seems that it solved the issue since the jaxrs contains this method filter.
If you know other or better solution, i am here to listen.
Hoped it helped,
Dor
Dec 19, 2010
Using platform encoding (Cp1252 actually) to copy filtered resources
Simple solution, just add utf-8 as a property like this:
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>Apache maven.
Hoped it helped,
Dor
Element 'filters' cannot have character [children], because the type's content type is element-only. maven
Go this error while adding filter to web.xml.
My mistake was that i forgot creating the <filter> tag inside the <filters>.
I did this:
<filters>src/main/filters/filter.properties</filters> instead of doing this:
<filters><filter>src/main/filters/filter.properties</filter></filters>
Minor mistake that can happen in one minute out of focus.
Hoped it helped,
Dor
My mistake was that i forgot creating the <filter> tag inside the <filters>.
I did this:
<filters>src/main/filters/filter.properties</filters> instead of doing this:
<filters><filter>src/main/filters/filter.properties</filter></filters>
Minor mistake that can happen in one minute out of focus.
Hoped it helped,
Dor
Subscribe to:
Posts (Atom)