You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Christopher Gardner <ch...@gmail.com> on 2012/09/28 00:14:00 UTC

Exporting Individual Files with the SCM Plugin

I'd like to export a few jar files from an svn location.  These jar files
are developed by other developers at my company and have no maven support,
and probably never will.  I have the following entry in my pom:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-scm-plugin</artifactId>
  <version>1.8</version>
  <configuration>
    <username>myusername</username>
    <password>mypassword</password>
    <checkoutDirectory>target/checkout</checkoutDirectory>
    <connectionType>connection</connectionType>
    <connectionUrl>scm:svn:http://machine/svn/project</connectionUrl >
    <includes>foo.jar,bar.jar</includes>
  </configuration>
  <goals>
    <goal>export</goal>
  </goals>
</plugin>

It appears that the includes tag is ignored, as the entire "project"
directory is being exported. Any ideas as to what I'm doing wrong?

I'm using this version of maven: Apache Maven 3.0.4 (r1232337; 2012-01-17
03:44:56-0500)

Thanks in advance.

Re: Exporting Individual Files with the SCM Plugin

Posted by Olivier Lamy <ol...@apache.org>.
I agree it's a bit confusing as most of scm doesn't support
includes/excludes for checkout/export operations :-(
Maybe we could mimic that and deleting files/directories after the
whole checkout/export.
Again the reason of seeing that in the doc is because this field is in
AbstractScmMojo class but used only for commit operations.

2012/9/28 Christopher Gardner <ch...@gmail.com>:
> I am curious why scm export supports the includes and excludes tags.
> On Sep 27, 2012 6:32 PM, "Olivier Lamy" <ol...@apache.org> wrote:
>
>> 2012/9/28 Olivier Lamy <ol...@apache.org>:
>> > 2012/9/28 Christopher Gardner <ch...@gmail.com>:
>> >> I'd like to export a few jar files from an svn location.  These jar
>> files
>> >> are developed by other developers at my company and have no maven
>> support,
>> >> and probably never will.
>> > sad :-)
>> >> I have the following entry in my pom:
>> >>
>> >> <plugin>
>> >>   <groupId>org.apache.maven.plugins</groupId>
>> >>   <artifactId>maven-scm-plugin</artifactId>
>> >>   <version>1.8</version>
>> >>   <configuration>
>> >>     <username>myusername</username>
>> >>     <password>mypassword</password>
>> >>     <checkoutDirectory>target/checkout</checkoutDirectory>
>> >>     <connectionType>connection</connectionType>
>> >>     <connectionUrl>scm:svn:http://machine/svn/project</connectionUrl >
>> >>     <includes>foo.jar,bar.jar</includes>
>> >>   </configuration>
>> >>   <goals>
>> >>     <goal>export</goal>
>> >>   </goals>
>> >> </plugin>
>> >
>> > That won't work (in fact includes is in parent class so this parameter
>> > is listed in this mojo).
>> > Why because svn cli doesn't support that :-)
>>
>> Maybe we could do that tru svnkit with the svnjava implementation
>> (http://code.google.com/a/apache-extras.org/p/maven-scm-provider-svnjava/)
>> Just an idea as I didn't check the svnkit api
>>
>> > Maybe you can use a http get to the svn path ? the plugin
>> > http://mojo.codehaus.org/wagon-maven-plugin/ can help for that.
>> >
>> >
>> >>
>> >> It appears that the includes tag is ignored, as the entire "project"
>> >> directory is being exported. Any ideas as to what I'm doing wrong?
>> >>
>> >> I'm using this version of maven: Apache Maven 3.0.4 (r1232337;
>> 2012-01-17
>> >> 03:44:56-0500)
>> >>
>> >> Thanks in advance.
>> >
>> >
>> >
>> > --
>> > Olivier Lamy
>> > Talend: http://coders.talend.com
>> > http://twitter.com/olamy | http://linkedin.com/in/olamy
>>
>>
>>
>> --
>> Olivier Lamy
>> Talend: http://coders.talend.com
>> http://twitter.com/olamy | http://linkedin.com/in/olamy
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>



