I did not get any errors installing the jar.  For example, using one that 
should not be on the web repository:

mvn install:install-file -DgroupId=com.toedter -DartifactId=jcalendar         
-Dversion=1.3.2 -Dpackaging=jar 
-Dfile=/home/dingfelder/workspace/java.3rdparty/jars/jcalendar-1.3.2.jar
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'install'.
[INFO] 
----------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO]    task-segment: [install:install-file] (aggregator-style)
[INFO] 
----------------------------------------------------------------------------
[INFO] [install:install-file]
[INFO] Installing 
/home/dingfelder/workspace/java.3rdparty/jars/jcalendar-1.3.2.jar to 
/home/dingfelder/.m2/repository/com/toedter/jcalendar/1.3.2/jcalendar-1.3.2.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Fri Aug 31 22:03:05 NZST 2007
[INFO] Final Memory: 2M/4M
[INFO] ------------------------------------------------------------------------

the pom references:

    <dependency>
      <groupId>com.toedter</groupId>
      <artifactId>jcalendar</artifactId>
      <version>1.3.2</version>
    </dependency>


 
>>> adam hardy <[EMAIL PROTECTED]> 08/30/07 8:53 PM >>> 
I guess either the jar's not installed in the repo properly (did you get 
any error messages when installing it?), or your pom isn't referencing 
it as a dependency properly.

I'm using hsqldb and it's on the central maven repo, so I (& you) didn't 
have to install it locally at all.

I just checked 1.8.0.7 is there on the central repo.

It might be a dumb question, but are you sure you're online? Presumably 
maven is happy enough fetching its own dependencies every day?

Also, do you have other dependencies and do they work?

