You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Gopal Patwa <go...@gmail.com> on 2006/08/15 08:25:29 UTC

Profile NOT running

I have profile defined in POM.xml 

and I tried running mvn -P dev package or declaring activation tag in
profile but profile never runs

I still wonder is there a way to define this profile in profiles.xml and
should works, since this change is for developmnt only and we don't want
this feature in production
 
    <profiles>
        <profile>
            <id>dev</id>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <artifactId>maven-antrun-plugin</artifactId>
                            <executions>
                                <execution>
                                    <id>clean</id>
                                    <phase>clean</phase>
                                    <configuration>
                                        <tasks>
                                            <delete
dir="C:\bea\user_projects\domains\gpatwa_domain\autodeploy\vault"/>
                                        </tasks>
                                    </configuration>
                                    <goals>
                                        <goal>run</goal>
                                    </goals>
                                </execution>
                                <execution>
                                    <id>package</id>
                                    <phase>package</phase>
                                    <configuration>
                                        <tasks>
                                            <copy
todir="C:\Apache_Software_Foundation\Tomcat_5.5\webapps\vault">
                                                <fileset
dir="target/vault"/>
                                            </copy>
                                        </tasks>
                                    </configuration>
                                    <goals>
                                        <goal>run</goal>
                                    </goals>
                                </execution>
                            </executions>
                        </plugin>
                        
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
    </profiles>


Thanks
Gopal
-- 
View this message in context: http://www.nabble.com/Profile-NOT-running-tf2107699.html#a5809589
Sent from the Maven - Users forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Profile NOT running

Posted by Gopal Patwa <go...@gmail.com>.
After removing pluginManagement tag it worked but I still have some concerns

I still wonder is there a way to define this profile in profiles.xml and
should works, since this change is for developmnt only and we don't want
this feature in production.

I get compilation error when I define same profile content in profiles.xml

OR Is there a better way to do this job, what my profile is doing it

Thanks
Gopal

Error:
====

Caused by: org.apache.maven.profiles.activation.ProfileActivationException:
Cannot parse profiles.xml resource from directory: C:\gpatwa_perforce\gene
va\keystone\vault-inventory\application
        at
org.apache.maven.project.DefaultMavenProjectBuilder.loadProjectExternalProfiles(DefaultMavenProjectBuilder.java:1257)
        at
org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:986)
        ... 17 more
Caused by: org.codehaus.plexus.util.xml.pull.XmlPullParserException:
Unrecognised tag: 'build' (position: START_TAG seen ...</id>\r\n           
<buil
d>... @8:20)
        at
org.apache.maven.profiles.io.xpp3.ProfilesXpp3Reader.parseProfile(ProfilesXpp3Reader.java:620)
        at
org.apache.maven.profiles.io.xpp3.ProfilesXpp3Reader.parseProfilesRoot(ProfilesXpp3Reader.java:664)
        at
org.apache.maven.profiles.io.xpp3.ProfilesXpp3Reader.read(ProfilesXpp3Reader.java:1190)
        at
org.apache.maven.profiles.io.xpp3.ProfilesXpp3Reader.read(ProfilesXpp3Reader.java:1201)
        at
org.apache.maven.profiles.DefaultMavenProfilesBuilder.buildProfiles(DefaultMavenProfilesBuilder.java:74)
        at
org.apache.maven.project.DefaultMavenProjectBuilder.loadProjectExternalProfiles(DefaultMavenProjectBuilder.java:1229)
        ... 18 more





Gopal Patwa wrote:
> 
> I have profile defined in POM.xml 
> 
> and I tried running mvn -P dev package or declaring activation tag in
> profile but profile never runs
> 
> I still wonder is there a way to define this profile in profiles.xml and
> should works, since this change is for developmnt only and we don't want
> this feature in production
>  
>     <profiles>
>         <profile>
>             <id>dev</id>
>             <build>
>                 <pluginManagement>
>                     <plugins>
>                         <plugin>
>                             <artifactId>maven-antrun-plugin</artifactId>
>                             <executions>
>                                 <execution>
>                                     <id>clean</id>
>                                     <phase>clean</phase>
>                                     <configuration>
>                                         <tasks>
>                                             <delete
> dir="C:\bea\user_projects\domains\gpatwa_domain\autodeploy\vault"/>
>                                         </tasks>
>                                     </configuration>
>                                     <goals>
>                                         <goal>run</goal>
>                                     </goals>
>                                 </execution>
>                                 <execution>
>                                     <id>package</id>
>                                     <phase>package</phase>
>                                     <configuration>
>                                         <tasks>
>                                             <copy
> todir="C:\Apache_Software_Foundation\Tomcat_5.5\webapps\vault">
>                                                 <fileset
> dir="target/vault"/>
>                                             </copy>
>                                         </tasks>
>                                     </configuration>
>                                     <goals>
>                                         <goal>run</goal>
>                                     </goals>
>                                 </execution>
>                             </executions>
>                         </plugin>
>                         
>                     </plugins>
>                 </pluginManagement>
>             </build>
>         </profile>
>     </profiles>
> 
> 
> Thanks
> Gopal
> 

-- 
View this message in context: http://www.nabble.com/Profile-NOT-running-tf2107699.html#a5809687
Sent from the Maven - Users forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org