-- 
Olivier Lamy
Talend: http://coders.talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy

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


Re: Exporting Individual Files with the SCM Plugin

Posted by Christopher Gardner <ch...@gmail.com>.
I am curious why scm export supports the includes and excludes tags.
On Sep 27, 2012 6:32 PM, "Olivier Lamy" <ol...@apache.org> wrote:

> 2012/9/28 Olivier Lamy <ol...@apache.org>:
> > 2012/9/28 Christopher Gardner <ch...@gmail.com>:
> >> I'd like to export a few jar files from an svn location.  These jar
> files
> >> are developed by other developers at my company and have no maven
> support,
> >> and probably never will.
> > sad :-)
> >> I have the following entry in my pom:
> >>
> >> <plugin>
> >>   <groupId>org.apache.maven.plugins</groupId>
> >>   <artifactId>maven-scm-plugin</artifactId>
> >>   <version>1.8</version>
> >>   <configuration>
> >>     <username>myusername</username>
> >>     <password>mypassword</password>
> >>     <checkoutDirectory>target/checkout</checkoutDirectory>
> >>     <connectionType>connection</connectionType>
> >>     <connectionUrl>scm:svn:http://machine/svn/project</connectionUrl >
> >>     <includes>foo.jar,bar.jar</includes>
> >>   </configuration>
> >>   <goals>
> >>     <goal>export</goal>
> >>   </goals>
> >> </plugin>
> >
> > That won't work (in fact includes is in parent class so this parameter
> > is listed in this mojo).
> > Why because svn cli doesn't support that :-)
>
> Maybe we could do that tru svnkit with the svnjava implementation
> (http://code.google.com/a/apache-extras.org/p/maven-scm-provider-svnjava/)
> Just an idea as I didn't check the svnkit api
>
> > Maybe you can use a http get to the svn path ? the plugin
> > http://mojo.codehaus.org/wagon-maven-plugin/ can help for that.
> >
> >
> >>
> >> It appears that the includes tag is ignored, as the entire "project"
> >> directory is being exported. Any ideas as to what I'm doing wrong?
> >>
> >> I'm using this version of maven: Apache Maven 3.0.4 (r1232337;
> 2012-01-17
> >> 03:44:56-0500)
> >>
> >> Thanks in advance.
> >
> >
> >
> > --
> > Olivier Lamy
> > Talend: http://coders.talend.com
> > http://twitter.com/olamy | http://linkedin.com/in/olamy
>
>
>
> --
> Olivier Lamy
> Talend: http://coders.talend.com
> http://twitter.com/olamy | http://linkedin.com/in/olamy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Exporting Individual Files with the SCM Plugin

Posted by Olivier Lamy <ol...@apache.org>.
2012/9/28 Olivier Lamy <ol...@apache.org>:
> 2012/9/28 Christopher Gardner <ch...@gmail.com>:
>> I'd like to export a few jar files from an svn location.  These jar files
>> are developed by other developers at my company and have no maven support,
>> and probably never will.
> sad :-)
>> I have the following entry in my pom:
>>
>> <plugin>
>>   <groupId>org.apache.maven.plugins</groupId>
>>   <artifactId>maven-scm-plugin</artifactId>
>>   <version>1.8</version>
>>   <configuration>
>>     <username>myusername</username>
>>     <password>mypassword</password>
>>     <checkoutDirectory>target/checkout</checkoutDirectory>
>>     <connectionType>connection</connectionType>
>>     <connectionUrl>scm:svn:http://machine/svn/project</connectionUrl >
>>     <includes>foo.jar,bar.jar</includes>
>>   </configuration>
>>   <goals>
>>     <goal>export</goal>
>>   </goals>
>> </plugin>
>
> That won't work (in fact includes is in parent class so this parameter
> is listed in this mojo).
> Why because svn cli doesn't support that :-)

