Eclipse web project not working after converting to Maven
Date : March 29 2020, 07:55 AM
Does that help I solved this by moving my source files from project_root/src to src/main/java and then making sure that src/main/java was on the build path under Project > Properties > Java Build Path > Source tab. Eclipse now deploys my changed files to the proper directory under .metadata so the changes show up in my local instance of Tomcat. @davidfmatheson, thanks for your comments, I will look into using m2e-wtp.
|
How to create self-containing (standalone) jar of each modules of a multi-module maven project
Date : March 29 2020, 07:55 AM
|
Spring MVC project not working anymore after converting to Maven in Eclipse
Tag : java , By : Suresh S
Date : March 29 2020, 07:55 AM
This might help you If you see the below error it is saying there is NoSuchMethodError. Most probably there might be conflicting jars in your classpath or wrong version of jars that don't have the specific method. root cause
java.lang.NoSuchMethodError: javax.validation.spi.ConfigurationState.getParameterNameProvider()Ljavax/validation/ParameterNameProvider;
org.hibernate.validator.internal.engine.ValidatorFactoryImpl.<init>(ValidatorFactoryImpl.java:142)
org.hibernate.validator.HibernateValidator.buildValidatorFactory(HibernateValidator.java:35)
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>5.0.3.Final</version>
</dependency>
|
Building single fat jar from a multi module maven project - including test classes
Tag : maven , By : AdrianB
Date : March 29 2020, 07:55 AM
Hope that helps As @MariuszS mentions, first restructure your project so that you separate any Unit tests or integration tests for the actual classes that test (=drive/verify navigation for) Acme. Parent -- pom
|
|__core_module src/main/java --> helper classes for selenium
|
|__acme_module src/main/java --> Classes specific for navigating acme
|
|__acme_module src/test/java--> (Unit etc) Test Classes for acme project
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.3</version>
<executions>
<execution>
<id>create-fat-jar</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<!-- add Main-Class to manifest file -->
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>your.main.class</mainClass>
</transformer>
</transformers>
<finalName>YourJarName</finalName>
</configuration>
</execution>
</executions>
</plugin>
|
How to make a standalone JPA (with OpenJPA implementation) Maven project start with exec maven plugin?
Tag : maven , By : user181445
Date : March 29 2020, 07:55 AM
wish help you to fix your issue I have a very simple JPA project. This is my directory layout.. , Adding this to pom.xml worked: <plugin>
<groupId>org.apache.openjpa</groupId>
<artifactId>openjpa-maven-plugin</artifactId>
<version>2.4.2</version>
<configuration>
<includes>**/model/*.class</includes>
<excludes>**/model/XML*.class</excludes>
<addDefaultConstructor>true</addDefaultConstructor>
<enforcePropertyRestrictions>true</enforcePropertyRestrictions>
</configuration>
<executions>
<execution>
<id>enhancer</id>
<phase>process-classes</phase>
<goals>
<goal>enhance</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.apache.openjpa</groupId>
<artifactId>openjpa</artifactId>
<!-- set the version to be the same as the level in your runtime -->
<version>2.4.2</version>
</dependency>
</dependencies>
</plugin>
|