You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Brett Porter <br...@apache.org> on 2011/06/23 10:41:40 UTC

Re: svn commit: r1137904 - in /maven/plugins/trunk/maven-deploy-plugin/src: it/3rd-party-jar-with-extras/ main/java/org/apache/maven/plugin/deploy/

On 21/06/2011, at 4:25 PM, stephenc@apache.org wrote:

> Author: stephenc
> Date: Tue Jun 21 08:25:23 2011
> New Revision: 1137904
> 
> URL: http://svn.apache.org/viewvc?rev=1137904&view=rev
> Log:
> [MDEPLOY-137] Allow deployment of multiple side artifacts at the same time via the CLI
> 
[snip]
> +    /**
> +     * A comma separated list of types for each of the extra side artifacts to deploy. If there is a mis-match in
> +     * the number of entries in {@link #files} or {@link #classifiers}, then an error will be raised.
> +     *
> +     * @parameter expression="${types}";
> +     */
> +    private String types;
> +
> +    /**
> +     * A comma separated list of classifiers for each of the extra side artifacts to deploy. If there is a mis-match in
> +     * the number of entries in {@link #files} or {@link #types}, then an error will be raised.
> +     *
> +     * @parameter expression="${classifiers}";
> +     */
> +    private String classifiers;
> +
> +    /**
> +     * A comma separated list of files for each of the extra side artifacts to deploy. If there is a mis-match in
> +     * the number of entries in {@link #types} or {@link #classifiers}, then an error will be raised.
> +     *
> +     * @parameter expression="${files}"
> +     */
> +    private String files;

Given these are so closely tied together - would it be better to use a list of <attachedArtifacts> each with <file> <type> and <classifier> ? I know it's more verbose, but probably less error prone.

Either way, I think these args should have something more on the front - attachedFiles or extraFiles, or similar.

- Brett

--
Brett Porter
brett@apache.org
http://brettporter.wordpress.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: svn commit: r1137904 - in /maven/plugins/trunk/maven-deploy-plugin/src: it/3rd-party-jar-with-extras/ main/java/org/apache/maven/plugin/deploy/

Posted by Stephen Connolly <st...@gmail.com>.
Or are you talking about when people are configuring within the pom

in which case I don't mind prefixing them with

forCliUseOnly

so that the configuration block would be

<configuration>
  <forCliUseOnlyFiles>...</forCliUSeOnlyFiles>
</configuration>

but it's still tied to the property "files" so that on the CLI I just type
-Dfiles=...

On 23 June 2011 10:15, Stephen Connolly <st...@gmail.com>wrote:

> This is for the CLI
>
> mvn deploy:deploy-file -Dpom=myart.pom -Dfile=myart.jar
> -Dsources=myart-sources.jar -Djavadoc=myart-javadoc.jar
> -Dfiles=myart-src.zip,myart-src.tar.gz,myart-bin.zip,myart-bin.tar.gz
> -Dtypes=zip,tar.gz,zip,tar,gz -Dclassifiers=src,src,bin,bin
>
> Do we really want to force people to type out a lot lot more
>
>
> On 23 June 2011 09:41, Brett Porter <br...@apache.org> wrote:
>
>> On 21/06/2011, at 4:25 PM, stephenc@apache.org wrote:
>>
>> > Author: stephenc
>> > Date: Tue Jun 21 08:25:23 2011
>> > New Revision: 1137904
>> >
>> > URL: http://svn.apache.org/viewvc?rev=1137904&view=rev
>> > Log:
>> > [MDEPLOY-137] Allow deployment of multiple side artifacts at the same
>> time via the CLI
>> >
>> [snip]
>> > +    /**
>> > +     * A comma separated list of types for each of the extra side
>> artifacts to deploy. If there is a mis-match in
>> > +     * the number of entries in {@link #files} or {@link #classifiers},
>> then an error will be raised.
>> > +     *
>> > +     * @parameter expression="${types}";
>> > +     */
>> > +    private String types;
>> > +
>> > +    /**
>> > +     * A comma separated list of classifiers for each of the extra side
>> artifacts to deploy. If there is a mis-match in
>> > +     * the number of entries in {@link #files} or {@link #types}, then
>> an error will be raised.
>> > +     *
>> > +     * @parameter expression="${classifiers}";
>> > +     */
>> > +    private String classifiers;
>> > +
>> > +    /**
>> > +     * A comma separated list of files for each of the extra side
>> artifacts to deploy. If there is a mis-match in
>> > +     * the number of entries in {@link #types} or {@link #classifiers},
>> then an error will be raised.
>> > +     *
>> > +     * @parameter expression="${files}"
>> > +     */
>> > +    private String files;
>>
>> Given these are so closely tied together - would it be better to use a
>> list of <attachedArtifacts> each with <file> <type> and <classifier> ? I
>> know it's more verbose, but probably less error prone.
>>
>> Either way, I think these args should have something more on the front -
>> attachedFiles or extraFiles, or similar.
>>
>> - Brett
>>
>> --
>> Brett Porter
>> brett@apache.org
>> http://brettporter.wordpress.com/
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>>
>

Re: svn commit: r1137904 - in /maven/plugins/trunk/maven-deploy-plugin/src: it/3rd-party-jar-with-extras/ main/java/org/apache/maven/plugin/deploy/

Posted by Stephen Connolly <st...@gmail.com>.
On 23 June 2011 10:47, Stephen Connolly <st...@gmail.com>wrote:

> the only really safe separators I see are , ; / and \
>
>
And they're not 100% safe anyway

Otherwise xargs wouldn't need that \0 terminator mode

Re: svn commit: r1137904 - in /maven/plugins/trunk/maven-deploy-plugin/src: it/3rd-party-jar-with-extras/ main/java/org/apache/maven/plugin/deploy/

