Maven 2.x Eclipse Plugin

eclipse plugin and WTP generating warnings in Europa

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 2.5
  • Fix Version/s: None
  • Component/s: WTP support
  • Labels:
    None
  • Environment:
    Eclipse 3.3.1.1 and WTP 2.0.1 Using Maven 2.0.7 and the last maven-eclipse-plugin 2.5-SNAPSHOT
  • Number of attachments :
    2

Description

The issue is regarding warnings in Europa and WTP:
"Classpath entry M2_REPO/log4j/log4j/1.2.13/log4j-1.2.13.jar will not be exported or published. Runtime ClassNotFoundExceptions may result."

1) If I try to generate with wtpversion=1.5 and maven-eclipse-plugin
version 2.5-SNAPSHOT => I get the same behaviour in EUROPA (WARNINGS)

2) If I try to generate with wtpversion=1.5 and maven-eclipse-plugin
version 2.4 => I get the same behaviour in EUROPA (WARNINGS)

3) I then try using Eclipse 3.2.2 with WTP 1.5.3 (instead of Eclipse
3.3.1.1 and WTP 2.0.1) with maven-eclipse-plugin version 2.4 or
2.5-SNAPSHOT => Everything is perfect, no more warnings

I create a simple test in order to reproduce the issue.
This test is a multi module application composed of 1 Ejb module and 1 Ear module.
So at the top level Just run "mvn install eclipse:eclipse"
And then in an europa workspace import the projetcs and you should see the warnings on the EJB module.

It will behave the same way if it exists other modules.

I notice that, in the case you update parameters on the eclipse plugin you will need to remove projects from workspace and import them again.
otherwise some old parameter will stay in the eclipse cache...

let me know if you need other tests

Yann.

Activity

Hide
Rob Hasselbaum added a comment -

Confirmed here as well. I think this deserves a higher priority than "minor" because it requires a very tedious workaround every time you run the eclipse:eclipse goal. Essentially, WTP 2.0 support isn't practical for day to day use until this is fixed.

Show
Rob Hasselbaum added a comment - Confirmed here as well. I think this deserves a higher priority than "minor" because it requires a very tedious workaround every time you run the eclipse:eclipse goal. Essentially, WTP 2.0 support isn't practical for day to day use until this is fixed.
Hide
Yann Albou added a comment -

I agree it should be a higher priority.
Rob, which workaround did you found ?

Show
Yann Albou added a comment - I agree it should be a higher priority. Rob, which workaround did you found ?
Hide
Rob Hasselbaum added a comment -

If you click on each warning and hit CTRL-1 (Quick fix), it'll add each library to the deployment. Works until you regenerate with eclipse:eclipse again.

Show
Rob Hasselbaum added a comment - If you click on each warning and hit CTRL-1 (Quick fix), it'll add each library to the deployment. Works until you regenerate with eclipse:eclipse again.
Hide
Richard van Nieuwenhoven added a comment -

The problem is that this warning is correct and the behavior is intended. The eclipse plugin works on a per project basis, So it will not export the dependencies, every projects gets the correct dependencies from the dependency resolution.

So our issue here is how to tell eclipse that it's OK, and we know and we want it that way.

Show
Richard van Nieuwenhoven added a comment - The problem is that this warning is correct and the behavior is intended. The eclipse plugin works on a per project basis, So it will not export the dependencies, every projects gets the correct dependencies from the dependency resolution. So our issue here is how to tell eclipse that it's OK, and we know and we want it that way.
Hide
Richard van Nieuwenhoven added a comment -

Ok, just checked for a possibility to remove this unwanted warning, and found that it is a known bug in eclipse:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=190783

So we can generate the nondependency attribute for the next release of eclipse/wtp.

Show
Richard van Nieuwenhoven added a comment - Ok, just checked for a possibility to remove this unwanted warning, and found that it is a known bug in eclipse: https://bugs.eclipse.org/bugs/show_bug.cgi?id=190783 So we can generate the nondependency attribute for the next release of eclipse/wtp.
Hide
Rob Hasselbaum added a comment -

