On Tuesday, December 13, 2011 7:45:29 PM Benson Margulies wrote:
> On Tue, Dec 13, 2011 at 7:39 PM, Stephen Connolly
> 
> <[email protected]> wrote:
> > describe the problem better and point me to some sample code and i will
> > have a think.
> > 
> > but profiles containing (compile or runtime scope) deps activated based
> > on the jre that maven is running is wrong wrong wrong, and will only
> > lead to pain. (test and provided scope deps are still wrong in a
> > profile but can be excused as they are non-transitive)
> 
> The problem is this: different JDKs have different garbage in
> 'endorsed' in the departments of XML and web services. There are
> dependencies that have to be ADDED when running in some JDKs, and
> others that need to be SUBTRACTED. Provided isn't going to work, since
> (in the first case) we are adding things to the classpath that need to
> be there to compensate for what isn't there in the particular kit. If
> you want examples I can go dig them out.

Here's a simple example:  JAXB

On Java5, we have to add both a JAXB-API jar and a JAXB-IMPL jar (and other 
deps like stax-api) as there is no JAXB stuff built into the JDK.  We 
generally would prefer the latest JAXB stuff (2.2) here as there are no 
conflicts.

On Java6, there is JAXB 2.1 stuff built in.  Thus, we DON'T want to add an API 
jar (extra deps pulled in unnecessarily), but we DO want to pull in a newer 
JAXB-IMPL that fixes  a bunch of bugs.  However, it needs to be the latest 
2.1.x version, not the newer 2.2 versions as they won't work with the 2.1 
API's built into the JDK.  (and pulling in a newer API jar would require and 
endorsing mechanism to override the JDK version)

On Java7, JAXB 2.2 is built in.   Again, we don't want to bring in an API jar, 
but we do want the latest 2.2 implementation.

Suggestions?    It will be a bit easier once we drop support for Java5 and 
it's just between impls, but at this point, we do need java5 support.

Dan




