Discussion:
how to set path for repository and cache in .maven
Weining Hao
2004-10-05 08:30:23 UTC
Permalink
Hi,

We try to use Maven to build samples of AndroMDA. We have done the following
steps:
1. Download Maven and extract into C:\Programs\maven-1.0
2. Download AndroMDA and extract into
C:\Programs\andromda-bin-3.0M3-SNAPSHOT
3. Set JAVA_HOME; MAVEN_HOME; ANDROMDA_HOME; add the
C:\Programs\maven-1.0\bin into the path in the system
4. Under a sample of AndroMDA we run maven, \.maven\repository and
\.maven\cache are created in the path C:\Documents and Settings\wh, which is
our profile.

Because the size of our profile space is limited, We want to create the
repository and cache in other place in our computer.

5. To create the repository, We used this command line ==>
"C:\Programs\maven-1.0\bin>install_repo.bat
C:\NovaTec\MT\Workspace\.maven\repository", it works, the repository is
created in the right position, including lots *.jar files.
6. Under the sample run maven again


But \.maven\repository and \.maven\cache are still created in the path
C:\Documents and Settings\wh, and there is no change of new repository.

What's the reason? How can we really create our repository and cache under
another directory?

We would be grateful if you can answer our question. We are looking forward
to your feedback.

Best Regards,
Weining, Serafettin
Martijn Dashorst
2004-10-05 08:53:14 UTC
Permalink
Weining,

See the User Guide on :
http://maven.apache.org/reference/user-guide.html#Behavioural_Properties

Here you'll find maven.repo.local and maven.plugin.unpacked.dir doing
what you want. Put them in your build.properties in the

C:\Documents and Settings\wh

directory.


Martijn
Post by Weining Hao
Hi,
We try to use Maven to build samples of AndroMDA. We have done the following
1. Download Maven and extract into C:\Programs\maven-1.0
2. Download AndroMDA and extract into
C:\Programs\andromda-bin-3.0M3-SNAPSHOT
3. Set JAVA_HOME; MAVEN_HOME; ANDROMDA_HOME; add the
C:\Programs\maven-1.0\bin into the path in the system
4. Under a sample of AndroMDA we run maven, \.maven\repository and
\.maven\cache are created in the path C:\Documents and Settings\wh, which is
our profile.
Because the size of our profile space is limited, We want to create the
repository and cache in other place in our computer.
5. To create the repository, We used this command line ==>
"C:\Programs\maven-1.0\bin>install_repo.bat
C:\NovaTec\MT\Workspace\.maven\repository", it works, the repository is
created in the right position, including lots *.jar files.
6. Under the sample run maven again
But \.maven\repository and \.maven\cache are still created in the path
C:\Documents and Settings\wh, and there is no change of new repository.
What's the reason? How can we really create our repository and cache under
another directory?
We would be grateful if you can answer our question. We are looking forward
to your feedback.
Best Regards,
Weining, Serafettin
---------------------------------------------------------------------
Weining Hao
2004-10-05 11:05:38 UTC
Permalink
Hi Martijn,

Thank you very much ,but it seems that I still can not handle it by myself.

1 I created the file build.properties in the C:\Documents and Settings\wh
2 In the build.properties file, I set the two path as following:
maven.plugin.unpacked.dir=C:\NovaTec\MT\Workspace\.maven\cache
maven.repo.local= C:\NovaTec\MT\Workspace\.maven\repository
3 Then I went back into the sample directory
(C:\Programs\andromda-bin-3.0M3-SNAPSHOT\samples\online-store\ is the path
of my sample)to run maven, but
- only the directory .maven is created in the position C:\Documents and
Settings\wh\.maven, it is empty
- Errors display:


