Archive for "maven2" documentation ?

37 views
Skip to first unread message

José Manuel Castroagudín Silva

unread,
Feb 17, 2012, 7:03:24 AM2/17/12
to maven-...@googlegroups.com
Hi everyone,

recently, I was told to investigate about how to integrate 'maven for
php' in our developing infrastructure. This was like this Monday or
so. (let's say i'm the "new guy" on this company)

So, I started reading php-maven.org, and doing some tests in a local
linux machine, copying and pasting some snippets from your web, and
doing some tests. By this time, i was using maven3, and apart from
some trouble with phpdocumentor not being in PATH, everything was
going fairly right...

Then, I took a look at how maven was being used in our company (they
were already using it with some Java projects), and after a few
strange test results, i realized that we were using maven 2...

So, i went back to php-maven.org, just to discover that (i think it
was today) a message had being posted on the home page, telling that
Maven2 is no longer supported.

That wouldn't be such a big problem, but unfortunately, there are no
chances of migrating to a new Maven version in our company... there's
nothing i can do about that

During this week, i noticed some strange things on php-maven.org (like
broken links, etc). So I went to this google group, read some messages
and discovered that someone was "currently reviewing the whole
website" (feb, 13) ...

So... my question is: would it be possible to access to some "archive
site", or something, where I could read trustworthy documentation
about using "Maven for PHP" along with Maven 2 ?

There had been some changes in the website during this week, so now
i'm afraid of getting mixed configurations (i've copied and pasted
things like settings.xml, and such), and now I can not trust in having
done it the right way... I can't even be sure of what i've copied,
since those changes were being made while i was browsing the web,
hehehe

Thanks in advance,

--
Saúde,

J. M. Castroagudín (jchaves)
http://chav.es

martin.eisengardt

unread,
Feb 17, 2012, 7:59:54 AM2/17/12
to maven-...@googlegroups.com
Hi and welcome.


At first maven2 and maven3 are nearby compatible for the most things.

The settings.xml is required to tell maven about the php-maven repository. As long as you have a settings.xml telling something about "repos.php-maven.org" it is valid. It does not matter if it is maven2 or maven3 at this point. Till the domain migration to our new nexus we had a temporary repository setup (at xworlds) and however they are currently mirrored. So the xworlds repository is still up and running but deprecated.

PHP-Maven with version numbers 2 (2.0-SNAPSHOT and 2.0.0-beta-1) are only compatible to maven3. And PHP-Maven with version numbering 1 won't be supported. Sorry. There are to much internal changes to make it ever backward compatible. And we require some features from php-maven3 core. I strongly recommend to upgrade your projects and infrastructure to maven3. There are some benefits (f.e. performance). Read http://www.sonatype.com/people/2011/02/top-ten-reasons-to-move-to-maven-3/
PHP-Maven 2 had three main changes compared to PHP-Maven 1.
- It does not any longer support PHP-Versions below 5.2. This is caused by the second major change:
- It now creates phar archives instead of jar archives. So PHP-Maven 2 is more feeling like the php way and not the java way.
- The assemblies are temporary removed. But they will be back again in later versions.

However migrating to phpmaven3 requires some changes. This might be a problem in your company. But think about the following: One day maven2 won't be supported any more and day after day the migration to maven3 might become more complex. Even today many bugs in the well known plugins are simply closed with hint "use maven 3 instead".


If you still cannot migrate to maven3 there is another option: Parallel installation. The only thing you must be aware of is that the correct "mvn" is found and that the correct "maven/bin" folder is on the path. If you are using the java projects you can switch to maven2. If you are using PHP-Maven you can switch to maven3. And that would be a good solution to migrate your java projects step by step to maven3.
If you are using eclipse it would be more easy. You can add both, maven2 and maven3 to eclipse and use maven2 in your java workspace and maven3 in php workspace. You may even tell maven3 to use another local repository (~/.m3 instead of ~/.m2)


Some notes on migration to maven3.
- If you are using profiles the file ~/.m2/profiles.xml must be integrated into ~/.m2/settings.xml.
- The plugins you are using during build (maven-site-plugin etc.) should be upgrade to newest versions. Depending on the plugins you are using there may be changes in configuration.
- The reporting section of the pom is now deprecated. It must be moved to a configuration section of the maven-site-plugin.


However, the local repository, the settings.xml and the project poms are mostly compatible.



