Well, it's giving you the correct feedback in that error message. In fact,
there are two distinct types of profile in Maven. Those which are embedded
in the POM have access to many more configuration points, since they will
always travel with the POM (traversing a remote deployment, for example),
and therefore don't constitute a portability issue. On the other hand,
profiles which are declared in either the settings.xml or a project-specific
profiles.xml will not be distributed with a project's artifact when it's
deployed to the remote repository. Therefore, to keep these external
profiles from affecting the build configuration represented by the project's
POM, they are not allowed to do anything more than specify properties,
pluginRepositories, and repositories.
The short answer is that you cannot specify a <build/> section in an
external profile. If the book doesn't make mention of this, it should be
corrected.
HTH,
-john
On 8/2/06, Alexis Midon <[EMAIL PROTECTED]> wrote:
Hi all,
can some one tell me what's wrong with my Profiles.xml file?
I always get the following root error:
Caused by: org.codehaus.plexus.util.xml.pull.XmlPullParserException:
Unrecognised tag: 'build' (position: START_TAG seen ...</id>\r\n
<build>... @5: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
It drives me crazy!
I check the BetterBuild... Book and my file seems valid (see attchament or
below)
I only have a tiny doubt about the <profilesXml/> tag, it comes from the
book but doesn't appear on the website.
Quite confusing.
Thanks for your help
Alexis
<profilesXml>
<profiles>
<profile>
<id>idea</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-idea-plugin
</artifactId>
<configuration>
<jdkName>java version "1.4.2_08"</jdkName>
<dependenciesAsLibraries>true</dependenciesAsLibraries>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<activeProfiles>
<activeProfile>idea</activeProfile>
</activeProfiles>
</profilesXml>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]