org.apache.maven.MavenException: Unable to extract plugin:
C:\Programs\maven-1.0\plugins\maven-nsis-plugin-1.1.jar
at
org.apache.maven.plugin.PluginManager.unpackPlugin(PluginManager.java:941)
.......(Omitted)
--- Nested Exception ---
java.io.FileNotFoundException:
C:\Programs\andromda-bin-3.0M3-SNAPSHOT\samples\online-store\C:NovaTecMTWork
space.mavencache\maven-nsis-plugin-1.1\META- INF\MANIFEST.MF (The filename,
directory name, or volume label syntax is incorrect)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
at org.apache.maven.util.Expand.extractFile(Expand.java:147)
at org.apache.maven.util.Expand.expandFile(Expand.java:85)
........ (Omitted)



It seems that I set the wrong path, but how can I set it?

Thanks again for your help and Look forward to your new feedback.

Regards,
Weining



-----Original Message-----
From: Martijn Dashorst [mailto:***@dashorst.dds.nl]
Sent: Dienstag, 5. Oktober 2004 10:53
To: Maven Users List
Subject: Re: how to set path for repository and cache in .maven


Weining,

See the User Guide on :
http://maven.apache.org/reference/user-guide.html#Behavioural_Properties

Here you'll find maven.repo.local and maven.plugin.unpacked.dir doing
what you want. Put them in your build.properties in the

C:\Documents and Settings\wh

directory.


Martijn
Post by Weining Hao
Hi,
We try to use Maven to build samples of AndroMDA. We have done the following
1. Download Maven and extract into C:\Programs\maven-1.0
2. Download AndroMDA and extract into
C:\Programs\andromda-bin-3.0M3-SNAPSHOT
3. Set JAVA_HOME; MAVEN_HOME; ANDROMDA_HOME; add the
C:\Programs\maven-1.0\bin into the path in the system
4. Under a sample of AndroMDA we run maven, \.maven\repository and
\.maven\cache are created in the path C:\Documents and Settings\wh, which is
our profile.
Because the size of our profile space is limited, We want to create the
repository and cache in other place in our computer.
5. To create the repository, We used this command line ==>
"C:\Programs\maven-1.0\bin>install_repo.bat
C:\NovaTec\MT\Workspace\.maven\repository", it works, the repository is
created in the right position, including lots *.jar files.
6. Under the sample run maven again
But \.maven\repository and \.maven\cache are still created in the path
C:\Documents and Settings\wh, and there is no change of new repository.
What's the reason? How can we really create our repository and cache under
another directory?
We would be grateful if you can answer our question. We are looking forward
to your feedback.
Best Regards,
Weining, Serafettin
---------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: users-***@maven.apache.org
For additional commands, e-mail: users-***@maven.apache.org
Martijn Dashorst
2004-10-05 11:31:15 UTC
Permalink
Weining,

You have become the victim of the infamous path seperator character:

Try replacing in your paths in the build.properties file the character
'\' with '/' (Unix style character), or with '\\' (double '\' character,
escaping the single '\').

