This thread has been locked & this forum has been archived.
Please post new topics to General Development
Author Message
monsorno



Joined: Dec 19, 2006
Posts: 35

Hi,

we use maven2 for the build and let the maven-eclipse-plugin create our eclipse configuration files (m2eclipse is not working well with our project). We defined the dependencies to the standard JEE libs as usual with scope "provided" in our poms. The problem is, that jsp-api.jar is added to the build-path by the maven-eclipse-plugin, and therefore myeclipse deploys it to the server (Tomcat 6) in WEB-INF/lib, which leads to a JasperException when accessing the app. ("Unable to read TLD "META-INF/fmt.tld" from JAR file "file:/D:/Projekte/epa/install/apache-tomcat-6.0.18/webapps/epa-web/WEB-INF/lib/jstl-1.2.jar": org.apache.jasper.JasperException: Failed to load or instantiate TagLibraryValidator class: org.apache.taglibs.standard.tlv.JstlFmtTLV..."

How can I make myeclipse access the jsp-api.jar when compiling the sources but NOT deploy the jsp-api.jar to Tomcat?

Regards,
Martin.

_________________
Martin
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23818

Martin,

You can work with the Deployment rules under the project properties > Web > Deployment and re-add that JAR in some way that it's filtered out... for example, filter out User Libraries, then create a single user library with that JAR and add it to the project.

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
monsorno



Joined: Dec 19, 2006
Posts: 35

Hmm, adding the jar again as a user library does not work, because it's already added. The error message is "Build path contains duplicate entry: 'jsp-api-2.1.jar' for project 'my-project'" and the OK button is greyed out.

_________________
Martin
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23818

Martin,

Sorry for the confusion, you would have to remove it from one resource and re-add it from another. If you can't do that, there isn't a way to filter deployments at this time in MyEclipse.

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
monsorno



Joined: Dec 19, 2006
Posts: 35

Thanks, Riyad, for the tip. Removing the jar from the original resource means removing it from the pom, which will break the maven build.

In our environment maven is the leading tool that handles all dependencies, and we use the maven-eclipse-plugin to create our .classpath files. Removing the file in the Java Build Path Dialog must be done again every time after we call the plugin.

Maven and MyEclipse are both wonderful tools. To use them together is a everlasting search for workarounds.

_________________
Martin
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23818

Martin,

I'm sorry about not having better news for you -- if it's any help I am pushing hard to get through management the addition of deployment exclusion which would fix this issue for you.

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
monsorno



Joined: Dec 19, 2006
Posts: 35

Thanks Riyad.
Having deployment exclusions would definitely be a nice feature. Or, more generally, all scopes that maven defines: http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope. This would also handle the problem, that myeclipse also deploys test-classes and -resources.

_________________
Martin
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23818

Martin,

We looked into this a bit closer and it looks like the deployer is actually honoring the Maven scopes... but I told the dev to look into it further to see why *this* wasn't working for you, very strange.

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
monsorno



Joined: Dec 19, 2006
Posts: 35

Maybe it's honoring only the maven scopes, if maven4myeclipse is used. As I wrote, we use the maven-eclipse-plugin instead. I didn't tried maven4myeclipse by now, because it says, it's for myeclipse projects that want to use myeclipse and not the other way round, as we use it.

_________________
Martin
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23818

Ahhh that's what's going on then. Because you aren't using the Maven4MyEclipse integration, MyEclipse is using it's standard deployment code -- ignoring the Maven scopes. The only way to get the best of both worlds is to use maven-enabled MyEclipse projects.

Actually Maven-enabled MyEclipse projects create pom.xml files and use standard Maven conventions to build and package the projects -- so you can take those projects and put them on another machine and just use command line maven just fine.

I would encourage you to give it a try.

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
monsorno



Joined: Dec 19, 2006
Posts: 35

Thanks, Riyad, for this information. This sounds nice, I will definitely give it a try!

_________________
Martin
 
 View user's profile Send private message  
Reply with quote Back to top
monsorno



Joined: Dec 19, 2006
Posts: 35

Hello, again. I actually could spare a little time for this again, but didn't manage to activate Maven4MyEclipse for my existing project. The doc also says that this is not possible (see http://www.myeclipseide.com/documentation/quickstarts/maven_overview/, Chapter 4). Is this a "secret feature"?

_________________
Martin
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23818

No, no secret feature. The project during the creation-step needs to be created as a Maven project.

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
All times are GMT - 6 Hours
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
® 2014 - Genuitec, LLC.