java - Maven not copying .class files to target while in building though build runs fine in Unix,but the same works in eclipse -


hi have following pom configuration maven compiler plugin in parent pom.xml below

<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> <groupid>com.test</groupid> <artifactid>prj-parent</artifactid> <version>0.0.1-snapshot</version> <packaging>pom</packaging> <name>parent</name> <description>parent</description> <modules>     <module>service</module>     <module>web</module> </modules> <properties>     <project.build.sourceencoding>utf-8</project.build.sourceencoding>     <java.version>1.7</java.version>     <project.build.sourceencoding>utf-8</project.build.sourceencoding>     <spring.version>4.0.4.release</spring.version>     <spring-social.version>1.0.3.release</spring-social.version>     <javax.validation.version>1.0.0.ga</javax.validation.version>     <org.projectlombok.version>1.12.6</org.projectlombok.version>     <slf4j-log4j12-version>1.7.5</slf4j-log4j12-version>     <spring.security.version>3.2.1.release</spring.security.version>     <jackson.version>2.2.2</jackson.version>     <camel-version>2.12.2</camel-version>     <camel-aws-version>2.13.1</camel-aws-version>     <dozer-version>5.4.0</dozer-version>     <junit.version>4.11</junit.version>     <guava.version>14.0.1</guava.version>     <force-api-version>28.0.0</force-api-version>     <commons-lang-version>2.6</commons-lang-version>     <ojdbc-version>11.2.0.3.0</ojdbc-version>     <httpclient.version>4.3.1</httpclient.version>     <mybatis-spring-version>1.2.2</mybatis-spring-version>     <oracle.ucp.version>11.2.0.3</oracle.ucp.version>     <org.hamcrest.version>1.3</org.hamcrest.version>     <atomikos.version>3.9.3</atomikos.version>     <spring-data-commons.version>1.8.0.release</spring-data-commons.version>     <jta.version>1.1</jta.version>     <rest-assured.version>2.3.1</rest-assured.version> </properties> <build>     <plugins>         <plugin>             <groupid>org.apache.maven.plugins</groupid>             <artifactid>maven-compiler-plugin</artifactid>             <version>3.1</version>             <configuration>                 <source>${java.version}</source>                 <target>${java.version}</target>                 <encoding>${project.build.sourceencoding}</encoding>                 <showdeprecation>true</showdeprecation>                 <showwarnings>true</showwarnings>                 <useincrementalcompilation>false</useincrementalcompilation>                 <verbose>true</verbose>             </configuration>         </plugin>         <plugin>             <groupid>org.apache.maven.plugins</groupid>             <artifactid>maven-dependency-plugin</artifactid>             <executions>                 <execution>                     <id>install</id>                     <phase>install</phase>                     <goals>                         <goal>copy-dependencies</goal>                     </goals>                 </execution>             </executions>         </plugin>         <plugin>             <groupid>org.apache.maven.plugins</groupid>             <artifactid>maven-eclipse-plugin</artifactid>             <version>2.9</version>             <configuration>                 <downloadsources>true</downloadsources>                 <downloadjavadocs>true</downloadjavadocs>             </configuration>         </plugin>     </plugins>     <pluginmanagement>         <plugins>             <!--this plugin's configuration used store eclipse m2e settings only. has no influence on                  maven build itself. -->             <plugin>                 <groupid>org.eclipse.m2e</groupid>                 <artifactid>lifecycle-mapping</artifactid>                 <version>1.0.0</version>                 <configuration>                     <lifecyclemappingmetadata>                         <pluginexecutions>                             <pluginexecution>                                 <pluginexecutionfilter>                                     <groupid>                                         org.apache.maven.plugins                                     </groupid>                                     <artifactid>                                         maven-antrun-plugin                                     </artifactid>                                     <versionrange>                                         [2.4,)                                     </versionrange>                                     <goals>                                         <goal>run</goal>                                     </goals>                                 </pluginexecutionfilter>                                 <action>                                     <ignore></ignore>                                 </action>                             </pluginexecution>                             <pluginexecution>                                 <pluginexecutionfilter>                                     <groupid>org.apache.maven.plugins</groupid>                                     <artifactid>maven-dependency-plugin</artifactid>                                     <versionrange>[2.1,)</versionrange>                                     <goals>                                         <goal>copy-dependencies</goal>                                     </goals>                                 </pluginexecutionfilter>                                 <action>                                     <ignore></ignore>                                 </action>                             </pluginexecution>                         </pluginexecutions>                     </lifecyclemappingmetadata>                 </configuration>             </plugin>         </plugins>     </pluginmanagement> </build> <repositories>           <repository>         <id>maven-restlet</id>         <name>public online restlet repository</name>         <url>http://maven.restlet.org</url>     </repository>     <repository>         <id>spring-milestone</id>         <name>spring portfolio milestone repository</name>         <url>http://maven.springframework.org/milestone </url>     </repository>     <repository>         <releases>             <enabled>true</enabled>         </releases>         <snapshots>             <enabled>false</enabled>         </snapshots>         <id>com.springsource.repository.maven.releases</id>         <name>spring framework maven general releases (maven central format)</name>         <url>http://maven.springframework.org/release</url>     </repository> </repositories> 

