I mis-spoke, Reinhard. That fixes my problem!
I remembered, after the fact, that I had changed the assembly to run on
the "deploy" phase, yesterday. The assembly wasn't being created until
after the rest of the artifacts were already deployed. Changing that
back to the "package" phase made sure it was created prior to deployments.
Good call, again! I'd still call this a bug. :-)
Thanks,
Dave
David C. Hicks wrote:
Good catch, Reinhard! I took a brief look at the source code, but I
didn't have time to dig into it deeply.
I tried your suggestion and added a dummy profile to the parent
project. That got me half-way there. The ZIP file is actually built
now, but apparently it doesn't get attached to the result of the
module. Only the POM is added to the repository.
I'd call this a bug/defect. I guess I have two tasks, now.
1) Figure out how to get done what I need to get done.
2) Create a sample project and file it with a JIRA.
Thanks for the input,
Dave
Reinhard Nägele wrote:
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:dhi...@i-hicks.org] 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: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org