This is what the assembly plugin is for:

http://sonatype.com/book/assemblies.html
http://maven.apache.org/plugins/maven-assembly-plugin/

Eric

On 6/15/07, Alok, Niraj <[EMAIL PROTECTED]> wrote:

I need to write another plugin to do this because the sources here are
not java files, but database files which are stored in cvs.
The directory structure is src/main/database and we want all the files
inside the database folder to be put in the repository for use in
dependencies by other modules.

To check if there was a problem with the way I wrote the plugin, I also
included sources plugin in the pom and found that app-sources.jar is
getting generated with the same build number as app.jar, but app-db.jar
is getting installed with one number less. This is alteast pointing me
that there's something wrong in my plugin, but cant figure out exactly
what.

I am attaching the code here also for help.

Thanks!
Niraj

-----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

Reply via email to