doh... that was silly of me not to notice the path spaces.  oops

I removed the repository location from the command line and the
settings.xml also, just to be clean about it.

ok, so running the command line install of a jar such as:
mvn -e install:install-file  
-Dfile=C:\projects\3rd_party\jars\comm-2.0.jar \ 
-DgroupId=javax.comm 
-DartifactId=javax_comm 
-Dversion=2.0 
-Dpackaging=jar 
-DpomFile=C:\projects\common_java\pom.xml

does add the jar and pom to the repository

So now it appears that the command line maven can add dependencies.

How can I get the eclipse plugin to use this dependency now though? 
(using "add dependency" shows only online jars not ones in the
repository)
Is there something I can add directly to the pom to force it to use the
local repository one?

I have successfully added local jars via the "system scope" dependency
tag in the pom, but my understanding is that this just uses the jar
itself rather than looking in the repository where the mvn install cmd
put it. 

Cheers,

Andy


>>> [EMAIL PROTECTED] 24/01/2007 12:29 p.m. >>>

  Clearly that "and" came from "Documents and Settings" folder name.

  I don't think you need to specify path to the local repository either

in settings.xml nor in the command line. Though if you do specify it in

the command line, you need to mask spaces in the path by placing it in

quites. One of those should work:

-DlocalRepositoryPath="<home>\.m2\repository"
"-DlocalRepositoryPath=<home>\.m2\repository"

  regards,
  Eugene


Andy Dingfelder wrote:
> Eugene,
>
> Thanks for the continuing pain.
>
> I did indeed try adding it into a settings.xml and doing it from the
> command line, 
>
> below is my settings.xml (I assume it goes in
> <home>\.m2\repository\settings.xml ?)
>
> It did do something (downloaded /maven-install-plugin-2.1.jar  and 2
> poms)
> but it failed after that.  maybe my command is wrong?
>
> ============================
> settings.xml
> ============================
>
> <settings xmlns="http://maven.apache.org/POM/4.0.0";
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
>                      
http://maven.apache.org/xsd/settings-1.0.0.xsd";>
>   <localRepository>C:/Documents and
> Settings/Landcare/DingfelderA/.m2/repository</localRepository>  
>   <interactiveMode/>
>   <usePluginRegistry>false</usePluginRegistry>
>   <offline>false</offline>
>   <pluginGroups/>
>   <servers/>
>   <mirrors/>
>   <proxies>
>     <proxy>
>       <id>myproxy</id>
>       <active>true</active>
>       <protocol>http</protocol>
>       <host>proxy.landcareresearch.co.nz</host>
>       <port>8080</port>
>       <username></username>
>       <password></password>
>       <nonProxyHosts>localhost|inet.sirtrack.com</nonProxyHosts>
>     </proxy>
>   </proxies>
>   <profiles/>
>   <activeProfiles/>
> </settings>
>
> ============================
> cmd
> ============================
>
> mvn install:install-file  -Dfile=c:\dev\jars\comm-2.0.jar
> -DgroupId=common_java -DartifactId=common_java -Dversion=0.0.1
> -Dpackaging=jar -DpomFile=C:\projects\common_java\pom.xml
> -DlocalRepositoryPath=<home>\.m2\repository
>
> ============================
> results
> ============================
>
> C:\WINDOWS>mvn install:install-file  -Dfile=c:\dev\jars\comm-2.0.jar
> -DgroupId=common_java -DartifactId=common_java -Dversion=0.0.1
> -Dpackaging=jar -DpomFile=C:\projects\common_java\pom.xml
> -DlocalRepositoryPath=<home>\.m2\repository
> [INFO] Scanning for projects...
> [INFO] Searching repository for plugin with prefix: 'install'.
> [INFO] org.apache.maven.plugins: checking for updates from central
> [INFO] org.codehaus.mojo: checking for updates from central
> [INFO] artifact org.apache.maven.plugins:maven-install-plugin:
checking
> for updates from central
> Downloading:
>
http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.1/maven-install-plugin-2.1.pom

>
> 981b downloaded
> Downloading:
>
http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-plugin-parent/2.0/maven-plugin-parent-2.0.pom

>
> 6K downloaded
> Downloading:
>
http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.1/maven-install-plugin-2.1.jar

>
> 8K downloaded
> [INFO]
>
------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO]
>
------------------------------------------------------------------------
> [INFO] Invalid task 'and': you must specify a valid lifecycle phase,
or
> a goal in the format plugin:goal or
> pluginGroupId:pluginArtifactId:pluginVersion:goal
> [INFO]
>
------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO]
>
------------------------------------------------------------------------
> [INFO] Total time: 8 seconds
> [INFO] Finished at: Wed Jan 24 12:12:20 NZDT 2007
> [INFO] Final Memory: 1M/4M
> [INFO]
>
------------------------------------------------------------------------
>
> not sure if it is of interest or not but the stack error was:
>
> [INFO] Trace
> org.apache.maven.BuildFailureException: Invalid task 'and': you must
> specify a valid lifecycle phase, or a goal in the format plugin:goal
or
> pluginGroupId:pluginArtifactId:pluginVersion:goal
>         at
>
org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(DefaultLifecycleExecutor.java:1510)
>         at
>
org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListByAggregationNeeds(DefaultLifecycleExecutor.java:381)
>         at
>
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:135)
>         at
> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at
> org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
>         at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at
> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at
org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at
>
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
>
>
>   
>>>> [EMAIL PROTECTED] 24/01/2007 11:53 a.m. >>>
>>>>         
>
>   I think all elements are optional. And there is no harm to try for

