Run 'mvn help:active-profiles' to see which profiles are activated. Seems like 
the property is not handed down or something...


On Thursday 15 November 2007 14:18, Aaron Zeckoski wrote:
> OK, when I use this and run "mvn clean install"
>    <profiles>
>       <profile>
>          <!-- default profile for sakai core-->
>          <id>sakai</id>
>          <activation>
>             <property>
>                <name>!sakai.distribution</name>
>             </property>
>          </activation>
>          <modules>
>             <module>alias-api/api</module>
>             <module>alias-impl/impl</module>
>             <module>alias-impl/pack</module>
>             <module>alias-tool/tool</module>
>          </modules>
>       </profile>
>       <profile>
>          <!-- kernel (services + utils only) -->
>          <id>kernel</id>
>          <activation>
>             <property>
>                <name>sakai.distribution</name>
>                <value>kernel</value>
>             </property>
>          </activation>
>          <modules>
>             <module>alias-api/api</module>
>             <module>alias-impl/impl</module>
>             <module>alias-impl/pack</module>
>          </modules>
>       </profile>
> ...
>
> I get the following error (see below). I am not confused about what
> the error is. That is perfectly clear. I AM confused about why it is
> happening. That "tool" bit is only defined in the top profile and the
> property IS set in the base POM (where the mvn is being run) to cause
> that NOT to run like so:
>    <properties>
>       <sakai.distribution>kernel</sakai.distribution>
>    </properties>
>
> Any ideas?
> -AZ
>
>
> [INFO] Error building POM (may not be this project's POM).
> Project ID: unknown
> Reason: Could not find the model file
> '/opt/kernel/alias/alias-tool/tool/pom.xml'. for project unknown
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.reactor.MavenExecutionException: Could not find the
> model file '/opt/kernel/alias/alias-tool/tool/pom.xml'. for project
> unknown
>         at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:378)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:290)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3
>9) at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
>l.java:25) at java.lang.reflect.Method.invoke(Method.java:585)
>         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 '/opt/kernel/alias/alias-tool/tool/pom.xml'. for project unknown
>         at
> org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenP
>rojectBuilder.java:1383) at
> org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInte
>rnal(DefaultMavenProjectBuilder.java:477) at
> org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProje
>ctBuilder.java:200) at
> org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:553) at
> org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:467) at
> org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:527) at
> org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:527) at
> org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:364) ... 11
> more
> Caused by: java.io.FileNotFoundException:
> /opt/kernel/alias/alias-tool/tool/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(DefaultMavenP
>rojectBuilder.java:1378) ... 18 more
>
> On Nov 15, 2007 10:51 AM, Roland Asmann <[EMAIL PROTECTED]> wrote:
> > Do you need the default-profile? If not, remove the tag
> > 'activateByDefault'.
> >
> > Or you can try setting it to run when your property is NOT set/a certain
> > value is NOT set:
> >
> > <property>
> >   <name>!property</name>
> > </property>
> >
> > or
> >
> > <property>
> >   <name>property</name>
> >   <value>!value</value>
> > </property>
> >
> > On Wednesday 14 November 2007 23:29, Aaron Zeckoski wrote:
> > > Yes... I did that. This is not a newbie question (though I wish it
> > > were). The default profile is still running unless I do something like
> > > "mvn install -Pkernel"
> > >
> > > Here are the poms:
> > > Parent: https://source.sakaiproject.org/contrib/caret/kernel/pom.xml
> > > (this sets a property)
> > > Project:
> > > https://source.sakaiproject.org/contrib/caret/kernel/alias/pom.xml
> > > (this one has the default profile getting activated even though another
> > > profile is activated via a property)
> > >
> > > So, the question is, how do I get the same effect as running "mvn
> > > install -Pkernel" (which is to not run the default profile anymore and
> > > only run the profile that I wanted)?
> > >
> > > -AZ
> > >
> > > On Nov 14, 2007 5:40 PM, Roland Asmann <[EMAIL PROTECTED]> wrote:
> > > > Check the profile-documentation and use the property-activation.
> > > >
> > > > On Wednesday 14 November 2007 18:02, Aaron Zeckoski wrote:
> > > > > I need to be able to trigger a specific profile WITHOUT executing
> > > > > the default profile AND without having to use the -P command line
> > > > > option. Ideally I want to trigger it using some setting in a POM
> > > > > file but any method where the user who is building the code can
> > > > > still type "mvn clean build" is fine.
> > > > >
> > > > > Can anyone help?
> > > > > Thanks
> > > > > -AZ
> > > >
> > > > --
> > > > Roland Asmann
> > > >
> > > > CFC Informationssysteme Entwicklungsgesellschaft m.b.H
> > > > Bäckerstrasse 1/2/7
> > > > A-1010 Wien
> > > > FN 266155f, Handelsgericht Wien
> > > >
> > > > Tel.: +43/1/513 88 77 - 27
> > > > Fax.: +43/1/513 88 62
> > > > Email: [EMAIL PROTECTED]
> > > > Web: www.cfc.at
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> > --
> > Roland Asmann
> >
> > CFC Informationssysteme Entwicklungsgesellschaft m.b.H
> > Bäckerstrasse 1/2/7
> > A-1010 Wien
> > FN 266155f, Handelsgericht Wien
> >
> > Tel.: +43/1/513 88 77 - 27
> > Fax.: +43/1/513 88 62
> > Email: [EMAIL PROTECTED]
> > Web: www.cfc.at
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Roland Asmann

CFC Informationssysteme Entwicklungsgesellschaft m.b.H
Bäckerstrasse 1/2/7
A-1010 Wien
FN 266155f, Handelsgericht Wien

Tel.: +43/1/513 88 77 - 27
Fax.: +43/1/513 88 62
Email: [EMAIL PROTECTED]
Web: www.cfc.at

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to