WAR files behaves differently which are build by INTELLIJ IDEA and MAVEN WAR Plugin
abidinkiremitci Oct 27, 2018 4:29 PMI am trying to migrate Eclipse Project into Maven Project. I started from scratch and i deployed my app and it seems working. However, it is missleading OLEY and my maven project did not create war package. Intellij did!
Detailed explanation is in stackoverflow post. See below:
Briefly, i am using external jars like Eclipse BIRT. I added them in my pom file by pointing them with systemPath. However, maven build create a different war with different deployment configuration.
My maven configuration: |
---|
<plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.8.0</version> <configuration> <source>1.8</source> <target>1.8</target> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>3.2.2</version> <configuration> <archive> <manifestEntries> <Dependencies>org.apache.commons.codec, org.apache.commons.cli, org.apache.commons.logging, org.apache.lucene, org.apache.xerces, org.apache.xml-resolver, org.apache.xerces, org.apache.log4j</Dependencies> </manifestEntries> </archive> <webResources> <webResource> <directory>${basedir}/src/main/webapp/WEB-INF</directory> <includes> <include>*.xml</include> <include>*.rptdesign</include> <include>*.rptlibrary</include> <include>*.properties</include> </includes> <targetPath>WEB-INF</targetPath> <filtering>true</filtering> </webResource> </webResources>
</configuration> </plugin> <plugin> <groupId>org.wildfly.plugins</groupId> <artifactId>wildfly-maven-plugin</artifactId> <version>1.2.2.Final</version> </plugin> </plugins> |
Example: <dependency> <groupId>com.ibm</groupId> <artifactId>icu</artifactId> <systemPath>${basedir}/src/main/webapp/WEB-INF/lib/com.ibm.icu_58.2.0.v20170418-1837.jar</systemPath> <scope>system</scope> <version>1.0.0</version> </dependency> |