I had kind of the same problem this week with our custom release plugin. It
works similar to the Maven release plugin in that it adds the active profiles
to the forked Maven process. Actually, I had taken this code from the Release
plugin.
The Release plugin gets the profile as follows:
List profiles = project.getActiveProfiles();
If you have a profile that is only defined in a child module, it won't show up
in that list. I'm not sure if this is a bug. Is this method supposed to return
all active profiles in the reactor? If so, then there's a bug in the Release
plugin. Should I open a JIRA ticket?
If fixed our custom plugin by adding the active profiles of all reactor
projects:
Set<String> profileIds = new HashSet<String>();
for (MavenProject rp : reactorProjects) {
List<Profile> profiles = rp.getActiveProfiles();
for (Profile profile : profiles) {
profileIds.add(profile.getId());
}
}
So, in your case, it might help to add a dummy release profile to your parent
pom.
HTH,
Reinhard
-----Original Message-----
From: David C. Hicks [mailto:[email protected]]
Sent: Thursday, February 19, 2009 3:52 AM
To: Maven Users
Subject: Unable to attach assembly during release:perform.
Hi folks,
I've been working on this all day, and I'm no closer to getting it to
work than I was this morning. I hope someone has that little tid-bit of
information that I'm clearly missing.
I have a multi-module project that is distributed in the form of a ZIP
file. The assembly is built in a module of its own, with the
maven-assembly-plugin being bound to - originally the "package" phase,
but more recently the "deploy" phase. (I found in the
maven-release-plugin documentation that the release:perform goal
executes the deploy and site-deploy goals, only. Hence, the change to
the "deploy" phase.)
Additionally, the assembly plugin is located in a profile that I
activate when performing the release. This is meant to prevent this
step from executing when a developer does a build.
I can execute this over and over again and successfully build the ZIP
file in testing, but as soon as I execute using the release plugin's
release:perform goal, the building and deployment of the ZIP file is
skipped. I'm including the profile that contains my assembly plugin
configuration.
Thanks in advance,
Dave
PS - I added the specific version of assembly plugin because of another
problem I encountered for which I found a JIRA indicating that something
had broken in beta-2 that worked in beta-1 having to do with attachments.
<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-1</version>
<configuration>
<descriptor>assembly.xml</descriptor>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>deploy</phase>
<goals>
<goal>attached</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]