P.S.: The phpdocumentor will change soon. It will be using the repository and download the phpdoumentor instead of executing a manual/pear installation. This will behave similar to PHPUnit which already is downloaded from repository and extracted to target/php-test-deps


Greetings Martin



--
You received this message because you are subscribed to the Google Groups "Maven for PHP" group.
To post to this group, send email to maven-...@googlegroups.com.
To unsubscribe from this group, send email to maven-for-ph...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/maven-for-php?hl=en.


jchaves

unread,
Feb 17, 2012, 9:13:41 AM2/17/12
to Maven for PHP


On 17 feb, 13:59, "martin.eisengardt"
<martin.eisenga...@googlemail.com> wrote:
> Hi and welcome.
>
> At first maven2 and maven3 are nearby compatible for the most things.
>
> The settings.xml is required to tell maven about the php-maven repository.
> As long as you have a settings.xml telling something about "
> repos.php-maven.org" it is valid. It does not matter if it is maven2 or
> maven3 at this point. Till the domain migration to our new nexus we had a
> temporary repository setup (at xworlds) and however they are currently
> mirrored. So the xworlds repository is still up and running but deprecated.

Yep, that was one of the things that made me realize that something
strange was going on, hehe: some "settings" were pointing to xworlds,
and others to php-maven.org... I was like "...the hell is going on
here? I copied them from the same place!"

>
> PHP-Maven with version numbers 2 (2.0-SNAPSHOT and 2.0.0-beta-1) are only
> compatible to maven3. And PHP-Maven with version numbering 1 won't be
> supported. Sorry. There are to much internal changes to make it ever
> backward compatible. And we require some features from php-maven3 core. I
> strongly recommend to upgrade your projects and infrastructure to maven3.

Yea, i guess that, at some point, there will be a migration, but this
is kind of a big company, and I have absolutely no power to take such
decisions... At this point, I must just assume that Maven 2 is the
thing.

> There are some benefits (f.e. performance). Readhttp://www.sonatype.com/people/2011/02/top-ten-reasons-to-move-to-mav...
Yep, that too. I was obtaining different results running "mvn site"...

Migrating to php-maven2 (the one that requires maven3, if i understood
well), wouldn't be difficult, as in fact, we have not yet started
using maven with php (and the first testing was, in fact, done on
Maven3 -- although i'm not sure if i was using a proper configuration,
hehe... It depends on when have I copied the snippets). But it's
something i can simply not do...

The problem is... I'm somehow forced to stay on Maven2 (at least by
now), and I'm really new to maven and php-maven (well, like a couple
of days of confusing testing, hehe), so it would be really helpful to
have something like an archive to look at. I even thought about
looking at the sources, but i think that was one of those broken links
I found, hehe

Anyway, i want to thank you for your quick response. It looks like you
are on the middle of a busy week, so thanks for taking the time to
answer.


>
> However, the local repository, the settings.xml and the project poms are
> mostly compatible.
>
> P.S.: The phpdocumentor will change soon. It will be using the repository
> and download the phpdoumentor instead of executing a manual/pear
> installation. This will behave similar to PHPUnit which already is
> downloaded from repository and extracted to target/php-test-deps
>
> Greetings Martin
>
> On Fri, Feb 17, 2012 at 1:03 PM, José Manuel Castroagudín Silva <
>

martin.eisengardt

unread,
Feb 17, 2012, 10:01:20 AM2/17/12
to maven-...@googlegroups.com
You need not thank for getting support ;-)

So let me explain a scenario that should fit your needs. The suggestion is to install maven2 and maven3 parallel. If you are within a big company that has for example hundred of maven projects, you should suggest the following to your management:
- Have a maven3 installation parallel to maven2.
- Switch between those installations either by path variable/ ide support or (as long as you do never require any special plugins, f.e. maven-invoker-plugins) by command. For example you can distribute a maven installation to every one in your company where the "mvn" is renamed to "mvn3". As long as you need maven2 you would classical invoke "mvn". As you need maven3 you could invoke "mvn3".
- Have a different local repository. This can be done by customizing the "mvn3" script. You can use for example use ~/.m2 for maven2 and ~/.m3 for maven3. Migrate/copy the settings.xml to the ~/.m3 folder. This is an optional step and only needed if you use profiles. Ask google for migration hints to maven3.

