Re: [webdriver] Compiling multiple source folders using maven

12 views
Skip to first unread message

Krishnan Mahadevan

unread,
May 19, 2013, 12:37:53 PM5/19/13
to webd...@googlegroups.com
Rivlin,
You should try to post this on a much more relevant forum [ perhaps stackoverflow ? ]


On Thursday, May 16, 2013, Rivlin Pereira wrote:
Hey Guys,

Apologies for posting this question here, its not really a webdriver question but I am facing this issue which I want to resolve quickly. I am trying to compile multiple source folders using pom.xml and I am running into issues. The issue is it cannot find package core 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>
            <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.

Thanks in advance.

Best,
Rivlin

--
You received this message because you are subscribed to the Google Groups "webdriver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webdriver+...@googlegroups.com.
To post to this group, send email to webd...@googlegroups.com.
Visit this group at http://groups.google.com/group/webdriver?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 


--
Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/

Rivlin Pereira

unread,
May 19, 2013, 5:45:26 PM5/19/13
to webd...@googlegroups.com
Thanks Krishnan I have posted this on stackoverflow already and I think I have fixed this issue. Here is what I did-

In the (src/main/java) core package there was a base class I moved that to src/tests/java/newpackage and all was good. 


Reply all
Reply to author
Forward
0 new messages