You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Mike Kienenberger <mk...@gmail.com> on 2007/02/28 06:26:39 UTC

Is maven-cayenne-build-plugin supposed to be 1.4 compatible? replace(String, String) is a java 1.5 method call.

Is maven-cayenne-build-plugin supposed to be 1.4 compatible?

If so, there's one error that prevents this:

maven-cayenne-build-plugin/src/main/java/org.apache.cayenne.maven.plugin.confluence/DocPageRenderer.java:line
219 has

            matcher.appendReplacement(replacementBuffer,
matcher.group(0).replace(
                    "+",
                    "%20"));

replace(String, String) is a java 1.5 method call.

replaceAll(String, String) might work, but you'd have to escape the
regular expression characters.

This method would also work, but I don't think commons lang is a
dependency.   You could simply copy the code for this method, though,
into a common utility class -- using replace(String, String) is a
common 1.5/1.4 error, and it'd be worthwhile to have a simple
replacement when it happens.

http://jakarta.apache.org/commons/lang/apidocs/org/apache/commons/lang/StringUtils.html#replace(java.lang.String,%20java.lang.String,%20java.lang.String)

Re: Is maven-cayenne-build-plugin supposed to be 1.4 compatible? replace(String, String) is a java 1.5 method call.

Posted by Matthias Wessendorf <ma...@apache.org>.
cayenne ?
:-)

On 2/28/07, Mike Kienenberger <mk...@gmail.com> wrote:
> Is maven-cayenne-build-plugin supposed to be 1.4 compatible?
>
> If so, there's one error that prevents this:
>
> maven-cayenne-build-plugin/src/main/java/org.apache.cayenne.maven.plugin.confluence/DocPageRenderer.java:line
> 219 has
>
>             matcher.appendReplacement(replacementBuffer,
> matcher.group(0).replace(
>                     "+",
>                     "%20"));
>
> replace(String, String) is a java 1.5 method call.
>
> replaceAll(String, String) might work, but you'd have to escape the
> regular expression characters.
>
> This method would also work, but I don't think commons lang is a
> dependency.   You could simply copy the code for this method, though,
> into a common utility class -- using replace(String, String) is a
> common 1.5/1.4 error, and it'd be worthwhile to have a simple
> replacement when it happens.
>
> http://jakarta.apache.org/commons/lang/apidocs/org/apache/commons/lang/StringUtils.html#replace(java.lang.String,%20java.lang.String,%20java.lang.String)
>


-- 
Matthias Wessendorf
http://tinyurl.com/fmywh

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com

Re: Is maven-cayenne-build-plugin supposed to be 1.4 compatible? replace(String, String) is a java 1.5 method call.

Posted by Mike Kienenberger <mk...@gmail.com>.
> On Feb 28, 2007, at 6:35 PM, Mike Kienenberger wrote:
> > In fact, I'd like to see an enumeration of each module with a
> > description of
> > what it does and how it fits in to the big picture.
>
> > No doubt there's
> > a maven plugin somewhere that will do this automatically :-)

On 2/28/07, Andrus Adamchik <an...@objectstyle.org> wrote:
> No!!! Can we please do it by hand :-) The site is one place in
> Cayenne not affected by Maven, let's keep it this way.

That was a joke, not a serious suggestion :-)  Apparently it was a bit
TOO accurate :-)

Re: Is maven-cayenne-build-plugin supposed to be 1.4 compatible? replace(String, String) is a java 1.5 method call.

Posted by Andrus Adamchik <an...@objectstyle.org>.
On Feb 28, 2007, at 6:35 PM, Mike Kienenberger wrote:


> In fact, I'd like to see an enumeration of each module with a  
> description of
> what it does and how it fits in to the big picture.

+1

> No doubt there's
> a maven plugin somewhere that will do this automatically :-)

No!!! Can we please do it by hand :-) The site is one place in  
Cayenne not affected by Maven, let's keep it this way.


> Actually, I can't seem to figure out how to update the developer  
> guide.

http://cwiki.apache.org/confluence/display/CAYSITE/Developer+Guide


> I'd still like to hear answers on some of the procedural questions I
> asked before (and I'll add them to the dev guide):
>
> 1) Is it intended/necessary that the svn checkout be outside of the  
> workspace?

Probably a good idea.

> 2) How does one work with both a 1.4 and a 1.5 workspace at the  
> same time?

You either do it all 1.5 (hoping that others catch the JDK version  
issues) or use them one at a time. Since there is no eclipse-level  
cross-module dependencies, switching between workspaces, while  
annoying, works pretty well for me.

Andrus

Re: Is maven-cayenne-build-plugin supposed to be 1.4 compatible? replace(String, String) is a java 1.5 method call.

Posted by Mike Kienenberger <mk...@gmail.com>.
I'm still importing, so it's too soon to tell.

Yes, I know that the builds can break, although I would hope our core
modules (cayenne runtime & modeler) would be stable by this point,
with no checkins breaking compilability.  I expecdt JPA to be in a
state of flux at present and don't necessarily expect the same level
of usability.

However, I think the main issue is that we need to get the developer
guide updated with more details.   That's part of what I'm hoping will
come out of this process.

Thanks for the module list below.   It's difficult to tell which
modules are important, especially if you're not familiar with maven
naming conventions.   This should go in the developer guide.  In fact,
I'd like to see an enumeration of each module with a description of
what it does and how it fits in to the big picture.   No doubt there's
a maven plugin somewhere that will do this automatically :-)   I also
think the the description should indicate whether it's intended to be
a java 1.4 or 1.5 target.

Actually, I can't seem to figure out how to update the developer guide.

