maven does not package .class when runs on hudson

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

maven does not package .class when runs on hudson

Aviad
Hi,

I am new to Maven.
I created a new project and I am trying to define Maven-based Hudson build.
I fail to understand what am I missing in pom.xml in order to make maven package .class files in jar when run on Hudson.

The .class files are packaged fine when I build locally on my machine from Eclipse IDE.
When I run the build on Hudson the .class are missing in the jar.
I see in the pom.xml in Eclipse that there are several directories refering to my local paths under build node when openned in Effective POM tab. When I switch to regular xml tab I do not see these definitions.

I tried manually to add the relative definitions to pom.xml but it did not help.

My current definitions:

        <build>
                <sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
                <scriptSourceDirectory>${project.basedir}/src/main/scripts</scriptSourceDirectory>
                <testSourceDirectory>${project.basedir}/src/test/java</testSourceDirectory>
                <outputDirectory>${project.build.directory}/classes</outputDirectory>
                <testOutputDirectory>${project.build.directory}/test-classes</testOutputDirectory>
                <resources>
                        <resource>
                                <directory>${project.basedir}/src/main/resources</directory>
                        </resource>
                </resources>
                <testResources>
                        <testResource>
                                <directory>${project.basedir}/src/test/resources</directory>
                        </testResource>
                </testResources>
                <directory>${project.basedir}/target</directory>


 
I'll appreciate any assistance understanding what went wrong.

Aviad