File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Ant, Maven and Other Build Tools and the fly likes Maven newbie - installing jars Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Maven newbie - installing jars" Watch "Maven newbie - installing jars" New topic
Author

Maven newbie - installing jars

John Eric Hamacher
Ranch Hand

Joined: Apr 25, 2007
Posts: 230
Hello:

I have a real basic question. I have dependencies on jars which do not conform to the suggested naming scheme for jars (with a version number). I have tried install:install-file but this requires a version, which I do not have. I would just like to copy these jars into my repository manually and move on but I have to format <dependency> in pom.xml to accept whatever directory structure I specify. Incredibly, a web search has yielded nothing that works.

What is the simpliest way to specify these dependencies?

Thanks
eric
Yves Zoundi
Ranch Hand

Joined: Aug 31, 2008
Posts: 47
Hello John,

Add a dummy version to the jar file in the install:install-file goal and refer to your dummy version in your pom.xml


Author of VFSJFileChooser and XPontus XML Editor
Anthony Karta
Ranch Hand

Joined: Aug 09, 2004
Posts: 342
I don't intend to hijack this topic. but I have really a basic question.

I ran mvn install:install-file the first time and maven downloaded strange *.pom files.

I want to know what is maven doing here.

thanks all.
ak


c:\hibernate-distribution-3.3.1.GA>mvn install:install-file -DgroupId=org.hibernate -Dartifa
ctId=hibernate-testing -Dversion=3.3.1.GA -Dpackaging=jar -Dfile=hibernate-testing.jar
[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
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.2/maven-install-plugin-2.2.pom
2K downloaded
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-plugins/8/maven-plugins-8.pom
5K downloaded
Downloading: http://repo1.maven.org/maven2/org/apache/maven/maven-parent/5/maven-parent-5.pom
14K downloaded
Downloading: http://repo1.maven.org/maven2/org/apache/apache/3/apache-3.pom
3K downloaded
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.2/maven-install-plugin-2.2.jar
15K downloaded
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [install:install-file] (aggregator-style)
[INFO] ------------------------------------------------------------------------
Downloading: http://repo1.maven.org/maven2/org/apache/maven/maven-plugin-api/2.0.6/maven-plugin-api-2.0.6.pom
1K downloaded
Downloading: http://repo1.maven.org/maven2/org/apache/maven/maven/2.0.6/maven-2.0.6.pom
8K downloaded
Downloading: http://repo1.maven.org/maven2/org/apache/maven/maven-project/2.0.6/maven-project-2.0.6.pom
2K downloaded
Downloading: http://repo1.maven.org/maven2/org/apache/maven/maven-settings/2.0.6/maven-settings-2.0.6.pom
1K downloaded
Downloading: http://repo1.maven.org/maven2/org/apache/maven/maven-model/2.0.6/maven-model-2.0.6.pom
2K downloaded
Downloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-utils/1.4.1/plexus-utils-1.4.1.pom
1K downloaded
Downloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus/1.0.11/plexus-1.0.11.pom
8K downloaded
Downloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-container-default/1.0-alpha-9-stable-1/plexus-container-default-1.0-alpha-9-stab
le-1.pom
3K downloaded
Downloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-containers/1.0.3/plexus-containers-1.0.3.pom
492b downloaded
Downloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus/1.0.4/plexus-1.0.4.pom
5K downloaded
Downloading: http://repo1.maven.org/maven2/junit/junit/3.8.1/junit-3.8.1.pom
998b downloaded
Downloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-utils/1.0.4/plexus-utils-1.0.4.pom
6K downloaded
Downloading: http://repo1.maven.org/maven2/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.pom
3K downloaded
Downloading: http://repo1.maven.org/maven2/org/apache/maven/maven-profile/2.0.6/maven-profile-2.0.6.pom
1K downloaded
Downloading: http://repo1.maven.org/maven2/org/apache/maven/maven-artifact-manager/2.0.6/maven-artifact-manager-2.0.6.pom
2K downloaded
Downloading: http://repo1.maven.org/maven2/org/apache/maven/maven-repository-metadata/2.0.6/maven-repository-metadata-2.0.6.pom
1K downloaded
Downloading: http://repo1.maven.org/maven2/org/apache/maven/maven-artifact/2.0.6/maven-artifact-2.0.6.pom
1K downloaded
Downloading: http://repo1.maven.org/maven2/org/apache/maven/wagon/wagon-provider-api/1.0-beta-2/wagon-provider-api-1.0-beta-2.pom
680b downloaded
Downloading: http://repo1.maven.org/maven2/org/apache/maven/wagon/wagon/1.0-beta-2/wagon-1.0-beta-2.pom
5K downloaded
Downloading: http://repo1.maven.org/maven2/org/apache/maven/maven-parent/4/maven-parent-4.pom
9K downloaded

...
...
...
so on

[ October 20, 2008: Message edited by: Anthony Karta ]

SCJP 5
Yves Zoundi
Ranch Hand

Joined: Aug 31, 2008
Posts: 47
Hello Anthony,

Maven doesn't always have what it needs, on your hard drive, to perform some actions. When you install maven, it doesn't even have everything it needs to perform some "basic" tasks. When you run "a maven goal", Maven will look if some required libraries(for it to run) are already downloaded, if not, Maven has to fetch them.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Maven newbie - installing jars