Maybe we could do that tru svnkit with the svnjava implementation
(http://code.google.com/a/apache-extras.org/p/maven-scm-provider-svnjava/)
Just an idea as I didn't check the svnkit api

> Maybe you can use a http get to the svn path ? the plugin
> http://mojo.codehaus.org/wagon-maven-plugin/ can help for that.
>
>
>>
>> It appears that the includes tag is ignored, as the entire "project"
>> directory is being exported. Any ideas as to what I'm doing wrong?
>>
>> I'm using this version of maven: Apache Maven 3.0.4 (r1232337; 2012-01-17
>> 03:44:56-0500)
>>
>> Thanks in advance.
>
>
>
> --
> Olivier Lamy
> Talend: http://coders.talend.com
> http://twitter.com/olamy | http://linkedin.com/in/olamy



-- 
Olivier Lamy
Talend: http://coders.talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy

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


Re: Exporting Individual Files with the SCM Plugin

Posted by Olivier Lamy <ol...@apache.org>.
2012/9/28 Christopher Gardner <ch...@gmail.com>:
> I'd like to export a few jar files from an svn location.  These jar files
> are developed by other developers at my company and have no maven support,
> and probably never will.
sad :-)
> I have the following entry in my pom:
>
> <plugin>
>   <groupId>org.apache.maven.plugins</groupId>
>   <artifactId>maven-scm-plugin</artifactId>
>   <version>1.8</version>
>   <configuration>
>     <username>myusername</username>
>     <password>mypassword</password>
>     <checkoutDirectory>target/checkout</checkoutDirectory>
>     <connectionType>connection</connectionType>
>     <connectionUrl>scm:svn:http://machine/svn/project</connectionUrl >
>     <includes>foo.jar,bar.jar</includes>
>   </configuration>
>   <goals>
>     <goal>export</goal>
>   </goals>
> </plugin>

That won't work (in fact includes is in parent class so this parameter
is listed in this mojo).
Why because svn cli doesn't support that :-)
Maybe you can use a http get to the svn path ? the plugin
http://mojo.codehaus.org/wagon-maven-plugin/ can help for that.


>
> It appears that the includes tag is ignored, as the entire "project"
> directory is being exported. Any ideas as to what I'm doing wrong?
>
> I'm using this version of maven: Apache Maven 3.0.4 (r1232337; 2012-01-17
> 03:44:56-0500)
>
> Thanks in advance.



-- 
Olivier Lamy
Talend: http://coders.talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy

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


Re: Exporting Individual Files with the SCM Plugin

Posted by Christopher Gardner <ch...@gmail.com>.
Philosophically I agree with your suggestion, but I am curious why I'm
having trouble with the includes tag. Shouldn't it just work?
On Sep 27, 2012 6:25 PM, "Graham Leggett" <mi...@sharp.fm> wrote:

> On 27 Sep 2012, at 23:14, Christopher Gardner <ch...@gmail.com>
> wrote:
>
> > I'd like to export a few jar files from an svn location.  These jar files
> > are developed by other developers at my company and have no maven
> support,
> > and probably never will.
>
> Import the jars into your own maven repository, keeping your own copy.
> Configure your build as you normally would.
>
> Trying to bend your maven pom into something ugly goes against maven,
> rather keep things as clean as possible.
>
> If they don't version their artifacts, version them for them, but make it
> crystal clear where the artifacts came from.
>
> You don't want to rely on someone else's system that may or may not be
> available at a future date, and suddenly you're panicking because your code
> no longer builds.
>
> Regards,
> Graham
> --
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Exporting Individual Files with the SCM Plugin

Posted by Graham Leggett <mi...@sharp.fm>.
On 27 Sep 2012, at 23:14, Christopher Gardner <ch...@gmail.com> wrote:

> I'd like to export a few jar files from an svn location.  These jar files
> are developed by other developers at my company and have no maven support,
> and probably never will.

Import the jars into your own maven repository, keeping your own copy. Configure your build as you normally would.

Trying to bend your maven pom into something ugly goes against maven, rather keep things as clean as possible.

If they don't version their artifacts, version them for them, but make it crystal clear where the artifacts came from.

You don't want to rely on someone else's system that may or may not be available at a future date, and suddenly you're panicking because your code no longer builds.

Regards,
Graham
--


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