> your self if it will work or not. :-)
>
>   There is a template settings.xml (which is also default global 
> settings) in <maven install dir>\conf\settings.xml
>
>   So, minimal proxy config is something like that (you can drop user

> name and pass if your proxy don't requite auth).
>
> <settings>
>   <proxies>
>     <proxy>
>       <id>optional</id>
>       <active>true</active>
>       <protocol>http</protocol>
>       <username>proxyuser</username>
>       <password>proxypass</password>
>       <host>proxy.host.net</host>
>       <port>80</port>
>       <nonProxyHosts>local.net,some.host.com</nonProxyHosts>
>     </proxy>
>   </proxies>
>  
>
>
>
> Andy Dingfelder wrote:
>   
>> those look like exactly what I need.
>>
>> Do they go in the pom.xml ?  or the settings.xml?
>>
>> (I tried adding to the pom.xml and it had no effect so I assume it
>>     
> is
>   
>> settings.xml.)
>>
>> Since there was no default settings.xml file created by the eclipse
>> install process, 
>> I'm wondering how to proceed... Im wondering if there are some
>> manditory elements in a settings.xml
>>
>> Searching the newsgroups, I see a possible default... will this
>>     
> work?
>   
>> <settings xmlns="http://maven.apache.org/POM/4.0.0";
>>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>>   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
>>                      
>>     
> http://maven.apache.org/xsd/settings-1.0.0.xsd";>
>   
>>   <localRepository/>
>>   <interactiveMode/>
>>   <usePluginRegistry/>
>>   <offline/>
>>   <pluginGroups/>
>>   <servers/>
>>   <mirrors/>
>>   <proxies/>
>>   <profiles/>
>>   <activeProfiles/>
>> </settings>
>>
>>
>>
>>   
>>     
>>>>> [EMAIL PROTECTED] 24/01/2007 11:15 a.m. >>>
>>>>>         
>>>>>           
>>   http://maven.apache.org/settings.html#proxies 
>>
>>   
>>
>>     
>
http://maven.apache.org/plugins/maven-surefire-plugin/examples/skipping-test.html

>
>   
>>
>> Andy Dingfelder wrote:
>>   
>>     
>>> Looking at trying to skip the surefire test,
>>> Im not 100% sure how to do that.
>>>
>>> I assume you mean to go to the builders property page and edit the
>>> maven builder
>>> and then in the main tab add a parameter of maven.test.skip = true
>>>
>>> Is that what you meant?  or is there some other way to do it?
>>>
>>> I tried that and it had no effect.
>>>
>>> I am trying to run on the command line but ran into some issues.  
>>> For instance, I have no settings.xml and since I am normally
>>>       
> running
>   
>>> from the plugin, 
>>> I am not sure if I need to define one and what to put in it.
>>>
>>> Also, I am behind a proxy, and am not sure how to configure
command
>>> line maven to know about my proxy server.
>>>
>>>
>>>   
>>>     
>>>       
>>
>>     
>
---------------------------------------------------------------------
>   
>> To unsubscribe from this list please visit:
>>
>>     http://xircles.codehaus.org/manage_email 
>>
>>
>>     
>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>   
>> WARNING: This email and any attachments may be confidential and/or
>> privileged. They are intended for the addressee only and are not to
>>     
> be read,
>   
>> used, copied or disseminated by anyone receiving them in error.  If
>>     
> you are
>   
>> not the intended recipient, please notify the sender by return
email
>>     
> and
>   
>> delete this message and any attachments.
>>
>> The views expressed in this email are those of the sender and do
not
>> necessarily reflect the official views of Landcare Research.  
>>
>> SirTrack
>> http://www.sirtrack.com 
>>
>>     
>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>   
>>
>>
>>     
>
---------------------------------------------------------------------
>   
>> To unsubscribe from this list please visit:
>>
>>     http://xircles.codehaus.org/manage_email 
>>
>>   
>>     
>
>
>
---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>     http://xircles.codehaus.org/manage_email 
>
>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> WARNING: This email and any attachments may be confidential and/or
> privileged. They are intended for the addressee only and are not to
be read,
> used, copied or disseminated by anyone receiving them in error.  If
you are
> not the intended recipient, please notify the sender by return email
and
> delete this message and any attachments.
>
> The views expressed in this email are those of the sender and do not
> necessarily reflect the official views of Landcare Research.  
>
> SirTrack
> http://www.sirtrack.com 
>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>
>
>
---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>     http://xircles.codehaus.org/manage_email 
>
>   


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
WARNING: This email and any attachments may be confidential and/or
privileged. They are intended for the addressee only and are not to be read,
used, copied or disseminated by anyone receiving them in error.  If you are
not the intended recipient, please notify the sender by return email and
delete this message and any attachments.

The views expressed in this email are those of the sender and do not
necessarily reflect the official views of Landcare Research.  

SirTrack
http://www.sirtrack.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to