You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Heritier Arnaud <ah...@axway.com> on 2004/05/26 17:38:05 UTC

RE : Maven eclipse plugin question re: source folder

Why do you call maven eclipse:generate-classpath ?

Call directly "maven eclipse"

It will generate the classpath, the project and the others files you need to import your project in Eclipse.

Arnaud

> -----Message d'origine-----
> De : Loren Siebert [mailto:loren@siebert.org] 
> Envoyé : mercredi 26 mai 2004 17:30
> À : users@maven.apache.org
> Objet : Maven eclipse plugin question re: source folder
> 
> 
> I'm trying out the maven eclipse plugin and am running into a 
> little problem. I'm using eclipse2.1.3 and 1.7 of the plugin.
> 
> When I run 'maven eclipse:generate-classpath', eclipse loses 
> the notion of my source code folder being a "Source Folder" 
> and it also loses the concept of "Package" folders inside. 
> This makes Eclipse ignore these folders for purposes of 
> incremental compilation, as it no longer associates them with 
> Java code.
> 
> I don't even see where eclipse stores this meta information 
> about the source folder, so I'm not even sure it's a 
> maven/eclipse plugin bug, but that maven goal is what makes 
> it happen. I looked through the list of outstanding bugs and 
> the list archive and didn't see anything related to what I'm seeing.
> 
> Am I missing something obvious or should I file it as a bug?
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 

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


Re: Maven eclipse plugin question re: source folder

Posted by Peter Shillan <gp...@roe.ac.uk>.
Hi there,

On Wednesday 26 May 2004 17:29, Al Robertson wrote:
> I had a problem with the maven eclipse:generate-classpath as well.
> With me, it is due to having 2 or 3 src folders.
> Specifying src/java and src/test/java generated

Using both goals - eclipse:generate-project and eclipse:generate-classpath - 
together then doing a Refresh in Eclipse has always worked for me.  I would 
give you a tip though.  I don't think either Maven or Eclipse will be too 
keen on your directory structure.  Consider moving src/test/java to test/java 
so that you have:

src/java
test/java

at the same level.  This is the recommended Maven way and I'm not positive, 
but I don't think Eclipse will be happy with your arrangement.

Cheers,

Peter. 

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


Re: Maven eclipse plugin question re: source folder

Posted by Loren Siebert <lo...@siebert.org>.
Hmmm...mine seems to be a different issue. I only have one source folder.
Even when the .classpath file gets regenerated without any changes being
made to it (i.e., I re-run "maven eclipse:generate-classpath"), Eclipse2.1.3
suddenly sees my source folder as a plain file folder.

Here's my .classpath from maven:
<?xml version="1.0" encoding="UTF-8"?>

<classpath>

<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>

<classpathentry kind="var"
path="MAVEN_REPO/servletapi/jars/servletapi-2.3.jar"/>

<classpathentry kind="var" path="MAVEN_REPO/log4j/jars/log4j-1.2.8.jar"/>

<classpathentry kind="var"
path="MAVEN_REPO/jetty/jars/org.mortbay.jetty-5.0.RC0.jar"/>

<classpathentry kind="src" path="src"/>

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

</classpath>


----- Original Message ----- 
From: "Al Robertson" <al...@digitalunion.com>
To: "Maven Users List" <us...@maven.apache.org>
Sent: Wednesday, May 26, 2004 9:29 AM
Subject: Re: Maven eclipse plugin question re: source folder


I had a problem with the maven eclipse:generate-classpath as well.
With me, it is due to having 2 or 3 src folders.
Specifying src/java and src/test/java generated

<classpath>
  <classpathentry excluding="" kind="src" path="src\java">
  </classpathentry>
  <classpathentry output="target\test-classes" kind="src"
path="src\test\java">
  </classpathentry>
  <classpathentry kind="var" path="MAVEN_REPO/junit/jars/junit-3.8.1.jar">
  </classpathentry>