That's it. You may even use the same repository for both, maven2 and maven3. They are compatible. Maven3 uses the same layout already known from Maven2. However you should not use the "legacy" layout for your repositories (legacy is the maven1 layout).


The result would be:
- New projects should be forced to use maven3.
- PHP project must use maven3 (because of PHP-Maven itself).
- As a benefit you are prepared to migrate your java projects step by step. As the result is JAR a maven2 generated project result will always be usable by maven3. Even the poms should be compatible with maven3.


Greetings
Martin

mepeisen

unread,
Feb 18, 2012, 7:31:30 PM2/18/12
to Maven for PHP
Some additional notes because I did not answer your question about
older website releases. Archived documentation will be available as of
PHP-Maven >= 2.0.
See the following urls:
http://www.php-maven.org/tags/2.0.0-beta-1/index.html
http://www.php-maven.org/tags/2.0.0-beta-2/index.html
http://www.php-maven.org/branches/2.0-SNAPSHOT/index.html
So you may referr to a stable version of the documentation in future
releases.

The website (www.php-maven.org) will link to one of the latest
releases but the older documentation will always be available and not
deleted.

jchaves

unread,
Feb 21, 2012, 6:45:45 AM2/21/12
to Maven for PHP
hi again,

first, i must say sorry for not answering before. I have been a bit
ill, i have had a pretty strong cold...

And, to keep anyone interested informed: what i did was git-cloning
the source code, going to a less recent commit (i chose one from like
4 months ago), and then run a "mvn site:site"...

That way, i got an exact copy of the website as it was at the time,
and can keep it as a reference.

Thanks for your time, Martin... and i'm sorry i didn't think about
this before asking and making you lose your time... sorry.

On 19 feb, 01:31, mepeisen <martin.eisenga...@googlemail.com> wrote:
> Some additional notes because I did not answer your question about
> older website releases. Archived documentation will be available as of
> PHP-Maven >= 2.0.
> See the following urls:http://www.php-maven.org/tags/2.0.0-beta-1/index.htmlhttp://www.php-maven.org/tags/2.0.0-beta-2/index.htmlhttp://www.php-maven.org/branches/2.0-SNAPSHOT/index.html

martin.eisengardt

unread,
Feb 21, 2012, 7:05:35 AM2/21/12
to maven-...@googlegroups.com
Anyhow: As I said before we will archive the previous website versions of tagged releases from know.
From time to time there might be updates but the content won't be changed significant :-)
The urls (especially repos.php-maven.org/releases etc.) should not be changed within the next 25 years.

The current homepage http://www.php-maven.org contains several links. The menu on the left side is currently linked to the latest snapshot. As soon as we publish the first RC for the 2.0.0 version stream the links will change to the latest stable release. On the top link bar you will find the two links called "latest" and "stable". They lead to the websites of the latest snapshot and the latest stable version.
The tutorials are know version specific. That means tat (theoretical) each version contains a different set of tutorials and documentation.
To refer to a stable documentation you should bookmark the link to a stable PHP-Maven version.

The git from about 4 months ago is not a good choice. It contained some "broken" documentation. It means that the documentation was not up to date with php maven 2.0. There were some things from PHP Maven 1.0 inside them. So I thought it would no good idea to archive this page. However we can indeed recreate the site by checkout older commits from git. That's the maven way ;-)

You might choose to follow our feeds. They are actually available in the website source. However no browser was able to auto-detect them :-(
I will soon add a feed page with overview of the available feeds.

Website/ Main news feed: http://www.php-maven.org/rss.xml
(currently not available) Website/ Main news feed archive: http://www.php-maven.org/rss.archive.xml
Google group feed (newest messages) https://groups.google.com/group/maven-for-php/feed/rss_v2_0_msgs.xml
Google group feed (newest topics) https://groups.google.com/group/maven-for-php/feed/rss_v2_0_topics.xml
Github feed (newest commits) https://github.com/php-maven/maven-php-plugin/commits/master.atom


What is going to be chanced from 2.0.0-beta-2 to 2.0.0?
- There is some additional work at the web-application archetype (and the 5 minuten web tutorial will change for that).
- There will be some additional archetypes.
- There will be some additional tutorials and documentation.
- I do not expect to change the existing tutorials.
- As we know prefer using the php-parent-pom we will change the documentation at this point.

Reply all
Reply to author
Forward
0 new messages