Martijn
Post by Weining Hao
Hi Martijn,
Thank you very much ,but it seems that I still can not handle it by myself.
1 I created the file build.properties in the C:\Documents and Settings\wh
maven.plugin.unpacked.dir=C:\NovaTec\MT\Workspace\.maven\cache
maven.repo.local= C:\NovaTec\MT\Workspace\.maven\repository
3 Then I went back into the sample directory
(C:\Programs\andromda-bin-3.0M3-SNAPSHOT\samples\online-store\ is the path
of my sample)to run maven, but
- only the directory .maven is created in the position C:\Documents and
Settings\wh\.maven, it is empty
C:\Programs\maven-1.0\plugins\maven-nsis-plugin-1.1.jar
at
org.apache.maven.plugin.PluginManager.unpackPlugin(PluginManager.java:941)
.......(Omitted)
--- Nested Exception ---
C:\Programs\andromda-bin-3.0M3-SNAPSHOT\samples\online-store\C:NovaTecMTWork
space.mavencache\maven-nsis-plugin-1.1\META- INF\MANIFEST.MF (The filename,
directory name, or volume label syntax is incorrect)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
at org.apache.maven.util.Expand.extractFile(Expand.java:147)
at org.apache.maven.util.Expand.expandFile(Expand.java:85)
........ (Omitted)
It seems that I set the wrong path, but how can I set it?
Thanks again for your help and Look forward to your new feedback.
Regards,
Weining
-----Original Message-----
Sent: Dienstag, 5. Oktober 2004 10:53
To: Maven Users List
Subject: Re: how to set path for repository and cache in .maven
Weining,
http://maven.apache.org/reference/user-guide.html#Behavioural_Properties
Here you'll find maven.repo.local and maven.plugin.unpacked.dir doing
what you want. Put them in your build.properties in the
C:\Documents and Settings\wh
directory.
Martijn
Post by Weining Hao
Hi,
We try to use Maven to build samples of AndroMDA. We have done the
following
Post by Weining Hao
1. Download Maven and extract into C:\Programs\maven-1.0
2. Download AndroMDA and extract into
C:\Programs\andromda-bin-3.0M3-SNAPSHOT
3. Set JAVA_HOME; MAVEN_HOME; ANDROMDA_HOME; add the
C:\Programs\maven-1.0\bin into the path in the system
4. Under a sample of AndroMDA we run maven, \.maven\repository and
\.maven\cache are created in the path C:\Documents and Settings\wh, which
is
Post by Weining Hao
our profile.
Because the size of our profile space is limited, We want to create the
repository and cache in other place in our computer.
5. To create the repository, We used this command line ==>
"C:\Programs\maven-1.0\bin>install_repo.bat
C:\NovaTec\MT\Workspace\.maven\repository", it works, the repository is
created in the right position, including lots *.jar files.
6. Under the sample run maven again
But \.maven\repository and \.maven\cache are still created in the path
C:\Documents and Settings\wh, and there is no change of new repository.
What's the reason? How can we really create our repository and cache under
another directory?
We would be grateful if you can answer our question. We are looking forward
to your feedback.
Best Regards,
Weining, Serafettin
---------------------------------------------------------------------
---------------------------------------------------------------------
---------------------------------------------------------------------
f***@mpsa.com
2004-10-05 12:35:59 UTC
Permalink
Hi all,

I try to use the FTP Ant task in my maven.xml, but I can't make it work.
I've searched the mail archive, and I figured out that lots of people had
troubles with this task in Maven 1.0, but none found a solution regarding
this problem (at least, none gave a solution on the mailing list - a guy
just gave a hack and I couldn't even make it work).

So if someone has a solution that works, that would be really kind of him
to send it to the list :o)
Otherwise, shouldn't this problem be addressed quickly? (it seems that the
FTP task used to work in Maven previous builds)

Regards,
Fabrice.
Ben Anderson
2004-10-05 12:48:47 UTC
Permalink
see this thread:
http://marc.theaimsgroup.com/?l=turbine-maven-user&m=109570387625634&w=2
Note: you will have to manually download NetComponents.jar - which is hard to
find. I can't remember where I got it from. Don't ask me why you need this
jar as opposed to the current version of that project (commons-net).

I had this problem a few weeks ago... and got pretty frustrated when I couldn't
find the answer and almost abandoned maven. While this does seem to be a
problem, it is solvable and maven is worth it ;-)

-Ben
Post by f***@mpsa.com
Hi all,
I try to use the FTP Ant task in my maven.xml, but I can't make it work.
I've searched the mail archive, and I figured out that lots of people had
troubles with this task in Maven 1.0, but none found a solution regarding
this problem (at least, none gave a solution on the mailing list - a guy
just gave a hack and I couldn't even make it work).
So if someone has a solution that works, that would be really kind of him
to send it to the list :o)
Otherwise, shouldn't this problem be addressed quickly? (it seems that the
FTP task used to work in Maven previous builds)
Regards,
Fabrice.
---------------------------------------------------------------------
f***@mpsa.com
2004-10-05 13:20:23 UTC
Permalink
OK, I've found NetComponents here :
<http://www.savarese.org/oro/downloads/download/NetComponents-1.3.8.zip>
With the following code in maven.xml
<taskdef name="ftp"
classname="org.apache.tools.ant.taskdefs.optional.net.FTP"/>
and this one in the POM
<dependency>
<groupId>NetComponents</groupId>
<artifactId>NetComponents</artifactId>
<version>1.3.8</version>
<properties>
<classloader>root</classloader>
</properties>
</dependency>
it works fine.
Thanks Ben :o)