I'd still like to hear answers on some of the procedural questions I
asked before (and I'll add them to the dev guide):

1) Is it intended/necessary that the svn checkout be outside of the workspace?
2) How does one work with both a 1.4 and a 1.5 workspace at the same time?

On 2/28/07, Andrus Adamchik <an...@objectstyle.org> wrote:
> I can feel your pain. I didn't have any problems specifically with
> Eclipse, but the builds do break often. To access the bulk of the
> code you just need one or more of these modules in Eclipse. They can
> be imported one at a time in any order. Don't waste your time on
> importing the build plugin, tutorials and such.
>
> * cayenne-jdk1.4-unpublished
> * cayenne-jdk1.5-unpublished
> * cayenne-jpa-unpublished
> * cayenne-modeler
>
> Are any of them still causing trouble?
>
> Andrus
>
>
> On Feb 28, 2007, at 5:42 PM, Mike Kienenberger wrote:
>
> > If I ever get a useable version of Cayenne into Eclipse, I'll give
> > it a shot.
> >
> > So far, two days later, it's not looking hopeful.  :-)
> >
> >
> > On 2/28/07, Andrus Adamchik <an...@objectstyle.org> wrote:
> >> On Feb 28, 2007, at 5:12 PM, Mike Kienenberger wrote:
> >> > Is maven-cayenne-build-plugin supposed to be 1.4 compatible?
> >> >
> >> > If so, there's one error that prevents this:
> >>
> >> Please update - i refactored the 1.5 part to maven-cayenne-doc-
> >> plugin. Besides you probably don't need this module in Eclipse at
> >> all :-)
> >
>
>

Re: Is maven-cayenne-build-plugin supposed to be 1.4 compatible? replace(String, String) is a java 1.5 method call.

Posted by Andrus Adamchik <an...@objectstyle.org>.
I can feel your pain. I didn't have any problems specifically with  
Eclipse, but the builds do break often. To access the bulk of the  
code you just need one or more of these modules in Eclipse. They can  
be imported one at a time in any order. Don't waste your time on  
importing the build plugin, tutorials and such.

* cayenne-jdk1.4-unpublished
* cayenne-jdk1.5-unpublished
* cayenne-jpa-unpublished
* cayenne-modeler

Are any of them still causing trouble?

Andrus


On Feb 28, 2007, at 5:42 PM, Mike Kienenberger wrote:

> If I ever get a useable version of Cayenne into Eclipse, I'll give  
> it a shot.
>
> So far, two days later, it's not looking hopeful.  :-)
>
>
> On 2/28/07, Andrus Adamchik <an...@objectstyle.org> wrote:
>> On Feb 28, 2007, at 5:12 PM, Mike Kienenberger wrote:
>> > Is maven-cayenne-build-plugin supposed to be 1.4 compatible?
>> >
>> > If so, there's one error that prevents this:
>>
>> Please update - i refactored the 1.5 part to maven-cayenne-doc-
>> plugin. Besides you probably don't need this module in Eclipse at
>> all :-)
>


Re: Is maven-cayenne-build-plugin supposed to be 1.4 compatible? replace(String, String) is a java 1.5 method call.

Posted by Mike Kienenberger <mk...@gmail.com>.
If I ever get a useable version of Cayenne into Eclipse, I'll give it a shot.

So far, two days later, it's not looking hopeful.  :-)


On 2/28/07, Andrus Adamchik <an...@objectstyle.org> wrote:
> On Feb 28, 2007, at 5:12 PM, Mike Kienenberger wrote:
> > Is maven-cayenne-build-plugin supposed to be 1.4 compatible?
> >
> > If so, there's one error that prevents this:
>
> Please update - i refactored the 1.5 part to maven-cayenne-doc-
> plugin. Besides you probably don't need this module in Eclipse at
> all :-)

Re: Is maven-cayenne-build-plugin supposed to be 1.4 compatible? replace(String, String) is a java 1.5 method call.

Posted by Andrus Adamchik <an...@objectstyle.org>.
On Feb 28, 2007, at 5:12 PM, Mike Kienenberger wrote:
> Is maven-cayenne-build-plugin supposed to be 1.4 compatible?
>
> If so, there's one error that prevents this:

Please update - i refactored the 1.5 part to maven-cayenne-doc- 
plugin. Besides you probably don't need this module in Eclipse at  
all :-)


On Feb 28, 2007, at 5:03 PM, Mike Kienenberger wrote:
> I started deleting these by hand, and then had an idea ---
>
>   mvn eclipse:clean
>
> I think it worked, but it's hard to tell :-)

It is easy to tell - these files are in SVN! So if you have no  
changes, you are good:

    svn status


Andrus


Fwd: Is maven-cayenne-build-plugin supposed to be 1.4 compatible? replace(String, String) is a java 1.5 method call.

Posted by Mike Kienenberger <mk...@gmail.com>.
Is maven-cayenne-build-plugin supposed to be 1.4 compatible?

If so, there's one error that prevents this:

maven-cayenne-build-plugin/src/main/java/org.apache.cayenne.maven.plugin.confluence/DocPageRenderer.java:line
219 has

            matcher.appendReplacement(replacementBuffer,
matcher.group(0).replace(
                    "+",
                    "%20"));

replace(String, String) is a java 1.5 method call.

replaceAll(String, String) might work, but you'd have to escape the
regular expression characters.

This method would also work, but I don't think commons lang is a
dependency.   You could simply copy the code for this method, though,
into a common utility class -- using replace(String, String) is a
common 1.5/1.4 error, and it'd be worthwhile to have a simple
replacement when it happens.

http://jakarta.apache.org/commons/lang/apidocs/org/apache/commons/lang/StringUtils.html#replace(java.lang.String,%20java.lang.String,%20java.lang.String)