Richard, I think you misunderstood me. The warning is complaining about third-party library dependencies--not dependencies among different Eclipse projects. So, for example, my project depends on the Facelets library. But because of this problem, the Facelets JARs are not getting deployed to Tomcat, so I can't run my web app unless I do the Quick Fix workaround.

Show
Rob Hasselbaum added a comment - Richard, I think you misunderstood me. The warning is complaining about third-party library dependencies--not dependencies among different Eclipse projects. So, for example, my project depends on the Facelets library. But because of this problem, the Facelets JARs are not getting deployed to Tomcat, so I can't run my web app unless I do the Quick Fix workaround.
Hide
Yann Albou added a comment -

Well, I am quite confused now.
Rob, I don't have the same behaviour as you described. If I try to do the quick fix then I get an error.
So I am not sure if it is only a matter of a warning.

Could you both try with the simple project I provided. It should very easy to test it.
Let me know your results.
Thanks

Show
Yann Albou added a comment - Well, I am quite confused now. Rob, I don't have the same behaviour as you described. If I try to do the quick fix then I get an error. So I am not sure if it is only a matter of a warning. Could you both try with the simple project I provided. It should very easy to test it. Let me know your results. Thanks
Hide
Richard van Nieuwenhoven added a comment -

@Rob
Yes, i mean references to third-party library dependencies (in the local repository).

The resolved dependencies of the WAR / EAR are the one's used for the WTP deployment.

@Yann Albou
Yes, it is only a warning and till the next WTP / Eclipse version we must ignore it.

Show
Richard van Nieuwenhoven added a comment - @Rob Yes, i mean references to third-party library dependencies (in the local repository). The resolved dependencies of the WAR / EAR are the one's used for the WTP deployment. @Yann Albou Yes, it is only a warning and till the next WTP / Eclipse version we must ignore it.
Hide
Rob Hasselbaum added a comment -

Richard, you're right. I took the warning at face value and assumed that the libraries would not be found if I tried to run the web app from Eclipse. But I just tested it, and the app still works, so the warning is benign. Sorry for the mix-up.

Show
Rob Hasselbaum added a comment - Richard, you're right. I took the warning at face value and assumed that the libraries would not be found if I tried to run the web app from Eclipse. But I just tested it, and the app still works, so the warning is benign. Sorry for the mix-up.
Hide
Ceki Gulcu added a comment -

The warning although benign, in a workspace with say 6 projects with say 10 dependencies each, will resulting in 60 warning, drowning all other warnings.

I am glad to hear that the next WTP / Eclipse version will ignore it.

Show
Ceki Gulcu added a comment - The warning although benign, in a workspace with say 6 projects with say 10 dependencies each, will resulting in 60 warning, drowning all other warnings. I am glad to hear that the next WTP / Eclipse version will ignore it.
Hide
Arnaud Heritier added a comment -

I'm using eclipse 3.3 (Fall 2) and the lastest snapshot of the eclipse plugin and I can't reproduce it.
What can we do with this issue ?

Show
Arnaud Heritier added a comment - I'm using eclipse 3.3 (Fall 2) and the lastest snapshot of the eclipse plugin and I can't reproduce it. What can we do with this issue ?
Hide
Kefah SEYED added a comment -

Hello,

I have the same issue and
I'm using Eclipse 3.3.1 and WTP 2.0.8

I used the eclipse maven plugin 2.5 snapshot and here is my maven configuration :

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>

<configuration>
<downloadSources>true</downloadSources>
<!-<downloadJavadocs>true</downloadJavadocs>->
<wtpversion>2.0</wtpversion>
</configuration>
</plugin>

Can you tell me how to skipp these warnings ?

Thank you for your help.

Kefah

Show
Kefah SEYED added a comment - Hello, I have the same issue and I'm using Eclipse 3.3.1 and WTP 2.0.8 I used the eclipse maven plugin 2.5 snapshot and here is my maven configuration : <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-eclipse-plugin</artifactId> <configuration> <downloadSources>true</downloadSources> <!-<downloadJavadocs>true</downloadJavadocs>-> <wtpversion>2.0</wtpversion> </configuration> </plugin> Can you tell me how to skipp these warnings ? Thank you for your help. Kefah
Hide
Kirill Petrov added a comment -