And yes, Maven is worth it! So I hope that soon, we won't need to do this
hack to get the FTP task work seamlessly in Maven :o)

Fabrice.




Ben Anderson
<***@ben
anderson.us> Pour
Maven Users List
05/10/2004 14:48 <***@maven.apache.org>
cc

Veuillez Objet
répondre à Re: Maven and FTP Ant task: what's
Maven Users List up??
<***@maven.apa
che.org>






see this thread:
http://marc.theaimsgroup.com/?l=turbine-maven-user&m=109570387625634&w=2
Note: you will have to manually download NetComponents.jar - which is hard
to
find. I can't remember where I got it from. Don't ask me why you need
this
jar as opposed to the current version of that project (commons-net).

I had this problem a few weeks ago... and got pretty frustrated when I
couldn't
find the answer and almost abandoned maven. While this does seem to be a
problem, it is solvable and maven is worth it ;-)

-Ben
Post by f***@mpsa.com
Hi all,
I try to use the FTP Ant task in my maven.xml, but I can't make it work.
I've searched the mail archive, and I figured out that lots of people had
troubles with this task in Maven 1.0, but none found a solution regarding
this problem (at least, none gave a solution on the mailing list - a guy
just gave a hack and I couldn't even make it work).
So if someone has a solution that works, that would be really kind of him
to send it to the list :o)
Otherwise, shouldn't this problem be addressed quickly? (it seems that the
FTP task used to work in Maven previous builds)
Regards,
Fabrice.
dan tran
2004-10-05 17:11:01 UTC
Permalink
any one has any luck with get ant:telnet task to work under maven?

-D
Post by f***@mpsa.com
<http://www.savarese.org/oro/downloads/download/NetComponents-1.3.8.zip>
With the following code in maven.xml
<taskdef name="ftp"
classname="org.apache.tools.ant.taskdefs.optional.net.FTP"/>
and this one in the POM
<dependency>
<groupId>NetComponents</groupId>
<artifactId>NetComponents</artifactId>
<version>1.3.8</version>
<properties>
<classloader>root</classloader>
</properties>
</dependency>
it works fine.
Thanks Ben :o)
And yes, Maven is worth it! So I hope that soon, we won't need to do this
hack to get the FTP task work seamlessly in Maven :o)
Fabrice.
Ben Anderson
anderson.us> Pour
Maven Users List
cc
Veuillez Objet
répondre à Re: Maven and FTP Ant task: what's
Maven Users List up??
che.org>
http://marc.theaimsgroup.com/?l=turbine-maven-user&m=109570387625634&w=2
Note: you will have to manually download NetComponents.jar - which is hard to
find. I can't remember where I got it from. Don't ask me why you need this
jar as opposed to the current version of that project (commons-net).
I had this problem a few weeks ago... and got pretty frustrated when I couldn't
find the answer and almost abandoned maven. While this does seem to be a
problem, it is solvable and maven is worth it ;-)
-Ben
Post by f***@mpsa.com
Hi all,
I try to use the FTP Ant task in my maven.xml, but I can't make it work.
I've searched the mail archive, and I figured out that lots of people had
troubles with this task in Maven 1.0, but none found a solution regarding
this problem (at least, none gave a solution on the mailing list - a guy
just gave a hack and I couldn't even make it work).
So if someone has a solution that works, that would be really kind of him
to send it to the list :o)
Otherwise, shouldn't this problem be addressed quickly? (it seems that
the
Post by f***@mpsa.com
FTP task used to work in Maven previous builds)
Regards,
Fabrice.
---------------------------------------------------------------------
Weining Hao
2004-10-05 13:50:16 UTC
Permalink
You are right;-) Thank you very much

