When you create an assembly, executing the assembly:attach within your pom, running the "mvn install" phase will install both the normal artifact (jar) as well as the assembled artifact.
Eric On 6/20/07, Alok, Niraj <[EMAIL PROTECTED]> wrote:
Probably I am asking a very specific question.. On general terms, when I do mvn install, or mvn assembly, and out of that command, get 2 jar files created, how do I ensure that they run within the same install step ? (I don't want to run separate install commands for each jar file that got created) Its looking like a lifecycle question but am not able to find anything on the web. -----Original Message----- From: Alok, Niraj Sent: Wednesday, June 20, 2007 1:00 PM To: 'Maven Users List' Subject: RE: 0-Snapshot numbering for classifiers I took a look at the maven assembly plugin, but it just creates the assembly and doesn't deploy them into the repository. How can I ensure that the assembly gets installed/deployed into the local/remote repository?? Thanks, Niraj -----Original Message----- From: Alok, Niraj Sent: Tuesday, June 19, 2007 10:07 PM To: 'Maven Users List' Subject: RE: 0-Snapshot numbering for classifiers After close inspection between maven-sources-plugin and my custom plugin, I notice some differences finally J The source plugin just creates a jar file. During mvn install, the source jar gets installed to the repository along with the app jar in the same execution. The custom plugin creates a jar file but it doesn't get picked up by the install phase even when the plugin says @phase install. The question now boils down to is how to ensure that the jar created from the custom plugin also gets picked up by the default mvn install? Thanks for the pointers till now ! Niraj -----Original Message----- From: Alok, Niraj Sent: Tuesday, June 19, 2007 5:33 PM To: 'Maven Users List' Subject: RE: 0-Snapshot numbering for classifiers Im trying to do through code, but the numbering of the jar changes for snapshot versions, making them unavailable for download. Is there some specific piece of code that is required to attach a classifier jar to the same snapshot version as the app jar ?? I tried the code from maven-source-plugin, but there it is not deploying the jar explicitly to the repository but I am forced to do in in the code to deploy to repository which is probably making all the difference... -----Original Message----- From: Eric Redmond [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 19, 2007 1:46 AM To: Maven Users List Subject: Re: 0-Snapshot numbering for classifiers Sure, I understand the desire to write code rather than learn a specification like assembly - however, your ability to find support for a custom plugin is going to be drastically more difficult than finding support for a core plugin. Just a suggestion, take care; Eric On 6/18/07, Alok, Niraj <[EMAIL PROTECTED]> wrote: > > I am more comfortable writing a specific plugin to do this because we > want to introduce custom tags in the pom and assembly wouldn't allow us > to do. > If it can be done through code, it would be perfect ! > > > -----Original Message----- > From: Eric Redmond [mailto:[EMAIL PROTECTED] > Sent: Saturday, June 16, 2007 12:10 AM > To: Maven Users List > Subject: Re: 0-Snapshot numbering for classifiers > > Why are you writing code to do this? You should be installing the > sources > via the source plugin: > > mvn source:jar > > Or assembly plugin: > > http://maven.apache.org/plugins/maven-assembly-plugin/usage.html > http://maven.apache.org/plugins/maven-assembly-plugin/descriptor-refs.ht > ml > > Eric > > On 6/15/07, niraj <[EMAIL PROTECTED]> wrote: > > > > > > To be more specific, I am installing the app.jar through normal mvn > deploy > > and the sources.jar through a custom pojo, as its not sources, but > some > > other project files, and the code for that is: > > > > Artifact artifact = > > m_artifactFactory.createArtifactWithClassifier(m_groupId, > > m_artifactId, m_version, "jar", jarType); > > > > try { > > deployer.deploy(file, artifact, > > > m_project.getDistributionManagementArtifactRepository(), > > m_localRepository); > > } catch (ArtifactDeploymentException e) { > > throw new MojoExecutionException(e.getMessage(), e); > > } > > > > While downloading, I am just adding the classifier element, jarType in > the > > dependency tag. > > It works for versioned jars, not for snapshots. I am using mvn 2. > > -- > > View this message in context: > > > http://www.nabble.com/0-Snapshot-numbering-for-classifiers-tf3927571s177 > .html#a11138790 > > Sent from the Maven - Users mailing list archive at Nabble.com. > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > Eric Redmond > http://www.sonatype.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Eric Redmond http://www.sonatype.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Eric Redmond http://www.sonatype.com