Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Maven install does not create class files

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to build my maven project using maven install,but to my surprise sometimes it creates class files, and sometimes it does not.maven version is 3.5 and jdk 1.7.
Can anyone help me, what coud be the issue?
 
Sheriff
Posts: 7108
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you please TellTheDetails (that's a link)?  Give us an example of what command you issued, what was the result, and what you expected.
 
Curious User
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Knute Snortum wrote:Could you please TellTheDetails (that's a link)?  Give us an example of what command you issued, what was the result, and what you expected.




I issued mvn -X install -DskipTests=true.
I expected that the class files would compile and get generated in the WEB-INF/ folder but it is not getting generated.Although the build is success.

 
Knute Snortum
Sheriff
Posts: 7108
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you post your POM file?

But before that, Maven's default directory for class files is ${basedir}/target/classes.  Have you changed the target directory in your POM?  If not, look in target/classes.
 
Saloon Keeper
Posts: 12128
258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Furthermore, can you post the Maven output?
 
Curious User
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<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.myapps</groupId>
   <artifactId>cps-ejb</artifactId>
   <packaging>ejb</packaging>
   <name>EJB module</name>

   <parent>
       <groupId>com.myapps</groupId>
       <artifactId>cps-all</artifactId>
       <version>2.0.0-SNAPSHOT</version>
       <relativePath>../../pom.xml</relativePath>
   </parent>

   <build>
       <plugins>
           <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-ejb-plugin</artifactId>
               <version>2.3</version>
               <configuration>
                   <jarName>ejb</jarName>
                   <ejbVersion>2.1</ejbVersion>
                   <archive>
                       <manifest>
                           <addClasspath>true</addClasspath>
                           <classpathPrefix>lib/</classpathPrefix>
                       </manifest>
                       <manifestEntries>
                           <Dependencies>oracle.jdbc, com.myapps.config</Dependencies>
                       </manifestEntries>
                   </archive>
               </configuration>
           </plugin>
       </plugins>
   </build>

   <dependencies>
       <dependency>
           <groupId>com.myapps</groupId>
           <artifactId>common</artifactId>
           <version>2.0.0-SNAPSHOT</version>
           <type>jar</type>
       </dependency>
       <dependency>
           <groupId>com.myapps</groupId>
           <artifactId>calc</artifactId>
           <version>2.0.0-SNAPSHOT</version>
           <type>jar</type>
       </dependency>
       <dependency>
           <groupId>com.oracle</groupId>
           <artifactId>ojdbc6</artifactId>
           <!-- <version>6</version> -->
           <version>11.2.0.3</version>
           <scope>provided</scope>
       </dependency>
       <dependency>
           <groupId>axis</groupId>
           <artifactId>axis</artifactId>
           <version>1.4</version>
       </dependency>
       <!-- <dependency>
           <groupId>axisCognosClient</groupId>
           <artifactId>axisCognosClient</artifactId>
           <version>10.1</version>
       </dependency> -->
       <dependency>
           <groupId>org.codehaus.castor</groupId>
           <artifactId>castor</artifactId>
           <version>1.1.2.1</version>
       </dependency>
       <dependency>
           <groupId>junit</groupId>
           <artifactId>junit</artifactId>
           <version>4.8.1</version>
           <scope>test</scope>
       </dependency>
       <!--
       <dependency>
           <groupId>xerces</groupId>
           <artifactId>xercesImpl</artifactId>
           <version>2.8.0</version>
       </dependency>
             -->      
       <dependency>
           <groupId>commons-beanutils</groupId>
           <artifactId>commons-beanutils</artifactId>
           <version>1.7.0</version>
       </dependency>
       <dependency>
           <groupId>commons-digester</groupId>
           <artifactId>commons-digester</artifactId>
           <version>1.6</version>
           <exclusions>
               <exclusion>
                   <artifactId>xml-apis</artifactId>
                   <groupId>xml-apis</groupId>
               </exclusion>
           </exclusions>
       </dependency>
       <dependency>
           <groupId>org.apache.xmlgraphics</groupId>
           <artifactId>fop</artifactId>
           <version>2.2</version>
       </dependency>
       <dependency>
           <groupId>com.ibm.icu</groupId>
           <artifactId>icu4j</artifactId>
           <version>3.4.4</version>
       </dependency>
       <dependency>
           <groupId>org.apache.tomcat</groupId>
           <artifactId>jasper-el</artifactId>
           <version>6.0.36</version>
       </dependency>
       <dependency>
           <groupId>net.sf.jasperreports</groupId>
           <artifactId>jasperreports</artifactId>
           <version>4.7.1</version>
           <exclusions>
               <exclusion>
                   <artifactId>xml-apis</artifactId>
                   <groupId>xml-apis</groupId>
               </exclusion>
           </exclusions>
       </dependency>
       <dependency>
           <groupId>log4j</groupId>
           <artifactId>log4j</artifactId>
           <version>1.2.16</version>
       </dependency>
       <dependency>
           <groupId>org.apache.poi</groupId>
           <artifactId>poi</artifactId>
           <version>3.8</version>
       </dependency>
       <dependency>
           <groupId>org.apache.poi</groupId>
           <artifactId>poi-ooxml</artifactId>
           <version>3.8</version>
           <exclusions>
               <exclusion>
                   <artifactId>xml-apis</artifactId>
                   <groupId>xml-apis</groupId>
               </exclusion>
           </exclusions>
       </dependency>
       <dependency>
           <groupId>org.apache.poi</groupId>
           <artifactId>poi-ooxml-schemas</artifactId>
           <version>3.8</version>
           <scope>runtime</scope>
           <exclusions>
               <exclusion>
                   <artifactId>stax-api</artifactId>
                   <groupId>stax</groupId>
               </exclusion>
           </exclusions>
       </dependency>
       
     
 <dependency>
   <groupId>org.jboss.as</groupId>
   <artifactId>jboss-as-ejb-client-bom</artifactId>
   <version>7.1.1.Final</version>
   <type>pom</type>
 </dependency>
</dependencies>
       
</project>
 
Don't count your weasels before they've popped. And now for a mulberry bush related tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic