Re: [maven-and-scala] Issues with compiling multiple source folders

91 views
Skip to first unread message

Martin Grigorov

unread,
May 16, 2013, 12:41:25 PM5/16/13
to maven-a...@googlegroups.com
Hi,


On Thu, May 16, 2013 at 7:07 PM, Rivlin Pereira <rivlin....@gmail.com> wrote:
Hey Guys,

I am trying to compile multiple source folders using pom.xml and I am running into issues. The issue is it cannot find packages from my first source directory when I am running webdriver tests from the second source directory. Here is my project structure -


-->main
     --> java
        --> core <-- this is a package
            --> file1.java
        --> pageobjects <-- this is a package
            --> file2.java
  -->test
     --> java
        --> package1
           --> file1.java
           --> file2.java
        --> package2
        --> package3
        --> package4
        --> package5
        --> package6

It compiles cleanly but when i use this command i throws errors saying that package core not found which is in src/main/java/. Here is the command that I use to run my test suite -mvn clean test -DsuiteFile=resources/test-suites/audioSuite.xml

My pom.xml is -

<?xml version="1.0" encoding="UTF-8"?>
    <modelVersion>4.0.0</modelVersion>
    <groupId>core-publisher</groupId>
    <artifactId>core-publisher</artifactId>
    <packaging>pom</packaging>
    <version>1.0</version>
    <url>http://maven.apache.org</url>
    <modules>
        <module>tests</module>
    </modules>
    <build>
        <plugins>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-compiler-plugin</artifactId>
                    <configuration>
                       <includes>
                         <include>src/main/java</include>
                       <include>src/main/test</include>
                       </includes>
                    </configuration>
             </plugin>
            <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>

Why there are two declarations of maven-compiler-plugin ?
 
            <executions>
                <execution>
                    <phase>compile</phase>
                    <goals>
                        <goal>compile</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <encoding>iso-8859-1</encoding>
                <source>1.6</source>
                <target>1.6</target>
            </configuration>
            </plugin>
        </plugins>
    </build>
    <dependencies>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>6.8.1</version>
            <scope>test</scope>
        </dependency>
    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-server</artifactId>
        <version>2.32.0</version>
        <exclusions>
            <exclusion>
                <groupId>com.opera</groupId>
                <artifactId>operadriver</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.6</version>
        </dependency>
        <dependency>
            <groupId>net.sourceforge.saxon</groupId>
            <artifactId>saxon</artifactId>
            <version>9.1.0.8</version>
        </dependency>
        <dependency>
            <groupId>net.java.dev.msv</groupId>
            <artifactId>msv-testharness</artifactId>
            <version>2009.1</version>
        </dependency>
        <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.8.2</version>
    </dependency>
</dependencies>
    <repositories>
        <repository>
            <id>saucelabs-repository</id>
        </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <id>testng-xslt-plugin</id>
            <url>http://www.cosminaru.ro/maven/</url>
        </pluginRepository>
    </pluginRepositories>
    <ciManagement>
        <system>Jenkins CI</system>
    </ciManagement>
</project>

I would greatly appreciate any help on this.

There is nothing about Scala here. 
Are you sure your question is for scala-maven-plugin ?
 

Thanks in advance.

Best,
Rivlin

--
 
---
You received this message because you are subscribed to the Google Groups "Maven and Scala" group.
To unsubscribe from this group and stop receiving emails from it, send an email to maven-and-sca...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Rivlin Pereira

unread,
May 16, 2013, 12:54:28 PM5/16/13
to maven-a...@googlegroups.com
Hi Martin,

Sorry about that I forgot to take that out. This question was about maven the source code is compiling but when running my tests I get package not found  errors from the first source directory which is src/main/java/core
Reply all
Reply to author
Forward
0 new messages