You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Kuehlert, Burkhard" <Bu...@wincor-nixdorf.com> on 2013/01/16 18:00:20 UTC

Upload arbitrary directories to maven repositories

Hi,

is it possible to upload arbitrary directories or filesets to maven repositories ? It seems to me, that artifacts have to be of type file and not directory.
Is that right?

Thanks
Burkhard Kuehlert

WINCOR NIXDORF International GmbH
Sitz der Gesellschaft: Paderborn
Registergericht Paderborn HRB 3507
Geschäftsführer: Eckard Heidloff (Vorsitzender), Dr. Jürgen Wunram
Vorsitzender des Aufsichtsrats: Karl-Heinz Stiller
Steuernummer: 339/5884/0020 - Ust-ID Nr.: DE812927716 - WEEE-Reg.-Nr. DE44477193

Diese E-Mail enthält vertrauliche Informationen.
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben,
informieren Sie bitte sofort den Absender und vernichten Sie diese E-Mail.
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist nicht gestattet.

This e-mail may contain confidential information.
If you are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail.
Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.

Re: Upload arbitrary directories to maven repositories

Posted by Barrie Treloar <ba...@gmail.com>.
And you might want to answer:

Why do you want to upload an arbitrary directory?
You are probably straying from the Maven path doing this.
You should be thinking in terms of artifacts generated by your projects.


On 17 January 2013 07:48, Ron Wheeler <rw...@artifact-software.com> wrote:
> Would you not include them in a jar or assembly and upload that?
>
> Ron
>
> On 16/01/2013 12:00 PM, Kuehlert, Burkhard wrote:
>>
>> Hi,
>>
>> is it possible to upload arbitrary directories or filesets to maven
>> repositories ? It seems to me, that artifacts have to be of type file and
>> not directory.
>> Is that right?
>>
>> Thanks
>> Burkhard Kuehlert
>>
>> WINCOR NIXDORF International GmbH
>> Sitz der Gesellschaft: Paderborn
>> Registergericht Paderborn HRB 3507
>> Geschäftsführer: Eckard Heidloff (Vorsitzender), Dr. Jürgen Wunram
>> Vorsitzender des Aufsichtsrats: Karl-Heinz Stiller
>> Steuernummer: 339/5884/0020 - Ust-ID Nr.: DE812927716 - WEEE-Reg.-Nr.
>> DE44477193
>>
>> Diese E-Mail enthält vertrauliche Informationen.
>> Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich
>> erhalten haben,
>> informieren Sie bitte sofort den Absender und vernichten Sie diese E-Mail.
>> Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist
>> nicht gestattet.
>>
>> This e-mail may contain confidential information.
>> If you are not the intended recipient (or have received this e-mail in
>> error)
>> please notify the sender immediately and destroy this e-mail.
>> Any unauthorised copying, disclosure or distribution of the material in
>> this e-mail is strictly forbidden.
>>
>
>
> --
> Ron Wheeler
> President
> Artifact Software Inc
> email: rwheeler@artifact-software.com
> skype: ronaldmwheeler
> phone: 866-970-2435, ext 102
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

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


Re: Upload arbitrary directories to maven repositories

Posted by Ron Wheeler <rw...@artifact-software.com>.
Would you not include them in a jar or assembly and upload that?

Ron
On 16/01/2013 12:00 PM, Kuehlert, Burkhard wrote:
> Hi,
>
> is it possible to upload arbitrary directories or filesets to maven repositories ? It seems to me, that artifacts have to be of type file and not directory.
> Is that right?
>
> Thanks
> Burkhard Kuehlert
>
> WINCOR NIXDORF International GmbH
> Sitz der Gesellschaft: Paderborn
> Registergericht Paderborn HRB 3507
> Geschäftsführer: Eckard Heidloff (Vorsitzender), Dr. Jürgen Wunram
> Vorsitzender des Aufsichtsrats: Karl-Heinz Stiller
> Steuernummer: 339/5884/0020 - Ust-ID Nr.: DE812927716 - WEEE-Reg.-Nr. DE44477193
>
> Diese E-Mail enthält vertrauliche Informationen.
> Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben,
> informieren Sie bitte sofort den Absender und vernichten Sie diese E-Mail.
> Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist nicht gestattet.
>
> This e-mail may contain confidential information.
> If you are not the intended recipient (or have received this e-mail in error)
> please notify the sender immediately and destroy this e-mail.
> Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
>