.......
  <classpathentry kind="var" path="MAVEN_REPO/j2ee/jars/j2ee-1.2.jar">
  </classpathentry>
  <classpathentry kind="var" path="MAVEN_REPO/log4j/jars/log4j-1.2.8.jar">
  </classpathentry>
  <classpathentry kind="output" path="target\classes">
  </classpathentry>
</classpath>

When I select project->properties->Java Build Path, all panes are empty.
If I remove the entry where path="src\test\java", all is readable again.

This may be a different problem,
HTH,
Al

Digital Union UK
al.robertson@digitalunion.com
www.digitalunion.com

t: +44 (0) 1483 889482  m:+44 (0) 7713 631367  f: +44 (0) 1483 889450

The information in this email and in any attachment(s) is confidential. If
you are not the named addressee(s) or if you receive this email in error
then any distribution, copying or use of this communication or the
information in it is strictly prohibited.
While attachments are virus checked, Digital Union UK Limited does not
accept any liability in respect of any virus which is not detected.



"Loren Siebert" <lo...@siebert.org>
26/05/2004 17:03
Please respond to
"Maven Users List" <us...@maven.apache.org>


To
"Maven Users List" <us...@maven.apache.org>
cc

Subject
Re: Maven eclipse plugin question re: source folder






My project is already imported into eclipse using "maven eclipse", and
it's
working ok. As I do new development, I add dependencies to the project.xml
file and need to update my classpath.xml file (for ant builds) and my
.classpath file (for eclipse incremental builds). For the former, I run
"maven javagen:classpath", which works fine. To update my .classpath, I
run
"maven eclipse:generate-classpath". This updates the .classpath file just
fine, but it also seems to nuke some sort of meta information about my
source folder that makes eclipse no longer see it as Java source code to
be
compiled incrementally.

This seems like something everyone would have run into, so I wonder what I
am doing differently. Any ideas?

----- Original Message ----- 
From: "Heritier Arnaud" <ah...@axway.com>
To: "Maven Users List" <us...@maven.apache.org>
Sent: Wednesday, May 26, 2004 8:38 AM
Subject: RE : Maven eclipse plugin question re: source folder


Why do you call maven eclipse:generate-classpath ?

Call directly "maven eclipse"

It will generate the classpath, the project and the others files you need to
import your project in Eclipse.

Arnaud

> -----Message d'origine-----
> De : Loren Siebert [mailto:loren@siebert.org]
> Envoyé : mercredi 26 mai 2004 17:30
> À : users@maven.apache.org
> Objet : Maven eclipse plugin question re: source folder
>
>
> I'm trying out the maven eclipse plugin and am running into a
> little problem. I'm using eclipse2.1.3 and 1.7 of the plugin.
>
> When I run 'maven eclipse:generate-classpath', eclipse loses
> the notion of my source code folder being a "Source Folder"
> and it also loses the concept of "Package" folders inside.
> This makes Eclipse ignore these folders for purposes of
> incremental compilation, as it no longer associates them with
> Java code.
>
> I don't even see where eclipse stores this meta information
> about the source folder, so I'm not even sure it's a
> maven/eclipse plugin bug, but that maven goal is what makes
> it happen. I looked through the list of outstanding bugs and
> the list archive and didn't see anything related to what I'm seeing.
>
> Am I missing something obvious or should I file it as a bug?
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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




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




<div style="width:450px; border-top: 1px solid black; border-bottom: 1px
solid black; font-family: Arial; font-size: 8pt">
<p>This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they are
addressed.&nbsp; If you have received this email in error please notify your
system administrator. <br/><br/>While attachments are virus checked, Digital
Union UK Limited does not accept any liability in respect of any virus which
is not detected.</p>
</div>




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


Re: Maven eclipse plugin question re: source folder

Posted by Al Robertson <al...@digitalunion.com>.
I had a problem with the maven eclipse:generate-classpath as well. 
With me, it is due to having 2 or 3 src folders.
Specifying src/java and src/test/java generated 

<classpath>
  <classpathentry excluding="" kind="src" path="src\java">
  </classpathentry>
  <classpathentry output="target\test-classes" kind="src" 
path="src\test\java">
  </classpathentry>
  <classpathentry kind="var" path="MAVEN_REPO/junit/jars/junit-3.8.1.jar">
  </classpathentry>
.......
  <classpathentry kind="var" path="MAVEN_REPO/j2ee/jars/j2ee-1.2.jar">
  </classpathentry>
  <classpathentry kind="var" path="MAVEN_REPO/log4j/jars/log4j-1.2.8.jar">
  </classpathentry>
  <classpathentry kind="output" path="target\classes">
  </classpathentry>
</classpath>

When I select project->properties->Java Build Path, all panes are empty.
If I remove the entry where path="src\test\java", all is readable again.

This may be a different problem,
HTH,
Al

Digital Union UK
al.robertson@digitalunion.com
www.digitalunion.com

t: +44 (0) 1483 889482  m:+44 (0) 7713 631367  f: +44 (0) 1483 889450

The information in this email and in any attachment(s) is confidential. If you are not the named addressee(s) or if you receive this email in error then any distribution, copying or use of this communication or the 
information in it is strictly prohibited.
While attachments are virus checked, Digital Union UK Limited does not 
accept any liability in respect of any virus which is not detected.



"Loren Siebert" <lo...@siebert.org> 
26/05/2004 17:03
Please respond to
"Maven Users List" <us...@maven.apache.org>


To
"Maven Users List" <us...@maven.apache.org>
cc

Subject
Re: Maven eclipse plugin question re: source folder






My project is already imported into eclipse using "maven eclipse", and 
it's
working ok. As I do new development, I add dependencies to the project.xml
file and need to update my classpath.xml file (for ant builds) and my
.classpath file (for eclipse incremental builds). For the former, I run
"maven javagen:classpath", which works fine. To update my .classpath, I 
run
"maven eclipse:generate-classpath". This updates the .classpath file just
fine, but it also seems to nuke some sort of meta information about my
source folder that makes eclipse no longer see it as Java source code to 
be
compiled incrementally.

This seems like something everyone would have run into, so I wonder what I
am doing differently. Any ideas?

----- Original Message ----- 
From: "Heritier Arnaud" <ah...@axway.com>
To: "Maven Users List" <us...@maven.apache.org>
Sent: Wednesday, May 26, 2004 8:38 AM
Subject: RE : Maven eclipse plugin question re: source folder


Why do you call maven eclipse:generate-classpath ?

Call directly "maven eclipse"

It will generate the classpath, the project and the others files you need to
import your project in Eclipse.

Arnaud

> -----Message d'origine-----
> De : Loren Siebert [mailto:loren@siebert.org]
> Envoyé : mercredi 26 mai 2004 17:30
> À : users@maven.apache.org
> Objet : Maven eclipse plugin question re: source folder
>
>
> I'm trying out the maven eclipse plugin and am running into a
> little problem. I'm using eclipse2.1.3 and 1.7 of the plugin.
>
> When I run 'maven eclipse:generate-classpath', eclipse loses
> the notion of my source code folder being a "Source Folder"
> and it also loses the concept of "Package" folders inside.
> This makes Eclipse ignore these folders for purposes of
> incremental compilation, as it no longer associates them with
> Java code.
>
> I don't even see where eclipse stores this meta information
> about the source folder, so I'm not even sure it's a
> maven/eclipse plugin bug, but that maven goal is what makes
> it happen. I looked through the list of outstanding bugs and
> the list archive and didn't see anything related to what I'm seeing.
>
> Am I missing something obvious or should I file it as a bug?
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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




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




<div style="width:450px; border-top: 1px solid black; border-bottom: 1px solid black; font-family: Arial; font-size: 8pt">
<p>This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed.&nbsp; If you have received this email in error please notify your system administrator. <br/><br/>While attachments are virus checked, Digital Union UK Limited does not accept any liability in respect of any virus which is not detected.</p>
</div>


Re: Maven eclipse plugin question re: source folder

Posted by Loren Siebert <lo...@siebert.org>.
My project is already imported into eclipse using "maven eclipse", and it's
working ok. As I do new development, I add dependencies to the project.xml
file and need to update my classpath.xml file (for ant builds) and my
.classpath file (for eclipse incremental builds). For the former, I run
"maven javagen:classpath", which works fine. To update my .classpath, I run
"maven eclipse:generate-classpath". This updates the .classpath file just
fine, but it also seems to nuke some sort of meta information about my
source folder that makes eclipse no longer see it as Java source code to be
compiled incrementally.

This seems like something everyone would have run into, so I wonder what I
am doing differently. Any ideas?

----- Original Message ----- 
From: "Heritier Arnaud" <ah...@axway.com>
To: "Maven Users List" <us...@maven.apache.org>
Sent: Wednesday, May 26, 2004 8:38 AM
Subject: RE : Maven eclipse plugin question re: source folder


Why do you call maven eclipse:generate-classpath ?

Call directly "maven eclipse"

It will generate the classpath, the project and the others files you need to
import your project in Eclipse.

Arnaud

> -----Message d'origine-----
> De : Loren Siebert [mailto:loren@siebert.org]
> Envoyé : mercredi 26 mai 2004 17:30
> À : users@maven.apache.org
> Objet : Maven eclipse plugin question re: source folder
>
>
> I'm trying out the maven eclipse plugin and am running into a
> little problem. I'm using eclipse2.1.3 and 1.7 of the plugin.
>
> When I run 'maven eclipse:generate-classpath', eclipse loses
> the notion of my source code folder being a "Source Folder"
> and it also loses the concept of "Package" folders inside.
> This makes Eclipse ignore these folders for purposes of
> incremental compilation, as it no longer associates them with
> Java code.
>
> I don't even see where eclipse stores this meta information
> about the source folder, so I'm not even sure it's a
> maven/eclipse plugin bug, but that maven goal is what makes
> it happen. I looked through the list of outstanding bugs and
> the list archive and didn't see anything related to what I'm seeing.
>
> Am I missing something obvious or should I file it as a bug?
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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




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


Re: Maven eclipse plugin question re: source folder

Posted by Loren Siebert <lo...@siebert.org>.
I seem to have found a workaround, but without actually understanding the
problem. I created a directory level below my "src" directory called "java"
and put my source tree in there. Then I told eclipse to add a source folder
and specified "src/java" and it tagged the folder properly, and made the
source tree into Java packages. Running "maven eclipse" no longer upsets it.

----- Original Message ----- 
From: "Heritier Arnaud" <ah...@axway.com>
To: "Maven Users List" <us...@maven.apache.org>
Sent: Wednesday, May 26, 2004 8:38 AM
Subject: RE : Maven eclipse plugin question re: source folder


Why do you call maven eclipse:generate-classpath ?

Call directly "maven eclipse"

It will generate the classpath, the project and the others files you need to
import your project in Eclipse.

Arnaud

> -----Message d'origine-----
> De : Loren Siebert [mailto:loren@siebert.org]
> Envoyé : mercredi 26 mai 2004 17:30
> À : users@maven.apache.org
> Objet : Maven eclipse plugin question re: source folder
>
>
> I'm trying out the maven eclipse plugin and am running into a
> little problem. I'm using eclipse2.1.3 and 1.7 of the plugin.
>
> When I run 'maven eclipse:generate-classpath', eclipse loses
> the notion of my source code folder being a "Source Folder"
> and it also loses the concept of "Package" folders inside.
> This makes Eclipse ignore these folders for purposes of
> incremental compilation, as it no longer associates them with
> Java code.
>
> I don't even see where eclipse stores this meta information
> about the source folder, so I'm not even sure it's a
> maven/eclipse plugin bug, but that maven goal is what makes
> it happen. I looked through the list of outstanding bugs and
> the list archive and didn't see anything related to what I'm seeing.
>
> Am I missing something obvious or should I file it as a bug?
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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




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