maven eclipse

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

maven eclipse

Adrian Herscu
Hi all,

Using Maven 1.0.2.

maven eclipse generates only the test entry in the .classpath file

<classpathentry
        output="target/test-classes"
        kind="src"
        path="src/test">
</classpathentry>

this one should be manually added (otherwise the project will not build
in Eclipse):

<classpathentry
        output="target/classes"
        kind="src"
        path="src/main/java">
</classpathentry>

Note that the source paths are generated according to the old Maven
directory layout (not as described here:
http://maven.apache.org/reference/conventions.html#Directory_Structure).

Adrian.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: maven eclipse

Kristian Nordal
On 5/21/05, Adrian Herscu <[hidden email]> wrote:
> Hi all,
>
> Using Maven 1.0.2.
>
> maven eclipse generates only the test entry in the .classpath file

Hi,

Have you specified the src/main/java directory as a source directory
in your POM? Inside your <build> :
<sourceDirectory>src/main/java</sourceDirectory>

--
Kristian

> <classpathentry
>         output="target/test-classes"
>         kind="src"
>         path="src/test">
> </classpathentry>
>
> this one should be manually added (otherwise the project will not build
> in Eclipse):
>
> <classpathentry
>         output="target/classes"
>         kind="src"
>         path="src/main/java">
> </classpathentry>
>
> Note that the source paths are generated according to the old Maven
> directory layout (not as described here:
> http://maven.apache.org/reference/conventions.html#Directory_Structure).
>
> Adrian.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: maven eclipse

Adrian Herscu
Thanks for your reply Kristian.

Here is a fragment of the POM (generated by maven genapp):
<build>
<nagEmailAddress>[hidden email]</nagEmailAddress>
     <sourceDirectory>src/java</sourceDirectory>
     <unitTestSourceDirectory>src/test</unitTestSourceDirectory>
     <unitTest>
       <includes>
         <include>**/*Test.java</include>
       </includes>
       <excludes>
         <exclude>**/NaughtyTest.java</exclude>
       </excludes>
     </unitTest>
     <resources>
       <resource>
         <directory>src/conf</directory>
         <includes>
           <include>*.properties</include>
         </includes>
       </resource>
     </resources>
</build>

So it should generate a:

<classpathentry
         output="target/classes"
         kind="src"
         path="src/java">
</classpathentry>

... or I am doing something wrong.

Adrian.

Kristian Nordal wrote:

> On 5/21/05, Adrian Herscu <[hidden email]> wrote:
>
>>Hi all,
>>
>>Using Maven 1.0.2.
>>
>>maven eclipse generates only the test entry in the .classpath file
>
>
> Hi,
>
> Have you specified the src/main/java directory as a source directory
> in your POM? Inside your <build> :
> <sourceDirectory>src/main/java</sourceDirectory>
>
> --
> Kristian
>
>
>><classpathentry
>>        output="target/test-classes"
>>        kind="src"
>>        path="src/test">
>></classpathentry>
>>
>>this one should be manually added (otherwise the project will not build
>>in Eclipse):
>>
>><classpathentry
>>        output="target/classes"
>>        kind="src"
>>        path="src/main/java">
>></classpathentry>
>>
>>Note that the source paths are generated according to the old Maven
>>directory layout (not as described here:
>>http://maven.apache.org/reference/conventions.html#Directory_Structure).
>>
>>Adrian.
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: maven eclipse

Kristian Nordal
On 5/21/05, Adrian Herscu <[hidden email]> wrote:

> Thanks for your reply Kristian.
>
> Here is a fragment of the POM (generated by maven genapp):
> <build>
> <nagEmailAddress>[hidden email]</nagEmailAddress>
>      <sourceDirectory>src/java</sourceDirectory>
>      <unitTestSourceDirectory>src/test</unitTestSourceDirectory>
>      <unitTest>
>        <includes>
>          <include>**/*Test.java</include>
>        </includes>
>        <excludes>
>          <exclude>**/NaughtyTest.java</exclude>
>        </excludes>
>      </unitTest>
>      <resources>
>        <resource>
>          <directory>src/conf</directory>
>          <includes>
>            <include>*.properties</include>
>          </includes>
>        </resource>
>      </resources>
> </build>
>
> So it should generate a:
>
> <classpathentry
>          output="target/classes"
>          kind="src"
>          path="src/java">
> </classpathentry>

Here it generates two classpathentry elements:
<classpathentry excluding="" kind="src" path="src/java"></classpathentry>
...
<classpathentry kind="output" path="target/classes"></classpathentry>

It works fine here.

--
Kristian

> ... or I am doing something wrong.
>
> Adrian.
>
> Kristian Nordal wrote:
> > On 5/21/05, Adrian Herscu <[hidden email]> wrote:
> >
> >>Hi all,
> >>
> >>Using Maven 1.0.2.
> >>
> >>maven eclipse generates only the test entry in the .classpath file
> >
> >
> > Hi,
> >
> > Have you specified the src/main/java directory as a source directory
> > in your POM? Inside your <build> :
> > <sourceDirectory>src/main/java</sourceDirectory>
> >
> > --
> > Kristian
> >
> >
> >><classpathentry
> >>        output="target/test-classes"
> >>        kind="src"
> >>        path="src/test">
> >></classpathentry>
> >>
> >>this one should be manually added (otherwise the project will not build
> >>in Eclipse):
> >>
> >><classpathentry
> >>        output="target/classes"
> >>        kind="src"
> >>        path="src/main/java">
> >></classpathentry>
> >>
> >>Note that the source paths are generated according to the old Maven
> >>directory layout (not as described here:
> >>http://maven.apache.org/reference/conventions.html#Directory_Structure).
> >>
> >>Adrian.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: maven eclipse

Adrian Herscu
Yes, my mistake.
I missed that because it shows at the end of the file.

Kristian Nordal wrote:

> On 5/21/05, Adrian Herscu <[hidden email]> wrote:
>
>>Thanks for your reply Kristian.
>>
>>Here is a fragment of the POM (generated by maven genapp):
>><build>
>><nagEmailAddress>[hidden email]</nagEmailAddress>
>>     <sourceDirectory>src/java</sourceDirectory>
>>     <unitTestSourceDirectory>src/test</unitTestSourceDirectory>
>>     <unitTest>
>>       <includes>
>>         <include>**/*Test.java</include>
>>       </includes>
>>       <excludes>
>>         <exclude>**/NaughtyTest.java</exclude>
>>       </excludes>
>>     </unitTest>
>>     <resources>
>>       <resource>
>>         <directory>src/conf</directory>
>>         <includes>
>>           <include>*.properties</include>
>>         </includes>
>>       </resource>
>>     </resources>
>></build>
>>
>>So it should generate a:
>>
>><classpathentry
>>         output="target/classes"
>>         kind="src"
>>         path="src/java">
>></classpathentry>
>
>
> Here it generates two classpathentry elements:
> <classpathentry excluding="" kind="src" path="src/java"></classpathentry>
> ...
> <classpathentry kind="output" path="target/classes"></classpathentry>
>
> It works fine here.
>
> --
> Kristian
>
>
>>... or I am doing something wrong.
>>
>>Adrian.
>>
>>Kristian Nordal wrote:
>>
>>>On 5/21/05, Adrian Herscu <[hidden email]> wrote:
>>>
>>>
>>>>Hi all,
>>>>
>>>>Using Maven 1.0.2.
>>>>
>>>>maven eclipse generates only the test entry in the .classpath file
>>>
>>>
>>>Hi,
>>>
>>>Have you specified the src/main/java directory as a source directory
>>>in your POM? Inside your <build> :
>>><sourceDirectory>src/main/java</sourceDirectory>
>>>
>>>--
>>>Kristian
>>>
>>>
>>>
>>>><classpathentry
>>>>       output="target/test-classes"
>>>>       kind="src"
>>>>       path="src/test">
>>>></classpathentry>
>>>>
>>>>this one should be manually added (otherwise the project will not build
>>>>in Eclipse):
>>>>
>>>><classpathentry
>>>>       output="target/classes"
>>>>       kind="src"
>>>>       path="src/main/java">
>>>></classpathentry>
>>>>
>>>>Note that the source paths are generated according to the old Maven
>>>>directory layout (not as described here:
>>>>http://maven.apache.org/reference/conventions.html#Directory_Structure).
>>>>
>>>>Adrian.
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]