-- 
Ron Wheeler
President
Artifact Software Inc
email: rwheeler@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


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


Re: Upload arbitrary directories to maven repositories

Posted by burkhard kuehlert <Bu...@wincor-nixdorf.com>.
>>if your components are packaged as jar files
hm, jars are java archives so I feel better if components containing
sql-files and shell-scripts are compressed in rar files

>> ..to a source control system..
SCS and ant are used to create the deliveries shown in the picture, and
these deliveries are plugged together in a projectbuild. But this
projectbuild may take place anywhere in the world in any intranet. So svn or
git is no option for that. And we do not know what the end result will be,
eg application.xml may contain 20 or 80 ejb-jars

>>What is it about the file server that prompts you to want to change? 
the enduser can get a compressed fileserver structure or a compressed maven
repository. Both will work, only the access is different:

.m2\repository\com\org\BusinessComponent\xy0032_8a\BusinessComponent-xy0032_8a-assembly.rar
.m2\repository\com\org\UIComponent\xy0024_9a\UIComponent-xy0024_9a-assembly.rar

If someone says maven is not thought to be used in that way, he may be
right.
ant recommends not to use if-statements, but who cares, so why not

Burkhard



--
View this message in context: http://maven.40175.n5.nabble.com/Upload-arbitrary-directories-to-maven-repositories-tp5743526p5744376.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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


Re: Upload arbitrary directories to maven repositories

Posted by Ron Wheeler <rw...@artifact-software.com>.
Maven might be a good solution if your components are packaged as jar 
files and your build just pulled in the "right" jar files.

If you are pulling in source code and building, then your alternatives 
to a file server might range from a CMS or database to a source control 
system like svn or git or.....

What is it about the file server that prompts you to want to change?

Ron

On 23/01/2013 8:48 AM, Stephen Connolly wrote:
> Think of a Maven Repository as being for use by Maven and that delivery of
> components on a file server as "shipping" to production. Don't try and make
> the fileserver into a Maven repository.
>
>
> On 23 January 2013 12:06, burkhard kuehlert <
> Burkhard.Kuehlert@wincor-nixdorf.com> wrote:
>
>> Hi,
>>
>> yes, you are right, but that is what I wanted to say with my last post "I
>> have to get used to it".
>> I have realized that I have to change my ideas.
>>
>> And at long last I will answer your question. My company delivers an
>> extendible j2ee framework, and we started with it in 2002. We deliver all
>> our artifacts in so-called components on a file-server(see picture) and in
>> an ant-projectbuild the components are assembled to applications.
>>
>> <http://maven.40175.n5.nabble.com/file/n5744259/component.jpg>
>>
>> And I wanted to know, if a maven repository can be used instead of a
>> fileserver. And so I wanted to upload the same structure to a maven
>> repository. That is where I started with maven.
>>
>> Best regards
>> Burkhard
>>
>>
>>
>> --
>> View this message in context:
>> http://maven.40175.n5.nabble.com/Upload-arbitrary-directories-to-maven-repositories-tp5743526p5744259.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>


-- 
Ron Wheeler
President
Artifact Software Inc
email: rwheeler@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


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


Re: Upload arbitrary directories to maven repositories

Posted by Stephen Connolly <st...@gmail.com>.
Think of a Maven Repository as being for use by Maven and that delivery of
components on a file server as "shipping" to production. Don't try and make
the fileserver into a Maven repository.


