You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Roberto UserList <rc...@gmail.com> on 2006/12/22 17:08:43 UTC

Problems using profile

Hi, all!
I'm using profile to try to control to build or not the subprojets of a main
project.
In each profile, I'd like Maven to checkout the source code of the
subproject from SVN , and then, to build subproject's artifact defined in
the module tag.
The problem is that Maven tries to find subprojects files and directories,
before checking out the files from SVN.
Here is part of pom.xml and the error message:
   <profiles>
      <profile>
         <id>modulo1</id>
         <activation>
            <property>
               <name>mod1</name>
               <value>true</value>
            </property>
         </activation>
         <build>
            <plugins>
               <plugin>
                  <artifactId>maven-scm-plugin</artifactId>
                  <executions>
                     <execution>
                        <id>checkout_Modulo_1</id>
                        <phase>process-resources</phase>
                        <goals>
                           <goal>checkout</goal>
                        </goals>
                        <configuration>

<checkoutDirectory>${basedir}/Mod1</checkoutDirectory
                           <tag>${versao.sis}/modulos/Mod1</tag>

<tagBase>svn://10.121.2.30/repoteste/Siscargas/releas
                           <username>rmanager</username>
                           <password>inplus</password>
                        </configuration>
                     </execution>
                  </executions>
               </plugin>
            </plugins>
         </build>
         <modules><module>Mod1</module></modules>
      </profile>

Here is the error message:

[INFO] Final Memory: 12M/196M
[INFO]
------------------------------------------------------------------------
-bash-3.00$ mvn install -Dversao.sis=rel2 -Dmod1=true
-Dmod1.versao=1.8-Dmod2=false -
Dmod2.versao=2.1 -e -X
+ Error stacktraces are turned on.
Maven version: 2.0.4
[DEBUG] Building Maven user-level plugin registry from:
'/bea/rmanager/.m2/plugin-registry.xml'
[DEBUG] Building Maven global-level plugin registry from: '/usr/local/maven-
2.0.4/conf/plugin-registry.xml'
[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
'/bea/rmanager/build/Siscargas/Mod1/pom.xml'.

[INFO]
------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.reactor.MavenExecutionException: Could not find the model
file '/bea/rmanager/build/Siscargas/Mod1/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: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)
Thanks in advance for the help.
Regards,
     Roberto.