> 
> > - Stephen
> > 
> > ---
> > Sent from my Android phone, so random spelling mistakes, random nonsense
> > words and other nonsense are a direct result of using swype to type on
> > the screen
> > 
> > On 14 Dec 2011 00:30, "Benson Margulies" <[email protected]> wrote:
> >> On Tue, Dec 13, 2011 at 7:24 PM, Stephen Connolly
> >> 
> >> <[email protected]> wrote:
> >> > sounds like cxf have been really bold and are adding deps in a
> >> > profile
> >> 
> >> Yes indeed. *purely for testing* we have profiles that change the
> >> dependencies. Got another suggestion?
> >> 
> >> > - Stephen
> >> > 
> >> > ---
> >> > Sent from my Android phone, so random spelling mistakes, random
> >> > nonsense words and other nonsense are a direct result of using
> >> > swype to type on>> 
> >> the
> >> 
> >> > screen
> >> > 
> >> > On 14 Dec 2011 00:02, "jaybytez" <[email protected]> wrote:
> >> >> Sorry if this question has already been posted.
> >> >> 
> >> >> I have tried running Maven 3.0.3 and Maven 2.2.12 (which is the
> >> >> current version we use for building via Hudson).  I have a
> >> >> simple project that>> 
> >> has
> >> 
> >> >> poms it inherits from that were defining a maven-compiler-plugin
> >> >> with
> >> 
> >> the
> >> 
> >> >> target/source set to jdk1.6.  Whether or not this configuration
> >> 
> >> existed, I
> >> 
> >> >> still get the following error on a project that has dependencies
> >> >> to
> >> 
> >> cxf.  I
> >> 
> >> >> am running Eclipse Helios/m2eclipse.  Any thoughts as to why
> >> >> this error exists and how to get rid of it.
> >> >> 
> >> >> 12/13/11 3:56:15 PM PST: [WARN] The POM for
> >> >> org.apache.cxf:cxf-rt-frontend-jaxws:jar:2.4.4 is invalid,
> >> >> transitive
> >> >> dependencies (if any) will not be available: 5 problems were
> >> >> encountered while building the effective model for
> >> >> org.apache.cxf:cxf-rt-frontend-jaxws:2.4.4
> >> >> [ERROR] Failed to determine Java version for profile jdk17 @
> >> >> [ERROR] Failed to determine Java version for profile jdk15 @
> >> >> [ERROR] Failed to determine Java version for profile jdk15 @
> >> >> org.apache.cxf:cxf-parent:2.4.4
> >> >> [ERROR] Failed to determine Java version for profile jdk17 @
> >> >> org.apache.cxf:cxf-parent:2.4.4
> >> >> [ERROR] Failed to determine Java version for profile jdk15 @
> >> >> org.apache.cxf:cxf:2.4.4
> >> >> 
> >> >> 12/13/11 3:56:15 PM PST: [WARN] The POM for
> >> >> org.apache.cxf:cxf-rt-transports-http:jar:2.4.4 is invalid,
> >> >> transitive dependencies (if any) will not be available: 3
> >> >> problems were encountered while building the effective model
> >> >> for
> >> >> org.apache.cxf:cxf-rt-transports-http:2.4.4
> >> >> [ERROR] Failed to determine Java version for profile jdk15 @
> >> >> org.apache.cxf:cxf-parent:2.4.4
> >> >> [ERROR] Failed to determine Java version for profile jdk17 @
> >> >> org.apache.cxf:cxf-parent:2.4.4
> >> >> [ERROR] Failed to determine Java version for profile jdk15 @
> >> >> org.apache.cxf:cxf:2.4.4
> >> >> 
> >> >> 12/13/11 3:56:15 PM PST: [WARN] The POM for
> >> >> org.apache.cxf:cxf-rt-ws-security:jar:2.4.4 is invalid,
> >> >> transitive
> >> >> dependencies (if any) will not be available: 4 problems were
> >> >> encountered while building the effective model for
> >> >> org.apache.cxf:cxf-rt-ws-security:2.4.4
> >> >> [ERROR] Failed to determine Java version for profile jdk15 @
> >> >> [ERROR] Failed to determine Java version for profile jdk15 @
> >> >> org.apache.cxf:cxf-parent:2.4.4
> >> >> [ERROR] Failed to determine Java version for profile jdk17 @
> >> >> org.apache.cxf:cxf-parent:2.4.4
> >> >> [ERROR] Failed to determine Java version for profile jdk15 @
> >> >> org.apache.cxf:cxf:2.4.4
> >> >> 
> >> >> 12/13/11 3:56:15 PM PST: [WARN] The POM for
> >> >> org.apache.ws.security:wss4j:jar:1.6.4 is invalid, transitive
> >> 
> >> dependencies
> >> 
> >> >> (if any) will not be available: 2 problems were encountered
> >> >> while
> >> 
> >> building
> >> 
> >> >> the effective model for org.apache.ws.security:wss4j:1.6.4
> >> >> [ERROR] Failed to determine Java version for profile jdk15 @
> >> >> [ERROR] Failed to determine Java version for profile jdk16 @
> >> >> 
> >> >> Thanks,
> >> >> 
> >> >> Jay
> >> >> 
> >> >> --
> >> 
> >> >> View this message in context:
> >> http://maven.40175.n5.nabble.com/Failed-to-determine-Java-version-for-
> >> profile-jdk-tp5073097p5073097.html>> 
> >> >> Sent from the Maven - Users mailing list archive at Nabble.com.
> >> >> 
> >> >> ----------------------------------------------------------------
> >> >> -----
> >> >> To unsubscribe, e-mail: [email protected]
> >> >> For additional commands, e-mail: [email protected]
> >> 
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [email protected]
> >> For additional commands, e-mail: [email protected]
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
-- 
Daniel Kulp
[email protected] - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

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

Reply via email to