On 23 January 2013 12:06, burkhard kuehlert <
Burkhard.Kuehlert@wincor-nixdorf.com> wrote:

> Hi,
>
> yes, you are right, but that is what I wanted to say with my last post "I
> have to get used to it".
> I have realized that I have to change my ideas.
>
> And at long last I will answer your question. My company delivers an
> extendible j2ee framework, and we started with it in 2002. We deliver all
> our artifacts in so-called components on a file-server(see picture) and in
> an ant-projectbuild the components are assembled to applications.
>
> <http://maven.40175.n5.nabble.com/file/n5744259/component.jpg>
>
> And I wanted to know, if a maven repository can be used instead of a
> fileserver. And so I wanted to upload the same structure to a maven
> repository. That is where I started with maven.
>
> Best regards
> Burkhard
>
>
>
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/Upload-arbitrary-directories-to-maven-repositories-tp5743526p5744259.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Upload arbitrary directories to maven repositories

Posted by burkhard kuehlert <Bu...@wincor-nixdorf.com>.
Hi,

yes, you are right, but that is what I wanted to say with my last post "I
have to get used to it".
I have realized that I have to change my ideas.

And at long last I will answer your question. My company delivers an
extendible j2ee framework, and we started with it in 2002. We deliver all
our artifacts in so-called components on a file-server(see picture) and in
an ant-projectbuild the components are assembled to applications.

<http://maven.40175.n5.nabble.com/file/n5744259/component.jpg> 

And I wanted to know, if a maven repository can be used instead of a
fileserver. And so I wanted to upload the same structure to a maven
repository. That is where I started with maven.

Best regards
Burkhard



--
View this message in context: http://maven.40175.n5.nabble.com/Upload-arbitrary-directories-to-maven-repositories-tp5743526p5744259.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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


Re: Upload arbitrary directories to maven repositories

Posted by Barrie Treloar <ba...@gmail.com>.
On 23 January 2013 02:17, burkhard kuehlert
<Bu...@wincor-nixdorf.com> wrote:
> Hi Barrie,
>
>>>This is assumed knowledge of how maven works
> I think that was my problem. I am coming from ant and I have no knowledge of
> how maven works.
> By default, maven is much more restrictive than ant, and I have to get used
> to it.

Again,
You have not answered the question:  What are you attempting to do?

It is very hard to second guess someone else.
You are probably only getting half the good advice you require because
we don't know what you are doing.

Maven is restrictive _for a reason_, the "Maven Way" is what is
considered best practice.
As you will find looking through other emails, when you stray from
this path you will fight Maven, and lose.
It is a lot easier to change your ideas and follow the Maven Way
instead and get on with the interesting stuff of writing code for your
product.

I highly recommend stopping long enough to read the freely available
books at http://maven.apache.org/articles.html

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


Re: Upload arbitrary directories to maven repositories

Posted by burkhard kuehlert <Bu...@wincor-nixdorf.com>.
Hi Barrie,

>>This is assumed knowledge of how maven works
I think that was my problem. I am coming from ant and I have no knowledge of
how maven works.
By default, maven is much more restrictive than ant, and I have to get used
to it.

After thinking about your mail and playing around with the assembly-plugin I
got what I wanted.
Though I had to modify my original aim to upload directories, and after
solving some problems with missing ids, wrong package type, plugin versions
and corresponding older samples from google

pom.xml
<packaging>pom</packaging>
..
<build>
  	<plugins><plugin>
  	<inherited>false</inherited>
	<artifactId>maven-assembly-plugin</artifactId>
	<configuration>
        <descriptors>
		<descriptor>assembly1.xml</descriptor>
		<descriptor>assembly2.xml</descriptor>
	</descriptors>
..
and
assembly2.xml
<id>two</id>
<formats><format>rar</format></formats>

Thanks for your help
Burkhard



