Just so that you know, profiles.xml is removed in Maven 3.x.... so you might want to rethink that refactoring/cleanup you are doing!
(IIRC, Jason is fine if somebody wants to write the support for it back in providing that they do not degrade the performance) -Stephen On 8 February 2010 15:57, Sufie Seifoddini <[email protected]> wrote: > Hi everyone, > > I am in the process of cleaning up some pom files and have pulled the > dependencies and build elements out of the pom.xml file into profiles.xml. > I keep getting errors that the element build is not recognized. When I > comment out build, I get the same error on dependencies. Is there a known > issue or any specific setup required? > > > profiles.xml: > > <profilesXml> > <profiles> > <profile> > <id>development</id> > <activation> > <property> > <name>environment.type</name> > <value>dev</value> > </property> > </activation> > <build> > <plugins> > <plugin> > <artifactId>maven-compiler-plugin</artifactId> > <configuration> > <source>1.6</source> > <target>1.6</target> > <encoding>UTF-8</encoding> > <debug>true</debug> > <optimize>false</optimize> > </configuration> > </plugin> > </plugins> > </build> > <dependencies> > <dependency> > <groupId>junit</groupId> > <artifactId>junit</artifactId> > <version>3.8.1</version> > <scope>test</scope> > </dependency> > </dependencies> > > </profile> > </profiles> > </profilesXml> > > > Snippet of exception thrown: > > at > org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:200) > at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:632) > at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:515) > at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:419) > ... 12 more > Caused by: org.apache.maven.profiles.activation.ProfileActivationException: > Cannot parse profiles.xml resource from directory: > /Users/sufie/chb/MySubscription/connector-api > at > org.apache.maven.project.DefaultMavenProjectBuilder.loadProjectExternalProfiles(DefaultMavenProjectBuilder.java:1556) > at > org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1192) > ... 18 more > Caused by: org.codehaus.plexus.util.xml.pull.XmlPullParserException: > Unrecognised tag: 'build' (position: START_TAG seen ...</activation>\n > <build>... @11:14) > at > org.apache.maven.profiles.io.xpp3.ProfilesXpp3Reader.parseProfile(ProfilesXpp3Reader.java:699) > at > org.apache.maven.profiles.io.xpp3.ProfilesXpp3Reader.parseProfilesRoot(ProfilesXpp3Reader.java:748) > at > org.apache.maven.profiles.io.xpp3.ProfilesXpp3Reader.read(ProfilesXpp3Reader.java:1227) > at > org.apache.maven.profiles.io.xpp3.ProfilesXpp3Reader.read(ProfilesXpp3Reader.java:1241) > at > org.apache.maven.profiles.DefaultMavenProfilesBuilder.buildProfiles(DefaultMavenProfilesBuilder.java:78) > at > org.apache.maven.project.DefaultMavenProjectBuilder.loadProjectExternalProfiles(DefaultMavenProjectBuilder.java:1528) > > > > > Any feedback or advise is highly appreciated. > Sufie > [email protected] >
