hey there,
in a project I am involved, someone put a test class in main code. eclipse would not find the bug but mvn, not that in eclipse, would report a compile error, and we found the bug.

because of that, I wanted to build my new maven project without configuring it as a maven project in eclipse. I have been trying to run my skeleton app on tomcat two days and it refused to do so. only when I gave up and converted it to maven did I find that there was nothing wrong with my code, but Tomcat/Eclipse for some reason fails to run my app because it is not eclipse maven plugin enabled.

My question is how do I go about finding out what is happening? what is maven plugin doing? any suggestions are welcome. thanks in advance.

Please post your pom.xml so we can have look at it

hey peter+budo, sorry for this late reply. note, I changed my artifactId here from the original one. otherwise, the pom is completely the as is in my project.

<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.mynew.app</groupId>
    <artifactId>MyNewApp</artifactId>
    <packaging>war</packaging>
    <version>0.9</version>
    <name>MyNewApp Maven Webapp</name>
    <url>http://maven.apache.org</url>

    <!-- Shared version number properties -->
    <properties>
        <org.springframework.version>3.2.3.RELEASE</org.springframework.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.8.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-orm</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-entitymanager</artifactId>
            <version>4.2.3.Final</version>
        </dependency>
        <dependency>
            <groupId>commons-dbcp</groupId>
            <artifactId>commons-dbcp</artifactId>
            <version>1.2.2</version>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.6</version>
        </dependency>
        <dependency>
            <groupId>org.jboss.logging</groupId>
            <artifactId>jboss-logging</artifactId>
            <version>3.1.3.GA</version>
        </dependency>
        <dependency>
            <groupId>dom4j</groupId>
            <artifactId>dom4j</artifactId>
            <version>1.6.1</version>
        </dependency>
    </dependencies>
    <build>
        <finalName>MyNewApp</finalName>
    </build>
</project>

Nothing wrong with POM. Yu just need to setup proper cofiguration in Eclipse. In IntelliJ you can manually specify which folder is source code, where to find resources and where is test.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.