--
View this message in context: http://maven.40175.n5.nabble.com/Upload-arbitrary-directories-to-maven-repositories-tp5743526p5744210.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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


Re: Upload arbitrary directories to maven repositories

Posted by Barrie Treloar <ba...@gmail.com>.
On 21 January 2013 22:58, burkhard kuehlert
<Bu...@wincor-nixdorf.com> wrote:
> Hi,
>
> thanks for your quick responses.
> I want to state some topics:
>
> 1. It could have been documented, that directories cannot be uploaded.

This is assumed knowledge of how maven works.
Maven Repositories hold single artifacts - a directory is not such a
thing (unless you wanted an empty directory)

The console output should clearly indicate that a directory assembly
will not be uploaded to the repository.
Think of the directory assembly as a shortcut for you so that you do
not need to un-archive the artifact before using it locally after a
build has completed.

> 4. The archiving of the directory could have be done under the hood like
> with javadoc

No,
There are other assembly types for this purpose.

> 5. I am not happy with large poms and if you add zip/unzip commands the pom
> grows.

I can find no suggestion of zip/unzip in this email thread.
What exactly is your problem?
As the pom size does not grow in any substantial way.  You write
everything for assembly in the assembly descriptor.

> 6. The suggestion of using the wagon-plugin may help. I will try it.
>
> But if I know that there is no other way, I can live with it.
> Many thanks again for your quick and valuable responses.

p.s. you have not answered my question:

Why do you want to upload an arbitrary directory?

You are being given without knowing what you are attempting to do and
there may be a simpler option.

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


Re: Upload arbitrary directories to maven repositories

Posted by burkhard kuehlert <Bu...@wincor-nixdorf.com>.
Hi,

thanks for your quick responses.
I want to state some topics:

1. It could have been documented, that directories cannot be uploaded.
2. Ivy supports directory uploads
3. I created an assembly of type directory, but I was not able to upload it
4. The archiving of the directory could have be done under the hood like
with javadoc
5. I am not happy with large poms and if you add zip/unzip commands the pom
grows.
6. The suggestion of using the wagon-plugin may help. I will try it.

But if I know that there is no other way, I can live with it.
Many thanks again for your quick and valuable responses.

Burkhard




--
View this message in context: http://maven.40175.n5.nabble.com/Upload-arbitrary-directories-to-maven-repositories-tp5743526p5744093.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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


Re: Upload arbitrary directories to maven repositories

Posted by "Lyons, Roy" <Ro...@cmegroup.com>.
Perhaps this is what you want?

http://mojo.codehaus.org/wagon-maven-plugin/merge-maven-repos-mojo.html



On 1/16/13 11:00 AM, "Kuehlert, Burkhard"
<Bu...@wincor-nixdorf.com> wrote:

>Hi,
>
>is it possible to upload arbitrary directories or filesets to maven
>repositories ? It seems to me, that artifacts have to be of type file and
>not directory.
>Is that right?
>
>Thanks
>Burkhard Kuehlert
>
>WINCOR NIXDORF International GmbH
>Sitz der Gesellschaft: Paderborn
>Registergericht Paderborn HRB 3507
>Geschäftsführer: Eckard Heidloff (Vorsitzender), Dr. Jürgen Wunram
>Vorsitzender des Aufsichtsrats: Karl-Heinz Stiller
>Steuernummer: 339/5884/0020 - Ust-ID Nr.: DE812927716 - WEEE-Reg.-Nr.
>DE44477193
>
>Diese E-Mail enthält vertrauliche Informationen.
>Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich
>erhalten haben,
>informieren Sie bitte sofort den Absender und vernichten Sie diese E-Mail.
>Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist
>nicht gestattet.
>
>This e-mail may contain confidential information.
>If you are not the intended recipient (or have received this e-mail in
>error)
>please notify the sender immediately and destroy this e-mail.
>Any unauthorised copying, disclosure or distribution of the material in
>this e-mail is strictly forbidden.


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