Andy Dingfelder wrote:
> OK, I asked there and this is what I was told:
> 
> I think what you want to do is install the dependency into your local  
> repository on both Windows and Linux and then remove the <scope> and  
> <systemPath> options from the pom.xml
> 
> Something like this:
> 
> http://maven.apache.org/plugins/maven-install-plugin/examples/ 
> specific-local-repo.html
> 
> Use the same group and artifact ID you have specified in your pom.xml  
> on the command line.
> 
> ___________________
> 
> So, I upgraded to 0.0.11 and followed his instructions, and my repository now 
> has my 3rd party jars.
> But, the maven plugin still does not seem to be using them.  
> 
> Isn't the build supposed to pull dependencies from the local repository if 
> they exist?
> 
> The log shows:
> 
> /31/07 2:21:34 AM NZST: [DEBUG] Trying repository central
> 8/31/07 2:21:34 AM NZST: [DEBUG] Unable to get resource 
> 'org.hsqldb:hsqldb:jar:1.8.0.7' from repository central 
> (http://repo1.maven.org/maven2) Unable to locate resource in repository
> 8/31/07 2:21:34 AM NZST: [DEBUG] Unable to download the artifact from any 
> repository
> 
> Try downloading the file manually from the project website.
> 
> Then, install it using the command: 
>     mvn install:install-file -DgroupId=org.hsqldb -DartifactId=hsqldb \
>         -Dversion=1.8.0.7 -Dpackaging=jar -Dfile=/path/to/file
> 
> Path to dependency: 
>       1) com.sirtrack:common_java:jar:0.0.1
>       2) org.hsqldb:hsqldb:jar:1.8.0.7
> 
> 
>   org.hsqldb:hsqldb:jar:1.8.0.7
> 
> from the specified remote repositories:
>   central (http://repo1.maven.org/maven2)
>  Unable to download the artifact from any repository
> 
> Try downloading the file manually from the project website.
> 
> Then, install it using the command: 
>     mvn install:install-file -DgroupId=org.hsqldb -DartifactId=hsqldb \
>         -Dversion=1.8.0.7 -Dpackaging=jar -Dfile=/path/to/file
> 
> Path to dependency: 
>       1) com.sirtrack:common_java:jar:0.0.1
>       2) org.hsqldb:hsqldb:jar:1.8.0.7
> 
> 
>   org.hsqldb:hsqldb:jar:1.8.0.7
> 
> from the specified remote repositories:
>   central (http://repo1.maven.org/maven2)
> 
> 
> 
> _______________________________
> 
> 
> 
>>>> adam hardy <[EMAIL PROTECTED]> 08/29/07 8:59 PM >>> 
> Andy,
> 
> you would seriously be better off asking this on the maven user list. I 
> don't know what the problem is, but I'm sure alot of people on the other 
> list would recognise it straight away.
> 
> 
> rgds
> Adam
> 
> Andy Dingfelder wrote:
>>  I tried doing this and am getting the following error (below)
>>
>> Perhaps the settings.xml file is not getting processed correctly?
>>
>> How can I debug if the environment variable I am setting is getting read in 
>> correctly?
>>
>> my settings.xml is /home/dingfelder/.m2/settings.xml and contains:
>>
>> <settings>
>>   <profiles>
>>     <profile>
>>       <id>default</id>
>>       <activation>
>>         <activeByDefault/>
>>       </activation>
>>       <properties>
>>         
>> <java-third-party.home>/home/dingfelder/workspace/java.3rdparty/jars/</java-third-party.home>
>>       </properties>
>>     </profile>
>>   </profiles>
>> </settings>
>>
>> the error is:
>>
>> [DEBUG] Building Maven user-level plugin registry from: 
>> '/home/dingfelder/.m2/plugin-registry.xml'
>> [DEBUG] Building Maven user-level plugin registry from: 
>> '/home/dingfelder/.m2/plugin-registry.xml'
>> [INFO] Scanning for projects...
>> [ERROR] reactor-execute : /home/dingfelder/workspace/java.common
>> Diagnosis: Failed to validate POM
>> FATAL ERROR: Error executing Maven for a project
>> [INFO] 
>> ------------------------------------------------------------------------
>> [ERROR] BUILD ERROR
>> [INFO] 
>> ------------------------------------------------------------------------
>> [INFO] Error building POM (may not be this project's POM).
>>
>> Project ID: com.sirtrack:common_java
>> POM Location: /home/dingfelder/workspace/java.common/pom.xml
>> Validation Messages:
>>
>>     [0]  For dependency Dependency {groupId=com.toedter, 
>> artifactId=jcalendar, version=1.2.2, type=jar}: system-scoped dependency 
>> must specify an absolute path systemPath.
>>
>> Reason: Failed to validate POM
>>
>> [INFO] 
>> ------------------------------------------------------------------------
>> [DEBUG] Trace Failed to validate POM
>> [INFO] 
>> ------------------------------------------------------------------------
>> [INFO] Total time: < 1 second
>> [INFO] Finished at: Wed Aug 29 21:55:23 NZST 2007
>> [INFO] Final Memory: 1M/4M
>> [INFO] 
>> ------------------------------------------------------------------------
>> java.lang.NullPointerException
>>      at 
>> org.apache.maven.DefaultMaven.logReactorSummary(DefaultMaven.java:611)
>>      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:130)
>>      at 
>> org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:531)
>>      at 
>> org.maven.ide.eclipse.embedder.Maven2Executor.main(Maven2Executor.java:82)
>>
>>  
>>>>> adam hardy <[EMAIL PROTECTED]> 08/28/07 8:44 PM >>> 
>> Andy Dingfelder wrote:
>>>  I have a pom that works on windows, but does not work if I use it on linux 
>>> because the paths are different, such as:
>>>
>>> <dependency>
>>>     <groupId>com.toedter</groupId>
>>>     <artifactId>jcalendar</artifactId>
>>>     <version>1.2.2</version>
>>>     <scope>system</scope>
>>>     <systemPath>
>>>             C:/projects/java.3rdParty/jars/jcalendar-1.3.2.jar
>>>     </systemPath>
>>> </dependency>
>>>
>>> is there any way to use an environment variable for the start of the path 
>>> or some other solution?
>>>
>>> on linux the path would be 
>>>
>>> <systemPath>
>>>     /home/myname/workspace/java.3rdParty/jars/jcalendar-1.3.2.jar
>>> </systemPath>
>> Andy,
>> check out what it says on the maven website:
>>
>> systemPath : is used only  if the the dependency scope  is system . 
>> Otherwise, the build will fail if this element is set. The path must be 
>> absolute, so it is recommended to use a property to specify the 
>> machine-specific path (more on properties  below), such as 
>> $java.home/lib . ........
>>
>>
>> http://maven.apache.org/pom.html#Properties


---------------------------------------------------------------------
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

Reply via email to