Was the issue fixed? on my project it generates 40-50 warnings - I don't see the real ones.
I am runing eclipse 3.2.2 (enterprise edition) and v.2.5 of the eclipse plugin.

Show
Kirill Petrov added a comment - Was the issue fixed? on my project it generates 40-50 warnings - I don't see the real ones. I am runing eclipse 3.2.2 (enterprise edition) and v.2.5 of the eclipse plugin.
Hide
Paul Davis added a comment - - edited

As a workaround, I added a filter to the "Problems" view.

On the little down arrow, select the "configure filters" option.
Click the "New" button.
Name the filter "Hide M2_REPO Warnings"
Have "Description" "doesn't contain" (drop down) "M2_REPO"
Select severity, warning
Make sure the new filter is checked (and uncheck default) in the list of user filters.

You should only see the warnings you care about now.

Show
Paul Davis added a comment - - edited As a workaround, I added a filter to the "Problems" view. On the little down arrow, select the "configure filters" option. Click the "New" button. Name the filter "Hide M2_REPO Warnings" Have "Description" "doesn't contain" (drop down) "M2_REPO" Select severity, warning Make sure the new filter is checked (and uncheck default) in the list of user filters. You should only see the warnings you care about now.
Hide
Carl-Erik Kopseng added a comment -

Thanks for the QuickFix tip, this has been halting development on my WebApp for three days! Someone here mentioned that the behaviour was to be expected, and was correct. I don't know how you end up with that, but what would then be the correct way to fix this?

Is there some way to specify that some/all libraries on the build path must be included in the build? I make a JSF webapp, and would like all things not included in Tomcat to be shipped with the war (in the WEB-INF/lib directory). Should I just manually put the jars in there, or is there a better/more automated way of doing this?

Show
Carl-Erik Kopseng added a comment - Thanks for the QuickFix tip, this has been halting development on my WebApp for three days! Someone here mentioned that the behaviour was to be expected, and was correct. I don't know how you end up with that, but what would then be the correct way to fix this? Is there some way to specify that some/all libraries on the build path must be included in the build? I make a JSF webapp, and would like all things not included in Tomcat to be shipped with the war (in the WEB-INF/lib directory). Should I just manually put the jars in there, or is there a better/more automated way of doing this?
Hide
Anders Åberg added a comment -

Does anyone know the status of this issue? Any way to contribute to solving it?

Although the workaround suggested by Paul works for the "Problems" view, a warning icon is still showing on the project. Not a big
problem but now real warnings are always hidden.

Show
Anders Åberg added a comment - Does anyone know the status of this issue? Any way to contribute to solving it? Although the workaround suggested by Paul works for the "Problems" view, a warning icon is still showing on the project. Not a big problem but now real warnings are always hidden.
Hide
Anders Åberg added a comment -

I managed to fix this four our project with a few lines in the sources, please let me know if I should upload a diff or a build. The change breaks a unit test for another part of the system, so I think the test needs to be fixed as well if anyone wants to build it.

The fix adds a nondependency element to each maven dependency.

Show
Anders Åberg added a comment - I managed to fix this four our project with a few lines in the sources, please let me know if I should upload a diff or a build. The change breaks a unit test for another part of the system, so I think the test needs to be fixed as well if anyone wants to build it. The fix adds a nondependency element to each maven dependency.
Hide
Daniel Serodio added a comment -

Anders, I think you should post your diff here so the maintainers can review it and hopefully incorporate it on the "official" build.

Show
Daniel Serodio added a comment - Anders, I think you should post your diff here so the maintainers can review it and hopefully incorporate it on the "official" build.
Hide
Stevo Slavic added a comment -

Attaching proposed fix (org.apache.maven.plugins.maven-eclipse-plugin-MECLIPSE-361.patch) - existing tests pass.

Show
Stevo Slavic added a comment - Attaching proposed fix (org.apache.maven.plugins.maven-eclipse-plugin-MECLIPSE-361.patch) - existing tests pass.

People

Vote (14)
Watch (16)

Dates

  • Created:
    Updated: