java - Why does the m2e plugin build to a WEB-INF/classes in the target folder for a maven jar project? -
since packaging jar (i.e. maven jar project), don't know why m2e insists on setting eclipse project's source folder's output write target/web-inf/classes. tried changing point build/classes, maven -> update project
changes back. why? missing project level setting?
update: added pom.xml
<?xml version="1.0" encoding="utf-8"?> <project xmlns="http://maven.apache.org/pom/4.0.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://maven.apache.org/pom/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelversion>4.0.0</modelversion> <parent> <groupid>com.mycompany.ta.wh</groupid> <artifactid>sales-master-pom</artifactid> <!-- <version>0.0.18</version> --> <version>[0.0.1,2.0.0)</version> </parent> <artifactid>amq2gcppubsub</artifactid> <version>0.1.33-snapshot</version> <packaging>jar</packaging> <name>amq2gcppubsub</name> <description>subscribes activemq queue , publishes google cloud platform pubsub topic.</description> <scm> <connection>scm:git:git://github.mycompany.com/dna/amq2gcppubsub</connection> <developerconnection>scm:git:ssh://github.mycompany.com/dna/amq2gcppubsub</developerconnection> <url>https://github.mycompany.com/dna/amq2gcppubsub</url> <tag>head</tag> </scm> <properties> <!-- dependency versions --> <javabatch.version>3.1</javabatch.version> <activemq.version>5.8.0</activemq.version> <!-- override master pom because conflicts activemq's slf4j version --> <slf4j.api.version>1.6.6</slf4j.api.version> </properties> <dependencies> <!-- <dependency> --> <!-- <groupid>org.slf4j</groupid> --> <!-- <artifactid>slf4j-api</artifactid> --> <!-- <version>1.6.6</version> --> <!-- </dependency> --> <dependency> <groupid>org.slf4j</groupid> <artifactid>slf4j-log4j12</artifactid> <version>1.6.6</version> <scope>test</scope> </dependency> <!-- <dependency conf="runtime" org="org.slf4j" name="slf4j-log4j12" rev="1.7.6"> --> <!-- <exclude module="log4j" /> --> <!-- </dependency> --> <dependency> <groupid>com.mycompany.ta.aa</groupid> <artifactid>javabatch</artifactid> <version>${javabatch.version}</version> </dependency> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-core</artifactid> <version>4.3.3.release</version> </dependency> <dependency> <!-- required javabatch --> <groupid>com.mycompany.ss.sh</groupid> <artifactid>thddao_taaadistributedbatch</artifactid> <version>2.15</version> <scope>runtime</scope> </dependency> <dependency> <groupid>com.google.http-client</groupid> <artifactid>google-http-client</artifactid> <version>1.22.0</version> </dependency> <dependency> <groupid>com.google.http-client</groupid> <artifactid>google-http-client-jackson2</artifactid> <version>1.22.0</version> </dependency> <dependency> <groupid>com.google.oauth-client</groupid> <artifactid>google-oauth-client</artifactid> <version>1.22.0</version> </dependency> <dependency> <groupid>com.google.api-client</groupid> <artifactid>google-api-client</artifactid> <version>1.22.0</version> </dependency> <dependency> <groupid>com.google.apis</groupid> <artifactid>google-api-services-pubsub</artifactid> </dependency> <dependency> <groupid>log4j</groupid> <artifactid>log4j</artifactid> <version>1.2.17</version> </dependency> <dependency> <groupid>javax.servlet</groupid> <artifactid>javax.servlet-api</artifactid> <version>3.0.1</version> <scope>provided</scope> </dependency> <dependency> <groupid>com.mycompany.ta.aa</groupid> <artifactid>thddao</artifactid> <version>2.17</version> <scope>provided</scope> </dependency> <dependency> <groupid>org.apache.activemq</groupid> <artifactid>activemq-client</artifactid> <version>${activemq.version}</version> </dependency> <dependency> <groupid>com.mycompany.ta.aa</groupid> <artifactid>tomarch</artifactid> <version>3.3.27</version> <scope>provided</scope> </dependency> <dependency> <groupid>commons-io</groupid> <artifactid>commons-io</artifactid> <version>2.4</version> </dependency> <dependency> <groupid>org.apache.commons</groupid> <artifactid>commons-lang3</artifactid> <version>3.4</version> </dependency> </dependencies> </project>
the reason happening because had "outputdirectory" tag in <build>
section of parent pom.
<!-- hot reload of web application --> <outputdirectory>${project.build.directory}/${project.build.finalname}/web-inf/classes </outputdirectory>
as removed that, maven update removed "web-inf" .classpath output directories.
Comments
Post a Comment