-----Original Message-----
From: Martijn Dashorst [mailto:***@dashorst.dds.nl]
Sent: Dienstag, 5. Oktober 2004 13:31
To: Maven Users List
Subject: Re: 2nd question of RE: how to set path for repository and
cache in .maven


Weining,

You have become the victim of the infamous path seperator character:

Try replacing in your paths in the build.properties file the character
'\' with '/' (Unix style character), or with '\\' (double '\' character,
escaping the single '\').

Martijn
Post by Weining Hao
Hi Martijn,
Thank you very much ,but it seems that I still can not handle it by myself.
1 I created the file build.properties in the C:\Documents and Settings\wh
maven.plugin.unpacked.dir=C:\NovaTec\MT\Workspace\.maven\cache
maven.repo.local= C:\NovaTec\MT\Workspace\.maven\repository
3 Then I went back into the sample directory
(C:\Programs\andromda-bin-3.0M3-SNAPSHOT\samples\online-store\ is the path
of my sample)to run maven, but
- only the directory .maven is created in the position C:\Documents and
Settings\wh\.maven, it is empty
C:\Programs\maven-1.0\plugins\maven-nsis-plugin-1.1.jar
at
org.apache.maven.plugin.PluginManager.unpackPlugin(PluginManager.java:941)
.......(Omitted)
--- Nested Exception ---
C:\Programs\andromda-bin-3.0M3-SNAPSHOT\samples\online-store\C:NovaTecMTWor
k
Post by Weining Hao
space.mavencache\maven-nsis-plugin-1.1\META- INF\MANIFEST.MF (The filename,
directory name, or volume label syntax is incorrect)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
at org.apache.maven.util.Expand.extractFile(Expand.java:147)
at org.apache.maven.util.Expand.expandFile(Expand.java:85)
........ (Omitted)
It seems that I set the wrong path, but how can I set it?
Thanks again for your help and Look forward to your new feedback.
Regards,
Weining
-----Original Message-----
Sent: Dienstag, 5. Oktober 2004 10:53
To: Maven Users List
Subject: Re: how to set path for repository and cache in .maven
Weining,
http://maven.apache.org/reference/user-guide.html#Behavioural_Properties
Here you'll find maven.repo.local and maven.plugin.unpacked.dir doing
what you want. Put them in your build.properties in the
C:\Documents and Settings\wh
directory.
Martijn
Post by Weining Hao
Hi,
We try to use Maven to build samples of AndroMDA. We have done the
following
Post by Weining Hao
1. Download Maven and extract into C:\Programs\maven-1.0
2. Download AndroMDA and extract into
C:\Programs\andromda-bin-3.0M3-SNAPSHOT
3. Set JAVA_HOME; MAVEN_HOME; ANDROMDA_HOME; add the
C:\Programs\maven-1.0\bin into the path in the system
4. Under a sample of AndroMDA we run maven, \.maven\repository and
\.maven\cache are created in the path C:\Documents and Settings\wh, which
is
Post by Weining Hao
our profile.
Because the size of our profile space is limited, We want to create the
repository and cache in other place in our computer.
5. To create the repository, We used this command line ==>
"C:\Programs\maven-1.0\bin>install_repo.bat
C:\NovaTec\MT\Workspace\.maven\repository", it works, the repository is
created in the right position, including lots *.jar files.
6. Under the sample run maven again
But \.maven\repository and \.maven\cache are still created in the path
C:\Documents and Settings\wh, and there is no change of new repository.
What's the reason? How can we really create our repository and cache under
another directory?
We would be grateful if you can answer our question. We are looking forward
to your feedback.
Best Regards,
Weining, Serafettin
---------------------------------------------------------------------
---------------------------------------------------------------------
---------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: users-***@maven.apache.org
For additional commands, e-mail: users-***@maven.apache.org
Loading...