You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by omritt <om...@verint.com> on 2012/08/20 06:38:17 UTC

Test failures on dependent maven projects

I have a multiple projects where project X is dependent on project Y. The
tests on project X uses project Y which reads a config file. ( X --> Y -->
configfile) I am excluding some configuration files from the JARs using the
maven-jar-plugin.

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-jar-plugin</artifactId>
    <version>2.3.1</version>
    <inherited>true</inherited>
    <configuration>
        <excludes>
                    <exclude>*.xml</exclude>
                    <exclude>*.*conf*</exclude>
                    <exclude>*.*prop*</exclude>
        </excludes>
    </configuration>
</plugin>

When running "Maven test" on my project everything works well and all test
are successful. But when running "Maven package" project X is failing its
tests because project Y cannot find the config file.

My best guess is that when running the "package" goal, project X runs
against the already built JAR of project Y instead of its .class files. Am I
correct? What can I do to fix this issue?



--
View this message in context: http://maven.40175.n5.nabble.com/Test-failures-on-dependent-maven-projects-tp5717563.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Test failures on dependent maven projects

Posted by Ron Wheeler <rw...@artifact-software.com>.
Why are you excluding things that you need to be in the jar?

Perhaps you can explain your real problem rather than the symptoms.

You are right about the use of the jar.
Where else could it get the classes from? Think about the answer to that 
one!

Ron

On 20/08/2012 12:38 AM, omritt wrote:
> I have a multiple projects where project X is dependent on project Y. The
> tests on project X uses project Y which reads a config file. ( X --> Y -->
> configfile) I am excluding some configuration files from the JARs using the
> maven-jar-plugin.
>
> <plugin>
>      <groupId>org.apache.maven.plugins</groupId>
>      <artifactId>maven-jar-plugin</artifactId>
>      <version>2.3.1</version>
>      <inherited>true</inherited>
>      <configuration>
>          <excludes>
>                      <exclude>*.xml</exclude>
>                      <exclude>*.*conf*</exclude>
>                      <exclude>*.*prop*</exclude>
>          </excludes>
>      </configuration>
> </plugin>
>
> When running "Maven test" on my project everything works well and all test
> are successful. But when running "Maven package" project X is failing its
> tests because project Y cannot find the config file.
>
> My best guess is that when running the "package" goal, project X runs
> against the already built JAR of project Y instead of its .class files. Am I
> correct? What can I do to fix this issue?
>
>
>
> --
> View this message in context: http://maven.40175.n5.nabble.com/Test-failures-on-dependent-maven-projects-tp5717563.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Ron Wheeler
President
Artifact Software Inc
email: rwheeler@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org