Re: Can I make project.xml extend a remote file?

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Can I make project.xml extend a remote file?

Adrian Herscu
Brett, I could not find the relevant issue id.
Can you post it here?
Thanks,
Adrian.

Brett Porter wrote:

> In Maven 1.1, this will be added (it isn't in CVS yet though).
>
> However, it will be by giving a groupId, artifactId and version - so
> you can access it from the repository.
>
> - Brett
>
>
> On Fri, 05 Nov 2004 12:17:03 -0600, Jiaqi Guo <[hidden email]> wrote:
>
>>Like
>>
>><project>
>>    <extends>http://mysite.com/myproject.pom</extends>
>>    ....
>></project>
>>
>>I've got an error after changed my project.xml to this.
>>
>>Thanks
>>Jiaqi
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: [hidden email]
>>For additional commands, e-mail: [hidden email]
>>
>>


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

Reply | Threaded
Open this post in threaded view
|

Re: Can I make project.xml extend a remote file?

Brett Porter
http://jira.codehaus.org/browse/MAVEN-1390

On 5/6/05, Adrian Herscu <[hidden email]> wrote:

> Brett, I could not find the relevant issue id.
> Can you post it here?
> Thanks,
> Adrian.
>
> Brett Porter wrote:
> > In Maven 1.1, this will be added (it isn't in CVS yet though).
> >
> > However, it will be by giving a groupId, artifactId and version - so
> > you can access it from the repository.
> >
> > - Brett
> >
> >
> > On Fri, 05 Nov 2004 12:17:03 -0600, Jiaqi Guo <[hidden email]> wrote:
> >
> >>Like
> >>
> >><project>
> >>    <extends>http://mysite.com/myproject.pom</extends>
> >>    ....
> >></project>
> >>
> >>I've got an error after changed my project.xml to this.
> >>
> >>Thanks
> >>Jiaqi
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: [hidden email]
> >>For additional commands, e-mail: [hidden email]
> >>
> >>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

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

Reply | Threaded
Open this post in threaded view
|

Re: Can I make project.xml extend a remote file?

Adrian Herscu
Brett,

Thanks for your fast reply.

So what is your advice?
I want the ability to build sub-projects in isolation (i.e. w/o
checking-out the entire multi-project).
Should I refrain from using the <extend> mechanism?

Adrian.

Brett Porter wrote:

> http://jira.codehaus.org/browse/MAVEN-1390
>
> On 5/6/05, Adrian Herscu <[hidden email]> wrote:
>
>>Brett, I could not find the relevant issue id.
>>Can you post it here?
>>Thanks,
>>Adrian.
>>
>>Brett Porter wrote:
>>
>>>In Maven 1.1, this will be added (it isn't in CVS yet though).
>>>
>>>However, it will be by giving a groupId, artifactId and version - so
>>>you can access it from the repository.
>>>
>>>- Brett
>>>
>>>
>>>On Fri, 05 Nov 2004 12:17:03 -0600, Jiaqi Guo <[hidden email]> wrote:
>>>
>>>
>>>>Like
>>>>
>>>><project>
>>>>   <extends>http://mysite.com/myproject.pom</extends>
>>>>   ....
>>>></project>
>>>>
>>>>I've got an error after changed my project.xml to this.
>>>>
>>>>Thanks
>>>>Jiaqi
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: [hidden email]
>>>>For additional commands, e-mail: [hidden email]
>>>>
>>>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: [hidden email]
>>For additional commands, e-mail: [hidden email]
>>
>
>>


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

Reply | Threaded
Open this post in threaded view
|

Re: Can I make project.xml extend a remote file?

Brett Porter
> I want the ability to build sub-projects in isolation (i.e. w/o
> checking-out the entire multi-project).

Definitely a good idea.

> Should I refrain from using the <extend> mechanism?

For now, unfortunately, yes. I found that was the simplest way to get by.

- Brett

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

Reply | Threaded
Open this post in threaded view
|

Re: Can I make project.xml extend a remote file?

Adrian Herscu

Brett Porter wrote:

>>I want the ability to build sub-projects in isolation (i.e. w/o
>>checking-out the entire multi-project).
>
>
> Definitely a good idea.
>
>
>>Should I refrain from using the <extend> mechanism?
>
>
> For now, unfortunately, yes. I found that was the simplest way to get by.
>

FIXME: This means that I will not be able to use the
multiproject goals.

> - Brett


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

Reply | Threaded
Open this post in threaded view
|

Re: Can I make project.xml extend a remote file?

thomasvdv
You could do this:

Within your module:

<project>
<extend>${module.root}/project.xml</extend>
 </project>

Within module's project.properties:

module.root=../.. [your path to your base POM]

When you build in isolation:

maven jar:install -Dmodule.root=.

On 5/7/05, Adrian Herscu <[hidden email]> wrote:

>
>
> Brett Porter wrote:
> >>I want the ability to build sub-projects in isolation (i.e. w/o
> >>checking-out the entire multi-project).
> >
> >
> > Definitely a good idea.
> >
> >
> >>Should I refrain from using the <extend> mechanism?
> >
> >
> > For now, unfortunately, yes. I found that was the simplest way to get
> by.
> >
>
> FIXME: This means that I will not be able to use the
> multiproject goals.
>
> > - Brett
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

newbie: Cannot run "m2 install"

Christian Schlaefcke
Hi Folks,

I´m trying get into maven and downloaded and installed maven 2 as
recommended. Now I´m in the "getting started" stage in understanding
maven. The create step for the default project worked fine but when I
try to run "m2 install" I get this stacktrace:

[INFO]
----------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO]
----------------------------------------------------------------------------
[INFO] [resources:resources]
[INFO] [compiler:compile]
[INFO] No sources to compile
[INFO] [resources:testResources]
[INFO] [compiler:testCompile]
[INFO] No sources to compile
---------------------------------------------------
constituent[0]: file:/usr/java/maven-2.0-alpha-1/lib/maven-script-
marmalade-2.0-alpha-1.jar
constituent[1]: file:/usr/java/maven-2.0-alpha-1/lib/wagon-provider-
api-1.0-alpha-2.jar
constituent[2]: file:/usr/java/maven-2.0-alpha-1/lib/maven-settings-2.0-
alpha-1.jar
constituent[3]: file:/usr/java/maven-2.0-alpha-1/lib/maven-core-2.0-
alpha-1.jar
constituent[4]: file:/usr/java/maven-2.0-alpha-1/lib/plexus-container-
artifact-1.0-alpha-2.jar
constituent[5]: file:/usr/java/maven-2.0-alpha-1/lib/marmalade-core-1.0-
alpha-2.jar
constituent[6]: file:/usr/java/maven-2.0-alpha-1/lib/maven-monitor-2.0-
alpha-1.jar
constituent[7]: file:/usr/java/maven-2.0-alpha-1/lib/commons-cli-1.0-
beta-2.jar
constituent[8]: file:/usr/java/maven-2.0-alpha-1/lib/wagon-http-
lightweight-1.0-alpha-2.jar
constituent[9]: file:/usr/java/maven-2.0-alpha-1/lib/plexus-marmalade-
factory-1.0-alpha-2.jar
constituent[10]: file:/usr/java/maven-2.0-alpha-1/lib/maven-plugin-2.0-
alpha-1.jar
constituent[11]: file:/usr/java/maven-2.0-alpha-1/lib/plexus-i18n-1.0-
beta-3.jarconstituent[12]: file:/usr/java/maven-2.0-alpha-1/lib/maven-
artifact-2.0-alpha-1.jar
constituent[13]: file:/usr/java/maven-2.0-alpha-1/lib/maven-model-2.0-
alpha-1.jar
---------------------------------------------------
org.apache.maven.reactor.ReactorException: Error executing project
within the reactor
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:144)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:233)
        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:585)
        at org.codehaus.classworlds.Launcher.launchEnhanced
(Launcher.java:303)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:243)
        at org.codehaus.classworlds.Launcher.mainWithExitCode
(Launcher.java:416)        at org.codehaus.classworlds.Launcher.main
(Launcher.java:363)
Caused by: org.apache.maven.lifecycle.LifecycleExecutionException: Error
during lifecycle execution
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute
(DefaultLifecycleExecutor.java:154)
        at org.apache.maven.DefaultMaven.processProject
(DefaultMaven.java:212)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:136)
        ... 9 more
Caused by: java.lang.NullPointerException
        at
org.apache.maven.plugin.PluginParameterExpressionEvaluator.evaluate
(PluginParameterExpressionEvaluator.java:95)
        at
org.apache.maven.plugin.DefaultPluginManager.getPluginConfigurationFromExpressions(DefaultPluginManager.java:635)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo
(DefaultPluginManager.java:411)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeMojo
(DefaultLifecycleExecutor.java:448)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executePhase
(DefaultLifecycleExecutor.java:417)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute
(DefaultLifecycleExecutor.java:140)
        ... 11 more

Thanks for any help!

Regards,

Chris


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

Reply | Threaded
Open this post in threaded view
|

Re: newbie: Cannot run "m2 install"

Brett Porter
It looks as if it is being run in a directory without a project.

Try the archetype goal in the getting started guide.

Cheers,
Brett

On 5/8/05, Christian Schlaefcke <[hidden email]> wrote:
> Hi Folks,
>
> I´m trying get into maven and downloaded and installed maven 2 as
> recommended. Now I´m in the "getting started" stage in understanding
> maven. The create step for the default project worked fine but when I
> try to run "m2 install" I get this stacktrace:
>

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

Reply | Threaded
Open this post in threaded view
|

Re: Can I make project.xml extend a remote file?

Adrian Herscu
In reply to this post by thomasvdv

Thomas Van de Velde wrote:

> You could do this:
>
> Within your module:
>
> <project>
> <extend>${module.root}/project.xml</extend>
>  </project>
>
> Within module's project.properties:
>
> module.root=../.. [your path to your base POM]
>
> When you build in isolation:
>
> maven jar:install -Dmodule.root=.

So what is the effect?
When building in isolation the project description extends itself?
Is this a supported feature, or it will break on the next Maven
release?


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

Reply | Threaded
Open this post in threaded view
|

Re: Can I make project.xml extend a remote file?

Brett Porter
In reply to this post by Adrian Herscu
> FIXME: This means that I will not be able to use the
> multiproject goals.

Can you explain? The multiproject goals are not particularly tied to
the inheritence, they just tend to correspond in many situations.

- Brett

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

Reply | Threaded
Open this post in threaded view
|

Re: Can I make project.xml extend a remote file?

Adrian Herscu
Brett, just asked if I can use the "multiproject" goals when the
sub-projects are not using the <extend> mechanism - will Maven
build them?

What do you thing about Thomas' solution? (previous post in this
thread)

Adrian.

Brett Porter wrote:
>>FIXME: This means that I will not be able to use the
>>multiproject goals.
>
>
> Can you explain? The multiproject goals are not particularly tied to
> the inheritence, they just tend to correspond in many situations.
>
> - Brett


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

Reply | Threaded
Open this post in threaded view
|

Re: Can I make project.xml extend a remote file?

Adrian Herscu
In reply to this post by Adrian Herscu
Adrian Herscu wrote:

>
> Thomas Van de Velde wrote:
>
>> You could do this:
>>
>> Within your module:
>>
>> <project>
>> <extend>${module.root}/project.xml</extend>
>>  </project>
>>
>> Within module's project.properties:
>>
>> module.root=../.. [your path to your base POM]
>>
>> When you build in isolation:
>>
>> maven jar:install -Dmodule.root=.

Tried that with Maven 1.0.2 - does not work:

org.apache.maven.MavenException: Parent POM is equal to the
current POM
         at
org.apache.maven.MavenUtils.getNonJellyProject(MavenUtils.java:236)
         at
org.apache.maven.MavenUtils.getProject(MavenUtils.java:143)
         at
org.apache.maven.MavenUtils.getProject(MavenUtils.java:122)
         at
org.apache.maven.MavenSession.initializeRootProject(MavenSession.java
:232)
         at
org.apache.maven.MavenSession.initialize(MavenSession.java:172)
         at org.apache.maven.cli.App.doMain(App.java:475)
         at org.apache.maven.cli.App.main(App.java:1239)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
         at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
         at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.werken.forehead.Forehead.run(Forehead.java:551)
         at com.werken.forehead.Forehead.main(Forehead.java:581)

>
>
> So what is the effect?
> When building in isolation the project description extends itself?
> Is this a supported feature, or it will break on the next Maven release?


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

Reply | Threaded
Open this post in threaded view
|

Re: Can I make project.xml extend a remote file?

Brett Porter
In reply to this post by Adrian Herscu
On 5/9/05, Adrian Herscu <[hidden email]> wrote:
> Brett, just asked if I can use the "multiproject" goals when the
> sub-projects are not using the <extend> mechanism - will Maven
> build them?

Yes, multiproject is unaware of what you are extending. In m1, it is
sometimes impossible to have your "master" build match your "parent"
build (eg, maven-plugins extends ../plugin-parent/project.xml instead
of project.xml, but still builds with multiproject).

> What do you thing about Thomas' solution? (previous post in this
> thread)

I didn't quite understand it either (but it is early ;) Seems it
didn't work out for you though.

- Brett

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

Reply | Threaded
Open this post in threaded view
|

Re: Can I make project.xml extend a remote file?

thomasvdv
Adrian,

Sorry, I was a bit too quick with my response. In fact what I do is I have a
master project.xml that I place in the folder where I've installed Maven.
All my applications extend this POM in the following way:

<extend>${maven.home}/project.xml</extend>

Application modules will further extend the application POM like this:

<extend>${application.home}/project.xml</extend>

Within project.properties you set the correct path (which is used by
multiproject)

application.home=../../.. [or whatever path that's fit for your module]

Now when you want to build a module in isolation, whithout having the
application pom checked out, you can refer dynamically replace the
application POM with the master pom:

maven jar:install -Dapplication.home='${maven.home}'

Does this make sense?

On 5/8/05, Brett Porter <[hidden email]> wrote:

>
> On 5/9/05, Adrian Herscu <[hidden email]> wrote:
> > Brett, just asked if I can use the "multiproject" goals when the
> > sub-projects are not using the <extend> mechanism - will Maven
> > build them?
>
> Yes, multiproject is unaware of what you are extending. In m1, it is
> sometimes impossible to have your "master" build match your "parent"
> build (eg, maven-plugins extends ../plugin-parent/project.xml instead
> of project.xml, but still builds with multiproject).
>
> > What do you thing about Thomas' solution? (previous post in this
> > thread)
>
> I didn't quite understand it either (but it is early ;) Seems it
> didn't work out for you though.
>
> - Brett
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>