Posted by Stephen Connolly <st...@gmail.com>.
Can you file a jira for that and assign it to me... I'll think about how to
tweak that for the single property case...

inferring file type is tricky... e.g. .tar.gz

and you really need two clear separators or else you end up with something
like

; as the item sep

filename,type/classifier

e.g.

-DextraFiles=foo-bin.tgz,tar.gz/bin;foo-src.tgz,tar.gz/src

could put the classifier up front

-DextraFiles=src=foo-src.tgz,tar.gz;bin=foo-bin.tar.gz,tar.gz;

could put the classifier in []'s

-DextraFiles=[src]foo-src.tgz,tar.gz;[bin]foo-bin.tgz,tar.gz

but [ is a valid file character on some OSes

the only really safe separators I see are , ; / and \



On 23 June 2011 10:25, Brett Porter <br...@apache.org> wrote:

>
> On 23/06/2011, at 5:15 PM, Stephen Connolly wrote:
>
> > This is for the CLI
> >
> > mvn deploy:deploy-file -Dpom=myart.pom -Dfile=myart.jar
> > -Dsources=myart-sources.jar -Djavadoc=myart-javadoc.jar
> > -Dfiles=myart-src.zip,myart-src.tar.gz,myart-bin.zip,myart-bin.tar.gz
> > -Dtypes=zip,tar.gz,zip,tar,gz -Dclassifiers=src,src,bin,bin
>
> Sorry, my mistake in that I didn't realise it was deploy:deploy-file.
>
> I would really rather specify them in sequence together somehow, maybe:
> -Dattach=myart-src.zip,zip,src;myart-src.tar.gz,tar.gz,src;myart-bin.zip,zip,bin;myart-bin.tar.gz,tar.gz,bin
>
> Then perhaps there are ways to make type/classifier optional by deriving
> them from the filename by default?
>
> - Brett
>
> --
> Brett Porter
> brett@apache.org
> http://brettporter.wordpress.com/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Re: svn commit: r1137904 - in /maven/plugins/trunk/maven-deploy-plugin/src: it/3rd-party-jar-with-extras/ main/java/org/apache/maven/plugin/deploy/

Posted by Brett Porter <br...@apache.org>.
On 23/06/2011, at 5:15 PM, Stephen Connolly wrote:

> This is for the CLI
> 
> mvn deploy:deploy-file -Dpom=myart.pom -Dfile=myart.jar
> -Dsources=myart-sources.jar -Djavadoc=myart-javadoc.jar
> -Dfiles=myart-src.zip,myart-src.tar.gz,myart-bin.zip,myart-bin.tar.gz
> -Dtypes=zip,tar.gz,zip,tar,gz -Dclassifiers=src,src,bin,bin

Sorry, my mistake in that I didn't realise it was deploy:deploy-file.

I would really rather specify them in sequence together somehow, maybe: -Dattach=myart-src.zip,zip,src;myart-src.tar.gz,tar.gz,src;myart-bin.zip,zip,bin;myart-bin.tar.gz,tar.gz,bin

Then perhaps there are ways to make type/classifier optional by deriving them from the filename by default?

- Brett

--
Brett Porter
brett@apache.org
http://brettporter.wordpress.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: svn commit: r1137904 - in /maven/plugins/trunk/maven-deploy-plugin/src: it/3rd-party-jar-with-extras/ main/java/org/apache/maven/plugin/deploy/

Posted by Stephen Connolly <st...@gmail.com>.
This is for the CLI

mvn deploy:deploy-file -Dpom=myart.pom -Dfile=myart.jar
-Dsources=myart-sources.jar -Djavadoc=myart-javadoc.jar
-Dfiles=myart-src.zip,myart-src.tar.gz,myart-bin.zip,myart-bin.tar.gz
-Dtypes=zip,tar.gz,zip,tar,gz -Dclassifiers=src,src,bin,bin

Do we really want to force people to type out a lot lot more

On 23 June 2011 09:41, Brett Porter <br...@apache.org> wrote:

> On 21/06/2011, at 4:25 PM, stephenc@apache.org wrote:
>
> > Author: stephenc
> > Date: Tue Jun 21 08:25:23 2011
> > New Revision: 1137904
> >
> > URL: http://svn.apache.org/viewvc?rev=1137904&view=rev
> > Log:
> > [MDEPLOY-137] Allow deployment of multiple side artifacts at the same
> time via the CLI
> >
> [snip]
> > +    /**
> > +     * A comma separated list of types for each of the extra side
> artifacts to deploy. If there is a mis-match in
> > +     * the number of entries in {@link #files} or {@link #classifiers},
> then an error will be raised.
> > +     *
> > +     * @parameter expression="${types}";
> > +     */
> > +    private String types;
> > +
> > +    /**
> > +     * A comma separated list of classifiers for each of the extra side
> artifacts to deploy. If there is a mis-match in
> > +     * the number of entries in {@link #files} or {@link #types}, then
> an error will be raised.
> > +     *
> > +     * @parameter expression="${classifiers}";
> > +     */
> > +    private String classifiers;
> > +
> > +    /**
> > +     * A comma separated list of files for each of the extra side
> artifacts to deploy. If there is a mis-match in
> > +     * the number of entries in {@link #types} or {@link #classifiers},
> then an error will be raised.
> > +     *
> > +     * @parameter expression="${files}"
> > +     */
> > +    private String files;
>
> Given these are so closely tied together - would it be better to use a list
> of <attachedArtifacts> each with <file> <type> and <classifier> ? I know
> it's more verbose, but probably less error prone.
>
> Either way, I think these args should have something more on the front -
> attachedFiles or extraFiles, or similar.
>
> - Brett
>
> --
> Brett Porter
> brett@apache.org
> http://brettporter.wordpress.com/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>