Jason,

I'm really, REALLY,  glad you have taken an interest in m2 migration
:-) Your experience with other such migrations can surely help us.
Alright so now you can guide us.

So we shall hardcode the parent <version> in all pom.xml and remove
the <version>. element for that project itself. That should help us do
a single build w/o the -N.

What else would u advise ?

Thanx
Prasad



On 6/26/06, Jason Dillon <[EMAIL PROTECTED]> wrote:
I don't see what the problem is.

Is this just about putting the version in the parent element?  I
don't really like that it has to be there, but I am okay with it and
using the release plugin to manage that value, which is the main
benefit of the release plugin IMO.

Or am I missing something?

I've recently converted a number of large m1 projects to using m2 and
have run into very little issues.  Most are related to use of custom
jelly, requiring new mojos which is not a big issue.  Others being
due to projects dependent on those mojos, and keeping them under a
separate lifecycle, and expecting that users will download them not
build them.

So the top-level pom.xml just says <version>1.2-SNAPSHOT</version>
and then all children have <parent>...<version>1.2-SNAPSHOT</
version></parent>.

This works very well to *build* and is only a slight pain when
releasing, but as I mentioned the release plugin handles this.

I would obviously rather that it inspect the relativePath first... up
until it finds a version and if the parent is not available then pull
from the repo... but that isn't gonna happen any time soonish for us
to benefit from.

IMO, we need to adapt to how m2 works now and then grow with it as we
get features/bugs fixed and implemented.

--jason


On Jun 26, 2006, at 7:21 PM, Prasad Kashyap wrote:

> Yes, that's the ideal situation and we very much desire it. But here's
> what's preventing us
>
> http://issues.apache.org/jira/browse/GERONIMO-1755#action_12371755
> http://jira.codehaus.org/browse/MNG-624
>
> Cheers
> Prasad
>
> On 6/26/06, Jason Dillon <[EMAIL PROTECTED]> wrote:
>> So what to do about openejb?
>>
>> Build fails:
>>
>> <snip>
>> Bliss:~/ws/apache/geronimo/trunk jason$ mvn
>> [INFO] Scanning for projects...
>> [INFO]
>> ---------------------------------------------------------------------
>> ---
>> [ERROR] FATAL ERROR
>> [INFO]
>> ---------------------------------------------------------------------
>> ---
>> [INFO] Error building POM (may not be this project's POM).
>>
>>
>> Project ID: unknown
>>
>> Reason: Could not find the model file '/Users/jason/ws/apache/
>> geronimo/trunk/openejb/modules/pom.xml'.
>>
>>
>> [INFO]
>> ---------------------------------------------------------------------
>> ---
>> [INFO] Trace
>> org.apache.maven.reactor.MavenExecutionException: Could not find the
>> model file '/Users/jason/ws/apache/geronimo/trunk/openejb/modules/
>> pom.xml'.
>>          at org.apache.maven.DefaultMaven.getProjects
>> (DefaultMaven.java:365)
>>          at org.apache.maven.DefaultMaven.doExecute
>> (DefaultMaven.java:
>> 278)
>>          at org.apache.maven.DefaultMaven.execute
>> (DefaultMaven.java:115)
>>          at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
>>          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
>> Method)
>>          at sun.reflect.NativeMethodAccessorImpl.invoke
>> (NativeMethodAccessorImpl.java:39)
>>          at sun.reflect.DelegatingMethodAccessorImpl.invoke
>> (DelegatingMethodAccessorImpl.java:25)
>>          at java.lang.reflect.Method.invoke(Method.java:324)
>>          at org.codehaus.classworlds.Launcher.launchEnhanced
>> (Launcher.java:315)
>>          at org.codehaus.classworlds.Launcher.launch(Launcher.java:
>> 255)
>>          at org.codehaus.classworlds.Launcher.mainWithExitCode
>> (Launcher.java:430)
>>          at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
>> Caused by: org.apache.maven.project.ProjectBuildingException: Could
>> not find the model file '/Users/jason/ws/apache/geronimo/trunk/
>> openejb/modules/pom.xml'.
>>          at
>> org.apache.maven.project.DefaultMavenProjectBuilder.readModel
>> (DefaultMavenProjectBuilder.java:1274)
>>          at
>> org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFi
>> leI
>> nternal(DefaultMavenProjectBuilder.java:414)
>>          at org.apache.maven.project.DefaultMavenProjectBuilder.build
>> (DefaultMavenProjectBuilder.java:192)
>>          at org.apache.maven.DefaultMaven.getProject
>> (DefaultMaven.java:515)
>>          at org.apache.maven.DefaultMaven.collectProjects
>> (DefaultMaven.java:447)
>>          at org.apache.maven.DefaultMaven.collectProjects
>> (DefaultMaven.java:491)
>>          at org.apache.maven.DefaultMaven.getProjects
>> (DefaultMaven.java:351)
>>          ... 11 more
>> Caused by: java.io.FileNotFoundException: /Users/jason/ws/apache/
>> geronimo/trunk/openejb/modules/pom.xml (No such file or directory)
>>          at java.io.FileInputStream.open(Native Method)
>>          at java.io.FileInputStream.<init>(FileInputStream.java:106)
>>          at java.io.FileReader.<init>(FileReader.java:55)
>>          at
>> org.apache.maven.project.DefaultMavenProjectBuilder.readModel
>> (DefaultMavenProjectBuilder.java:1269)
>>          ... 17 more
>> [INFO]
>> ---------------------------------------------------------------------
>> ---
>> [INFO] Total time: 33 seconds
>> [INFO] Finished at: Mon Jun 26 18:30:25 PDT 2006
>> [INFO] Final Memory: 7M/14M
>> [INFO]
>> ---------------------------------------------------------------------
>> ---
>> </snip>
>>
>> Do I need to check something else out?  If so... WHY?
>>
>> Or do I need to pass some-other configuration?  If so... WHY?
>>
>> I've said this before and will say it again (and again)...
>>
>> I should be able to:
>>
>>   1) svn co .../geronimo/trunk
>>   2) mvn install
>> ...
>>   3) start the server
>>
>> The only assumption made is that Maven 2.0 is installed and that
>> JAVA_HOME (or the equiv on OS X) is setup correctly.
>>
>> If there are more than 3 steps to go from src to server, then
>> something is wrong... and should be fixed.
>>
>>   * * *
>> Its been months since I have been able to actually build G...  I'd
>> recommend that people periodically blow away your repository cache so
>> that you get really clean builds.  Often m2 problems will only start
>> to show up when a clean repo is used... :-(
>>
>> --jason
>>
>>
>> On Jun 26, 2006, at 6:46 PM, Prasad Kashyap wrote:
>>
>> > I'm sorry but I'm confused about this main build and the plugins
>> > build. I thought they are all one single build like we did in m1
>> with
>> > all the new(xx).
>> >
>> > This is how the build order is specified in the geronimo/pom.xml
>> >
>> > <modules>
>> >     <module>modules</module>
>> >      <module>m2-plugins</module>
>> >      <module>applications</module>
>> >      <module>openejb/modules</module>
>> >      <module>configs</module>
>> >      <module>assemblies</module>
>> > <modules>
>> >
>> > There's no cyclical dependency there.
>> >
>> >
>> > Jason, as for the <relativePath>, I tried that. It didn't help.
>> Also,
>> > the default value of <relativePath> is ../pom.xml anyways.
>> >
>> > Cheers
>> > Prasad
>> >
>> >
>> >
>> >
>> > On 6/26/06, Jason Dillon <[EMAIL PROTECTED]> wrote:
>> >> FYI, seems that you need to build trunk first (probably until it
>> >> fails with a missing plugin), then build the plugins, then rebuild
>> >> trunk.  Just building m2-plugins pukes with:
>> >>
>> >> <snip>
>> >> [INFO]
>> >>
>> ---------------------------------------------------------------------
>> >> ---
>> >> [ERROR] BUILD ERROR
>> >> [INFO]
>> >>
>> ---------------------------------------------------------------------
>> >> ---
>> >> [INFO] Failed to resolve artifact.
>> >>
>> >> Missing:
>> >> ----------
>> >> 1) org.apache.geronimo.modules:geronimo-deploy-tool:jar:1.2-
>> SNAPSHOT
>> >>
>> >>    Try downloading the file manually from the project website.
>> >>
>> >>    Then, install it using the command:
>> >>        mvn install:install-file -
>> DgroupId=org.apache.geronimo.modules
>> >> -DartifactId=geronimo-deploy-tool \
>> >>            -Dversion=1.2-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/
>> >> file
>> >>
>> >>    Path to dependency:
>> >>          1) org.apache.geronimo.plugins:geronimo-packaging-
>> >> plugin:maven-plugin:1.2.0
>> >>          2) org.apache.geronimo.modules:geronimo-deploy-
>> tool:jar:1.2-
>> >> SNAPSHOT
>> >>
>> >> 2) org.apache.geronimo.modules:geronimo-kernel:jar:1.2-SNAPSHOT
>> >>
>> >>    Try downloading the file manually from the project website.
>> >>
>> >>    Then, install it using the command:
>> >>        mvn install:install-file -
>> DgroupId=org.apache.geronimo.modules
>> >> -DartifactId=geronimo-kernel \
>> >>            -Dversion=1.2-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/
>> >> file
>> >>
>> >>    Path to dependency:
>> >>          1) org.apache.geronimo.plugins:geronimo-packaging-
>> >> plugin:maven-plugin:1.2.0
>> >>          2) org.apache.geronimo.modules:geronimo-kernel:jar:1.2-
>> >> SNAPSHOT
>> >>
>> >> 3) org.apache.geronimo.modules:geronimo-service-builder:jar:1.2-
>> >> SNAPSHOT
>> >>
>> >>    Try downloading the file manually from the project website.
>> >>
>> >>    Then, install it using the command:
>> >>        mvn install:install-file -
>> DgroupId=org.apache.geronimo.modules
>> >> -DartifactId=geronimo-service-builder \
>> >>            -Dversion=1.2-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/
>> >> file
>> >>
>> >>    Path to dependency:
>> >>          1) org.apache.geronimo.plugins:geronimo-packaging-
>> >> plugin:maven-plugin:1.2.0
>> >>          2) org.apache.geronimo.modules:geronimo-service-
>> builder:jar:
>> >> 1.2-SNAPSHOT
>> >>
>> >> 4) org.apache.geronimo.modules:geronimo-system:jar:1.2-SNAPSHOT
>> >>
>> >>    Try downloading the file manually from the project website.
>> >>
>> >>    Then, install it using the command:
>> >>        mvn install:install-file -
>> DgroupId=org.apache.geronimo.modules
>> >> -DartifactId=geronimo-system \
>> >>            -Dversion=1.2-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/
>> >> file
>> >>
>> >>    Path to dependency:
>> >>          1) org.apache.geronimo.plugins:geronimo-packaging-
>> >> plugin:maven-plugin:1.2.0
>> >>          2) org.apache.geronimo.modules:geronimo-system:jar:1.2-
>> >> SNAPSHOT
>> >>
>> >> ----------
>> >> 4 required artifacts are missing.
>> >>
>> >> for artifact:
>> >>    org.apache.geronimo.plugins:geronimo-packaging-plugin:maven-
>> >> plugin:
>> >> 1.2.0
>> >>
>> >> from the specified remote repositories:
>> >>    central (http://repo1.maven.org/maven2),
>> >>    codehaus-dist (http://dist.codehaus.org),
>> >>    Apache CVS (http://people.apache.org/maven-snapshot-
>> repository),
>> >>    maven1-ibiblio (http://www.ibiblio.org/maven),
>> >>    snapshots (http://snapshots.maven.codehaus.org/maven2),
>> >>    apache-cvs (http://cvs.apache.org/repository)
>> >> </snip>
>> >>
>> >> Looks like bad news... if the main build needs the plugin, and the
>> >> plugin needs the main build, and m2 won't let it all run/build
>> at the
>> >> same time due to its plugin resolution fluff.
>> >>
>> >> May need to provide a bootstrap, which builds a few select
>> modules,
>> >> then the entire system... but that is not very friendly either.
>> >>
>> >>   * * *
>> >>
>> >> Also, start adding <relativePath>../pom.xml</relativePath> to the
>> >> parent element, so that you can skip the mvn -N install bits.
>> >>
>> >> --jason
>> >>
>> >>
>> >> On Jun 26, 2006, at 1:05 PM, Prasad Kashyap wrote:
>> >>
>> >> > Alan,
>> >> >
>> >> > You'd have to build the geronimo-packaging-plugin manually
>> >> first. It's
>> >> > under geronimo/m2-plugins
>> >> >
>> >> > cd geronimo/m2-plugins
>> >> > mvn clean
>> >> > mvn -N
>> >> > mvn
>> >> >
>> >> > Cheers
>> >> > Prasad
>> >> >
>> >> > On 6/25/06, Alan D. Cabrera <[EMAIL PROTECTED]> wrote:
>> >> >> I get this error:
>> >> >>
>> >> >> Try downloading the file manually from the project website.
>> >> >>
>> >> >> Then, install it using the command:
>> >> >>     mvn install:install-file -
>> DgroupId=org.apache.geronimo.plugins
>> >> >> -DartifactId=geronimo-packaging-plugin \
>> >> >>         -Dversion=1.2.0 -Dpackaging=maven-plugin -Dfile=/path/
>> >> to/file
>> >> >>
>> >> >>
>> >> >>   org.apache.geronimo.plugins:geronimo-packaging-plugin:maven-
>> >> >> plugin:1.2.0
>> >> >>
>> >> >> from the specified remote repositories:
>> >> >>   central (http://repo1.maven.org/maven2),
>> >> >>   codehaus-dist (http://dist.codehaus.org/mojo/m2-snapshots),
>> >> >>   snapshots (http://snapshots.maven.codehaus.org/maven2)
>> >> >>
>> >> >>   org.apache.geronimo.plugins:geronimo-packaging-plugin:maven-
>> >> >> plugin:1.2.0
>> >> >>
>> >> >> from the specified remote repositories:
>> >> >>   central (http://repo1.maven.org/maven2),
>> >> >>   codehaus-dist (http://dist.codehaus.org/mojo/m2-snapshots),
>> >> >>   snapshots (http://snapshots.maven.codehaus.org/maven2)
>> >> >>
>> >> >>
>> >> >>
>> >> >> Regards,
>> >> >> Alan
>> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>>
>>


Reply via email to