child pom

<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.test</groupid>     <artifactid>parent</artifactid>     <version>0.0.1-snapshot</version> </parent> <artifactid>service</artifactid> <name>service</name> <description>service layer concerned routing ,mapping , persistence</description> <build>     <finalname>service</finalname>     <plugins>         <plugin>             <artifactid>maven-antrun-plugin</artifactid>             <executions>                 <execution>                     <phase>process-resources</phase>                     <goals>                         <goal>run</goal>                     </goals>                     <configuration>                         <tasks>                             <copy file="src/main/resources/properties/app_${env}.properties" overwrite="true"                                 tofile="${project.build.outputdirectory}/properties/app.properties" />                             <propertyfile file="${project.build.outputdirectory}/properties/app.properties">                                 <entry key="test.buildnumber" value="${project.version}" />                             </propertyfile>                             <!-- copy dozer files <copy todir="${dozer.directory}"> <fileset dir="src/main/resources/dozer/"                                  /> </copy> -->                             <!-- <copy file="src/main/resources/properties/dfc_${env}.properties" overwrite="true" tofile="${project.build.outputdirectory}/dfc.properties"                                  /> -->                         </tasks>                     </configuration>                 </execution>             </executions>             <dependencies>                 <dependency>                     <groupid>ant</groupid>                     <artifactid>ant-optional</artifactid>                     <version>1.5.3-1</version>                 </dependency>             </dependencies>         </plugin>     </plugins>     <pluginmanagement>         <plugins>             <!--this plugin's configuration used store eclipse m2e settings only. has no influence on                  maven build itself. -->             <plugin>                 <groupid>org.eclipse.m2e</groupid>                 <artifactid>lifecycle-mapping</artifactid>                 <version>1.0.0</version>                 <configuration>                     <lifecyclemappingmetadata>                         <pluginexecutions>                             <pluginexecution>                                 <pluginexecutionfilter>                                     <groupid>                                         org.apache.maven.plugins                                     </groupid>                                     <artifactid>                                         maven-antrun-plugin                                     </artifactid>                                     <versionrange>                                         [1.3,)                                     </versionrange>                                     <goals>                                         <goal>run</goal>                                     </goals>                                 </pluginexecutionfilter>                                 <action>                                     <ignore></ignore>                                 </action>                             </pluginexecution>                         </pluginexecutions>                     </lifecyclemappingmetadata>                 </configuration>             </plugin>         </plugins>     </pluginmanagement> </build> <dependencies>     <!-- spring dependencies -->     <dependency>         <groupid>org.springframework</groupid>         <artifactid>spring-core</artifactid>         <version>${spring.version}</version>     </dependency>     <dependency>         <groupid>org.springframework</groupid>         <artifactid>spring-tx</artifactid>         <version>${spring.version}</version>     </dependency>     <dependency>         <groupid>org.springframework</groupid>         <artifactid>spring-web</artifactid>         <version>${spring.version}</version>         <scope>compile</scope>     </dependency>     <dependency>         <groupid>org.springframework</groupid>         <artifactid>spring-test</artifactid>         <version>${spring.version}</version>     </dependency>     <dependency>         <groupid>org.springframework</groupid>         <artifactid>spring-jdbc</artifactid>         <version>${spring.version}</version>     </dependency>     <dependency>         <groupid>org.springframework</groupid>         <artifactid>spring-context</artifactid>         <version>${spring.version}</version>     </dependency>      <dependency>         <groupid>org.springframework.social</groupid>         <artifactid>spring-social-core</artifactid>         <version>${spring-social.version}</version>     </dependency>     <!-- persistence -->     <dependency>         <groupid>com.oracle</groupid>         <artifactid>ucp</artifactid>         <version>${oracle.ucp.version}</version>     </dependency>     <dependency>         <groupid>org.mybatis</groupid>         <artifactid>mybatis-spring</artifactid>         <version>${mybatis-spring-version}</version>     </dependency>     <!-- <dependency> <groupid>com.atomikos</groupid> <artifactid>transactions-jta</artifactid> <version>${atomikos.version}</version>          </dependency> <dependency> <groupid>com.atomikos</groupid> <artifactid>transactions-jdbc</artifactid>          <version>${atomikos.version}</version> </dependency> <dependency> <groupid>javax.transaction</groupid>          <artifactid>jta</artifactid> <version>${jta.version}</version> </dependency> -->     <dependency>         <groupid>org.springframework.data</groupid>         <artifactid>spring-data-commons</artifactid>         <version>${spring-data-commons.version}</version>     </dependency>     <!-- sforce apis -->     <dependency>         <groupid>com.force.api</groupid>         <artifactid>force-partner-api</artifactid>         <version>${force-api-version}</version>     </dependency>     <!-- integration apis -->     <dependency>         <groupid>org.apache.camel</groupid>         <artifactid>camel-core</artifactid>         <version>${camel-version}</version>     </dependency>     <dependency>         <groupid>org.apache.camel</groupid>         <artifactid>camel-spring</artifactid>         <version>${camel-version}</version>     </dependency>     <dependency>         <groupid>org.apache.camel</groupid>         <artifactid>camel-aws</artifactid>         <version>${camel-aws-version}</version>     </dependency>     <dependency>         <groupid>org.apache.camel</groupid>         <artifactid>camel-test</artifactid>         <version>${camel-version}</version>     </dependency>     <dependency>         <groupid>org.apache.camel</groupid>         <artifactid>camel-test-spring</artifactid>         <version>${camel-version}</version>     </dependency>     <dependency>         <groupid>org.apache.camel</groupid>         <artifactid>camel-mybatis</artifactid>         <version>${camel-version}</version>     </dependency>     <dependency>         <groupid>org.apache.camel</groupid>         <artifactid>camel-spring-javaconfig</artifactid>         <version>${camel-version}</version>     </dependency>     <!-- convertor apis -->     <dependency>         <groupid>com.fasterxml.jackson.core</groupid>         <artifactid>jackson-databind</artifactid>         <version>${jackson.version}</version>     </dependency>     <!-- other dependencies -->     <dependency>         <groupid>org.apache.httpcomponents</groupid>         <artifactid>httpclient</artifactid>         <version>${httpclient.version}</version>     </dependency>     <dependency>         <groupid>com.oracle</groupid>         <artifactid>ojdbc6</artifactid>         <version>${ojdbc-version}</version>     </dependency>     <dependency>         <groupid>commons-lang</groupid>         <artifactid>commons-lang</artifactid>         <version>${commons-lang-version}</version>     </dependency>     <dependency>         <groupid>com.google.guava</groupid>         <artifactid>guava</artifactid>         <version>${guava.version}</version>     </dependency>     <dependency>         <groupid>net.sf.dozer</groupid>         <artifactid>dozer</artifactid>         <version>${dozer-version}</version>     </dependency>     <dependency>         <groupid>org.slf4j</groupid>         <artifactid>slf4j-log4j12</artifactid>         <version>${slf4j-log4j12-version}</version>     </dependency>     <dependency>         <groupid>org.projectlombok</groupid>         <artifactid>lombok</artifactid>         <version>${org.projectlombok.version}</version>     </dependency>     <!-- test -->     <dependency>         <groupid>org.hamcrest</groupid>         <artifactid>hamcrest-core</artifactid>         <version>${org.hamcrest.version}</version>         <scope>test</scope>     </dependency>     <dependency>         <groupid>org.hamcrest</groupid>         <artifactid>hamcrest-library</artifactid>         <version>${org.hamcrest.version}</version>         <scope>test</scope>     </dependency>     <dependency>         <groupid>junit</groupid>         <artifactid>junit</artifactid>         <version>${junit.version}</version>     </dependency> </dependencies> 

this 1 in parent module , have 2 child modules .while building on eclipse works fine , see classes resources in target folder while building on unix build not copy class files although states in line below ,though resources copied.the version of java have 1.7

command used in unix

mvn -x clean install package -dmaven.test.skip=true -denv=test -dversion=0.1

maven version apache maven 3.0.3

[info] compiling 82 source files /build/project/xyz/build/0.1/xyz-service/target/classes 

can please pretty weird issue facing !!

hi figured out while compiling in verbose mode .seems 1 of class not getting compiled due strange issues cause of lombok annotation .but strange neither javac nor maven flush errors , signal build successful ..

so sort of corrected class removing annotation , looks .. :)

not sure issues maven or javac either should @ such scenarios seems me possible bugs

links helped

http://mail-archives.apache.org/mod_mbox/maven-users/201307.mbox/%3ccabn1dbpn3vcxpifs6squzsk0zkuz9kz=h8lhuc2qr2mog7azow@mail.gmail.com%3e

javac issue


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -