Removal of target-eclipse, and project conf in Eclipse 3.4

View: New views
5 Messages — Rating Filter:   Alert me  

Removal of target-eclipse, and project conf in Eclipse 3.4

by Adrian Shum-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Message
Dear all,
 
I have just installed m2eclipse 0.9.4.20080603 and recent version of
m2Eclipse removed usage of target-eclipse and use maven's
target/ as default output directory of eclipse.  Before m2eclipse
changed to use target-eclipse as default output directory, there is
a problem if I use target/ as default output directory.  Once I do
mvn clean install  in command line maven, it will rebuild all class files,
and once I need to use them in Eclipse (e.g. launching JUnit Test), it
seems to me that Eclipse have done some caching and it detects the
classes are changed, and it refuse to run the tests.  I have to do clean
build in Eclipse again to solve that.  Is the situtation the same in latest
m2eclipse? If so, can I choose to keep on using target-eclipse?
 
Have just upgraded to Eclipse 3.4 too and I have reimported some maven
projects to my workspace.  I found that in the newly imported projects,
default output directory for resources is target/classes and target/test-classes. 
For my existing projects, it is src/main/resources and src/test/resources.
I found my JUnit tests no longer be able to load resources in test/resources
(I have some unit tests needs to load Spring's app context xml).  It seems to
me that the default output directory cause problem for resources loading
in Eclipse's JUnit tests.  It can be solved by either
1) Removing resources from build path, and add them as Class Folder in Libraries, or
2) Remove the Exclude filter of resources folder in build path.  Eclipse
will then copy the files to target directory (However, everytime I change my resource,
it triggers a lengthy (near 10 second) automatic build)
 
Can anyone give me some hints on these issues?
 
Adrian
 

This email is confidential. If you are not the intended recipient, please delete it from your system and notify the sender immediately. Any unauthorized use, disclosure, dissemination or copying of this email is prohibited. Taifook Securities Group, its group companies and their content providers ("Parties") shall not be responsible for the accuracy or completeness of this email or its attachment, if any, which could contain virus, be corrupted, destroyed, incomplete, intercepted, lost or arrive late. The Parties do not accept liability for any damage caused by this email.

Re: Removal of target-eclipse, and project conf in Eclipse 3.4

by Leszek Gawron-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Adrian Shum wrote:

> Dear all,
>  
> I have just installed m2eclipse 0.9.4.20080603 and recent version of
> m2Eclipse removed usage of target-eclipse and use maven's
> target/ as default output directory of eclipse.  Before m2eclipse
> changed to use target-eclipse as default output directory, there is
> a problem if I use target/ as default output directory.  Once I do
> mvn clean install  in command line maven, it will rebuild all class files,
> and once I need to use them in Eclipse (e.g. launching JUnit Test), it
> seems to me that Eclipse have done some caching and it detects the
> classes are changed, and it refuse to run the tests.  I have to do clean
> build in Eclipse again to solve that.  Is the situtation the same in latest
> m2eclipse? If so, can I choose to keep on using target-eclipse?
>  
> Have just upgraded to Eclipse 3.4 too and I have reimported some maven
> projects to my workspace.  I found that in the newly imported projects,
> default output directory for resources is target/classes and
> target/test-classes.
> For my existing projects, it is src/main/resources and src/test/resources.
> I found my JUnit tests no longer be able to load resources in test/resources
> (I have some unit tests needs to load Spring's app context xml).  It
> seems to
> me that the default output directory cause problem for resources loading
> in Eclipse's JUnit tests.  It can be solved by either
> 1) Removing resources from build path, and add them as Class Folder in
> Libraries, or
> 2) Remove the Exclude filter of resources folder in build path.  Eclipse
> will then copy the files to target directory (However, everytime I
> change my resource,
> it triggers a lengthy (near 10 second) automatic build)
>  
> Can anyone give me some hints on these issues?

I've been fighting with resources today. This is what I came up with:

http://jira.codehaus.org/browse/MNGECLIPSE-707

If you reimported your old project maybe you have the same problem I did.

--
Leszek Gawron

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Removal of target-eclipse, and project conf in Eclipse 3.4

by Eugene Kuleshov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Adrian Shum wrote:

>  Message ...I found that in the newly imported projects, default
>  output directory for resources is target/classes and
>  target/test-classes. For my existing projects, it is
>  src/main/resources and src/test/resources. I found my JUnit tests no
>  longer be able to load resources in test/resources (I have some unit
>  tests needs to load Spring's app context xml).  It seems to me that
>  the default output directory cause problem for resources loading in
>  Eclipse's JUnit tests.  It can be solved by either
 > 1) Removing resources from build path, and add them as Class Folder
in Libraries, or
 > 2) Remove the Exclude filter of resources folder in build path.
>  Eclipse will then copy the files to target directory (However,
>  everytime I change my resource, it triggers a lengthy (near 10
>  second) automatic build)

  Have you tried to run "Maven / Update Project Configuration" action on
your projects? You may also have to recreate your saved launch
configurations for those junit tests. Anyways we don't recommend to
change project configuration by hands, because it will get out of sync
with your Maven build.

  Also see my blog entry on how to configure Maven project to use
different output folders.
http://www.jroller.com/eu/entry/configuring_separate_maven_output_folders
 
  regards,
  Eugene



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Parent Message unknown RE: Removal of target-eclipse, and project conf in Eclipse 3.4

by Adrian Shum-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

combination of Eclipse 3.4, Subclipse 1.4.x and m2eclipse 0.9.4.20080603

(I am not really sure who cause the problem) mostly halt my Eclipse when
I do Update Project Config....

For those success, or those I remove-and-reimport, I am facing the
resources
issue I described....

Just wonder, previously when I am using m2Eclipse 0.9.0 + Eclipse 3.3,
resources folders are using the src folder directly as the output
folder, and
my unit tests can load resources inside it.  However, now when I use
m2Eclipse 0.9.4 + Eclipse 3.4, even I manually change the output folder,
it still fail.  

Will have a try to remove the run config of unit tests as u suggested :)
Wish that solve my problem.

After reading your blog entry, is that correct if I say: it is suggested
to separate
eclipse's output folder (as described in the blog entry) if I have to
use
command line mvn to build my project?


Thanks for kindly help

Adrian

-----Original Message-----
From: Eugene Kuleshov [mailto:eu@...]
Sent: Thursday, July 03, 2008 9:57 PM
To: user@...
Subject: Re: [m2eclipse-user] Removal of target-eclipse, and project
conf in Eclipse 3.4


Adrian Shum wrote:

>  Message ...I found that in the newly imported projects, default  
> output directory for resources is target/classes and  
> target/test-classes. For my existing projects, it is  
> src/main/resources and src/test/resources. I found my JUnit tests no  
> longer be able to load resources in test/resources (I have some unit  
> tests needs to load Spring's app context xml).  It seems to me that  
> the default output directory cause problem for resources loading in  
> Eclipse's JUnit tests.  It can be solved by either
 > 1) Removing resources from build path, and add them as Class Folder
in Libraries, or
 > 2) Remove the Exclude filter of resources folder in build path.
>  Eclipse will then copy the files to target directory (However,  
> everytime I change my resource, it triggers a lengthy (near 10
>  second) automatic build)

  Have you tried to run "Maven / Update Project Configuration" action on

your projects? You may also have to recreate your saved launch
configurations for those junit tests. Anyways we don't recommend to
change project configuration by hands, because it will get out of sync
with your Maven build.

  Also see my blog entry on how to configure Maven project to use
different output folders.
http://www.jroller.com/eu/entry/configuring_separate_maven_output_folder
s
 
  regards,
  Eugene



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email




This email is confidential. If you are not the intended recipient, please delete it from your system and notify the sender immediately. Any unauthorized use, disclosure, dissemination or copying of this email is prohibited. Taifook Securities Group, its group companies and their content providers ("Parties") shall not be responsible for the accuracy or completeness of this email or its attachment, if any, which could contain virus, be corrupted, destroyed, incomplete, intercepted, lost or arrive late.   The Parties do not accept liability for any damage caused by this email.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Removal of target-eclipse, and project conf in Eclipse 3.4

by Eugene Kuleshov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Adrian,

  It is really hard to follow information you have provided. Right now I
am not sure what question you are asking and what exactly does not work
for you or what "mostly halt" mean. Some operation can take long for
some projects, especially if they will trigger any downloading or
updating snapshots. You can check the Progress view and the Maven
console in the Console view to see what is happening.

  So, I would recommend to submit separate bug reports for each
individual issue you have (e.g. "can't run test", "can't update project
configuration", etc) and provide step by step instructions and
corresponding test projects that would allow to reproduce your issues.
See more detailed instructions for reporting issues at
http://docs.codehaus.org/display/M2ECLIPSE/Reporting+Issues

  Thanks

  Eugene


Adrian Shum wrote:

> combination of Eclipse 3.4, Subclipse 1.4.x and m2eclipse 0.9.4.20080603
> (I am not really sure who cause the problem) mostly halt my Eclipse when I do Update Project Config....
>
> For those success, or those I remove-and-reimport, I am facing the resources issue I described....
>
> Just wonder, previously when I am using m2Eclipse 0.9.0 + Eclipse 3.3, resources folders are using the src folder directly as the output folder, and my unit tests can load resources inside it.  However, now when I use
> m2Eclipse 0.9.4 + Eclipse 3.4, even I manually change the output folder, it still fail.  
>
> Will have a try to remove the run config of unit tests as u suggested :)
> Wish that solve my problem.
>
> After reading your blog entry, is that correct if I say: it is suggested to separate eclipse's output folder (as described in the blog entry) if I have to use  command line mvn to build my project?
>
> Thanks for kindly help
>
> Adrian
>
> -----Original Message-----
> From: Eugene Kuleshov [mailto:eu@...]
> Sent: Thursday, July 03, 2008 9:57 PM
> To: user@...
> Subject: Re: [m2eclipse-user] Removal of target-eclipse, and project
> conf in Eclipse 3.4
>
>
> Adrian Shum wrote:
>
>  
>>  Message ...I found that in the newly imported projects, default  
>> output directory for resources is target/classes and  
>> target/test-classes. For my existing projects, it is  
>> src/main/resources and src/test/resources. I found my JUnit tests no  
>> longer be able to load resources in test/resources (I have some unit  
>> tests needs to load Spring's app context xml).  It seems to me that  
>> the default output directory cause problem for resources loading in  
>> Eclipse's JUnit tests.  It can be solved by either
>>    
>  > 1) Removing resources from build path, and add them as Class Folder
> in Libraries, or
>  > 2) Remove the Exclude filter of resources folder in build path.
>  
>>  Eclipse will then copy the files to target directory (However, everytime I change my resource, it triggers a lengthy (near 10 second) automatic build)
>>    
>   Have you tried to run "Maven / Update Project Configuration" action on
> your projects? You may also have to recreate your saved launch
> configurations for those junit tests. Anyways we don't recommend to
> change project configuration by hands, because it will get out of sync
> with your Maven build.
>
>   Also see my blog entry on how to configure Maven project to use
> different output folders.
> http://www.jroller.com/eu/entry/configuring_separate_maven_output_folder
> s
>  
>   regards,
>   Eugene
>  


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


LightInTheBox - Buy quality products at wholesale price