jar « Development « Maven/Ant Q&A

Home
Maven/Ant Q&A
1.Ant
2.artifact
3.dependency
4.deploy
5.Development
6.eclipse
7.glassfish
8.hudson
9.integration
10.jetty
11.junit
12.m2eclipse
13.module
14.netbeans
15.package
16.plugin
17.POM
18.repository
19.svn
Maven/Ant Q&A » Development » jar 

1. Maven: How to include jars, which are not available in reps into a J2EE project?    stackoverflow.com

in my J2EE project I've a couple of dependencies, which are not available in any Maven repository, because they're proprietary libraries. These libraries need to be available at runtime, so that ...

2. Is it possible to rename a maven jar-with-dependencies?    stackoverflow.com

I'm currently using the jar-with-dependencies assembly to create such a jar. However, the name of my jar is a bit long. Since this jar is being used by RPG ...

3. Maven - built jar using maven-assembly-plug in not always deployable    stackoverflow.com

I can build a deployable jar just fine on my local machine, but when trying to use jar built off our server, even if I explicitly invoke the command by hand, ...

4. Maven Default Separator    stackoverflow.com

In a pom.xml, if we are trying to compile and create a JAR, the name will be taken as

<artifactId>-<version>.jar
Is there a property or setting which can change the default separator ...

5. How to find out what jar file provides a class during runtime using maven?    stackoverflow.com

I run my application using mvn jetty:run At compile time everything is fine, my row

  Tidy tidier = new Tidy();
    tidier.setInputEncoding("UTF-8");
compiles fine and the classpath shows ...

6. upload jar to respository    stackoverflow.com

I have a jar files that cannot be found on maven2 repository. i interested to add the jar so i can just include extra tag in my pom.xml file and ...

7. Building a runnable jar with maven 2    stackoverflow.com

I'm relatively new to the maven mantra, but I'm trying to build a command-line runnable jar with maven. I've setup my dependencies, but when I run mvn install and attempt to ...

8. maven2: how do I get/set the location for the local .jar cache?    stackoverflow.com

I'm trying to get the hibernate-sqlite project to work. I downloaded it and can run

mvn eclipse:clean
and
mvn eclipse:eclipse
like the instructions say. And I can import the project into Eclipse. ...

9. Maven release JAR    stackoverflow.com

How can i make a project jar release and maven repository strucuture(md5hash,distribution pom,etc) to put this in my own repository? Maven have a plugin to do it? Note, i need to ...

10. How to stop Maven renaming installed jars    stackoverflow.com

I am installing to Maven repository our internal files using mvn install:install command. All Jars installed in such way have version name added automatically as a suffix. Since we have many ...

11. Maven best practice for generating multiple jars with different/filtered classes?    stackoverflow.com

I developed a Java utility library (similarly to Apache Commons) that I use in various projects. Additionally to fat clients I also use it for mobile clients (PDA with J9 Foundation ...

12. Maven: unable to install 3rd party jar    stackoverflow.com

trying to install a 3rd party jar into my repository (alfresco-repository.jar). I'm using the following command:

mvn install:install-file -DgroupId=alfresco -DartifactId=alfresco -Dversion=3.1 -Dpackaging=jar "-Dfile=C:/Users/xxx/Development/WIP/Alfresco/common/jars/alfresco/3.1/lib/alfresco-repository-3.1.jar" -DgeneratePom=true -e
and I'm getting the following exception (-e used ...

13. How to Exclude poperties file from jar file?    stackoverflow.com

I have a java application for exaple see below.

myProject
  |
  |----src
  |     |
  |     |--main
  |   ...

14. How to publish multiple jar files to maven on a clean install    stackoverflow.com

I have a used the maven assembly plugin to create multiple jar from one jar now the problem is that I have to publish these jar to the local repo, ...

15. Use maven + yguard    stackoverflow.com

Has anybody used maven and yguard for obfuscating jar files?How to do so?

16. Maven. What to do with "homeless" jars?    stackoverflow.com

I have some proprietary.jar that I need to include in my project, but I don't wish to install it to the local repository. What I did initially was to put the jar ...

17. Are maven jars safe?    stackoverflow.com

How can I convince my corp employer, than jars from the Maven repositories are safe for use? I've conducted a count of jars on my local repo and it came back ...

18. Using IDEA with maven2, how to add a non-maven .jar?    stackoverflow.com

I have a .jar that I want included in my IDEA web application project that is using maven2 (pom.xml). How can I add a .jar to my project that isn't using maven? ...

19. Jar Signing Strategy in Maven Projects    stackoverflow.com

We have several maven projects, which are built on the build server. In some cases we want to sign our deliverables. We use Maven Jarsigner Plugin to do that. We ...

20. way to merge jars in maven?    stackoverflow.com

I have a maven project which uses the shade plugin to create a jar from several projects. In addition it is possible with this plugin to create a source jar from these ...

21. Delivering a single jar with a Maven project    stackoverflow.com

I want to deliver a single .jar file to my clients, but my project is currently built with Maven, and I have several modules that generate a single .jar each. I know ...

22. Maven "shaded" JAR is prefixed with "original" in the file name    stackoverflow.com

I'm using the "shade" Maven2 plugin to build a monolithic JAR with all Java dependencies bundled together. The relevant section in pom.xml is pretty straightforward:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
  ...

23. pack stuff other than target/classes with maven jar    stackoverflow.com

I am using maven jar plugin to package the jar file. But it looks like maven jar plugin just only pack the stuff that stay inside target/classes. I am also want ...

24. disable the execution: default-jar    stackoverflow.com

i am using maven assembly plugin to pack a jar file. But when i run mvn package, maven always trigger the [jar:jar {execution: default-jar}] to create a default jar file. So i ...

25. Maven2: use ${basedir} in jar path    stackoverflow.com

I am using an external, proprietary jar in my project. When I hard-code the path as follows in my pom.xml, it works fine:

<dependency>
  <groupId>com.foo.bar</groupId>
  <artifactId>bar</artifactId>
  <version>5.2</version>
  ...

26. Transfer Jar & Wars in one single remote server folder using Maven    stackoverflow.com

I am in the process of conversion of an existing project into Maven & their build and release process. My structure is like this ParentProj -Child1 -Child2 -ChildWeb3 -ChildWeb4 I am not sure what the maven best practices ...

27. How can I add a specific jar only in a specific folder with Maven?    stackoverflow.com

i have a maven project using the maven soapui plugin. Unfortunately this one in my case need an external jar for jdbc for
some groovy scripts. And according to their ...

28. In maven how can I include non-java src files in the same place in the output jar?    stackoverflow.com

I received a source code bundle. Inside the src directory tree there are some properties files(.properties) which I want to keep in the output jar in the same place. e.g: I ...

29. Does exists some way to avoid duplicated JARs with distinct groupId in maven without expliciting excluding the duplicates?    stackoverflow.com

I have a maven build which generates some duplicated JARs in classpath. Here are some examples:

groupId: javax.xml.stream
artifactId: stax
version: 1.0-2

groupId: stax
artifactId: stax
version: 1.0.1

groupId: jboss
artifactId: javassist
version: 3.7.0 GA

groupId: javassist
artifactId: javassist
version: 3.9.0 GA

These JARs are ...

30. How can I include a folder in the jar produced by Maven (not the content of the folder, the actual folder)    stackoverflow.com

I'm having some difficulty including a directory into the jar maven is creating. I need the actual directory in the jar, not just the files in it. By using:

<resources>
 <resource>
 ...

31. Maven Producing Empty JAR    stackoverflow.com

I have the following pom file:

<build>
    <defaultGoal>package</defaultGoal>
    <sourceDirectory>src/web</sourceDirectory>

    <plugins>
        <plugin>
      ...

32. Maven project that doesn't create a jar    stackoverflow.com

I want to make a Maven meta-project; it won't contain any code, just a pom.xml. The purpose of the project is to have a place where I can declare some dependencies, ...

33. Maven: Downloading a jar with unconventional name    stackoverflow.com

I am trying to download http://mvnrepository.com/artifact/net.sf.json-lib/json-lib/2.1 in my POM. However, the actual jar is named json-lib-2.1-jdk15.jar. Maven is looking for the artifact name + version, hence json-lib-2.1.jar. So, it's ...

34. Java w/ maven : getting sources from a jar file    stackoverflow.com

I write a gui app , and use image files (gif) as icons. When I run the app in my IDE - the icons appear. When I run it from a ...

35. adding jar libraries into jar file    stackoverflow.com

I am doing a maven project. Everything is fine when compiling and running my project in an idea, but whenever I create jar file, my external jar files in web/lib/ cannot ...

36. how to add mysql table to jar file    stackoverflow.com

I want to add mysql tables into my jar file. How can I do this with maven project ?

37. Creating maven Jar File contains JGoodies jar Problem    stackoverflow.com

I created jar file with maven but there was an NullPointerException is thrown because I used jgoodies form I think. But an idea When the project is run, there is no ...

38. How to get the source jar using maven    stackoverflow.com

Is there a way to get the source jar besides the binary jar by using maven?

39. What is missing javaee:javaee-api:jar:5?    stackoverflow.com

I want to built my application with maven but it says:

Missing:
----------
1) javaee:javaee-api:jar:5

  Try downloading the file manually from the project website.

  Then, install it using the command:
   ...

40. Find and replace a jar file using Maven    stackoverflow.com

Suppose you are working on a big project, which is run on some application server (let's say Tomcat, but it may be also Jboss, or Jetty, or something else). The project ...

41. placing XML files in non-resources of jar with Maven    stackoverflow.com

This is more of a pattern question. I am using maven to create a three module project. Domain, Services, Site The services module depends on the domain module. Now in the services module ...

42. Maven: create a jar executing my java files, instead of containing them    stackoverflow.com

I want to create a jar file containing downloaded and processed Internet files. And I want to do it using Mave. So, instead of compiling my .java classes and create a ...

43. izpack install jar works only in a folder starting with "izpack"    stackoverflow.com

I'm using Maven and the izpack-maven-plugin for one of my java project. My izpack files are in ${basedir}/izpack. My install.xml file is in ${basedir}/src/main/filter and is filtered during the package phase

<resources>
   ...

44. Maven Proguard processing a library jar that other applications will depend one    stackoverflow.com

Here is what my build plug in stanza looks like:

<plugin>
    <groupId>com.pyx4me</groupId>
    <artifactId>proguard-maven-plugin</artifactId>
    <version>2.0.4</version>
    <executions>
      ...

45. Exclude all the jar's from webapp/WEB-INF/lib    stackoverflow.com

I have the third party jar's in my WEB project placed at /src/main/webapp/WEB-INF/lib/ I have mentioned the dependency for all the required JAR's in the pom.xml. Now, Since the dependencies are defined in ...

46. Generate two jar with the same maven project    stackoverflow.com

I would like to generate two jars from the same maven project when executing a mvn clean install. The only difference between the two jars, will be the content of the META-INF ...

47. Practices and patterns for maven, using and distributing jars that have click-through license requirements?    stackoverflow.com

First, a not-so-brief backgrounder (...my apologies in advance for the LONG question... skip to paragraph #6 to get to the actual question :-) ...Long-time maven users know the pains of the ...

48. How to include required jars in project while using Maven?    stackoverflow.com

I am new to Maven and using it to build a project on my local. This is working nicely on my local. Now, I want to run the same project on ...

49. maven: How to load tools.jar/classes.jar in an OS independent way?    stackoverflow.com

I am using a maven plugin that requires a class that is contained in the jdk's (windows) tools.jar (mac it's in classes.jar). I add this as an explicit dependency of the plugin ...

50. Maven - Replace a file in a jar    stackoverflow.com

I want to replace an item in an existing jar/zip file while doing the maven build. What is the easiest way to achieve this? Thank you.

51. Maven specific configuration for .jar files    stackoverflow.com

I am writing an application that consists of many artifacts. Some are jars and some are other types. The problem I am having has to do with testing. I am using ...

52. How do I get maven to download the platform.jar from the JNA project    stackoverflow.com

I have the following POM entry

<dependency>
    <groupId>net.java.dev.jna</groupId>
    <artifactId>jna</artifactId>
    <version>3.3.0</version>
</dependency>
When I build my project it downloads the following files:
  • jna-3.3.0.jar
  • jna-3.3.0.jar.sha1 ...

53. Single jar vs Multiple jars - performance benefits    stackoverflow.com

I have an application which is deployed into Jetty but is not packaged into single war file. Contrary, it is stored as a folder. There are quite a lot of dependencies ...

54. maven: how to place the output jar into another folder    stackoverflow.com

I'd like to place my output jar and jar-with-dependencies into another folder (not in target/ but in ../libs/) How can I do that? Thanks

55. get maven to call a method before jar    stackoverflow.com

how do i get maven to run a specific method of mine before it creates the jar file? basically, i have java code in my junits folder (not a test, just a ...

56. Where is the Assisted class in the Guice jar?    stackoverflow.com

I've download Guice 2.0 and 3.0 via Maven, and can't find the entire com.google.inject.assistedinject package in the jar. All the other components of Guice seem to be there, but

57. How to simply download a JAR using Maven?    stackoverflow.com

How do I download JAR during a build in Maven script?

58. Missing jar from repo1.maven.org    stackoverflow.com

Eclipse is unable to find and download the following jar:

<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcomponents-client</artifactId>
<version>4.1.2</version>
<packaging>pom</packaging>
</dependency>
http://search.maven.org/#artifactdetails|org.apache.httpcomponents|httpclient|4.1.2|jar http://repo1.maven.org/maven2/org/apache/httpcomponents/httpcomponents-client/4.1.2/httpcomponents-client-4.1.2.jar Resolved: I dunno where the pom came from. Is missing.

59. How to get the source code for the javax:javaee-api-6.0.jar    stackoverflow.com

I use the javax:javaee-api-6.0.jar maven artifact.

<dependency>
  <groupId>javax</groupId>
  <artifactId>javaee-api</artifactId>
  <version>6.0</version>
  <scope>provided</scope>
</dependency>
I would like to download it's source code with the dependency:sources mvn goal. I was looking for the sources ...

60. Maven/Java-how to specify which jar file to use    stackoverflow.com

I have feeling I will get down voted. Please pardon my ignorance on this subject as I need to get this working soon. Basically, I have two dependencies. Same GroupId, Same ...

61. Maven Jar signing and target rearrangement    stackoverflow.com

I'm converting an Ant based project to be buildable by Maven. Standard build is working for now. I'm trying to migrate the additional build targets which are specified in the original ...

62. Setting up a maven project for already made jars    stackoverflow.com

I have some jar files that I need to include in my build - I'd rather not specify them as system dependencies - that creates a nightmare for setup. I have ...

63. Using Maven to just download JARs    stackoverflow.com

I would like to have Maven download the JARs listed in a pom.xml file. How do I do that? Currently, Maven wants to compile the project (and it fails). ...

64. How do I pull in rt.jar through maven?    stackoverflow.com

I'm trying to build a Java 5 system using Java 6. I have configured and with 1.5, but I also need to set to point at a Java ...

65. How does Maven make it easy to manage Jar files?    stackoverflow.com

While reading about Maven I came across the line below.

A very significant aspect of Maven is the use of repositories to manage jar files across different projects.
But, to ...

66. Can not find load class in the lib folder of jar    stackoverflow.com

I package all my dependency jars in the lib folder of my final jar. But when I use command to execute like java -cp my.jar MyMainClass, it said that can not ...

67. Application fails to find XSD file using One-Jar    stackoverflow.com

I am using One-Jar's maven plugin to package my java into one jar with all it's dependencies. The project has a resource called schema.xsd. when I run the jar file using java -jar ...

68. Maven:how to check which jars are not being used at all    stackoverflow.com

We have a multiwar project and with various people working on the project a lot of times, lots of unused jars are still specified as dependencies, is there any way , ...

69. How to specify path for local jars in maven    stackoverflow.com

I am using maven2 to build the java project. when I am trying to build using mvn install I am getting the compilation error saying some package xya.abc.aaa doesnot ...

70. Unable to execute maven generated jar file using java -jar     stackoverflow.com

Hi I am using maven2 to build my project. I am able to generate the jar file using maven build with the command mvn clean install. I have added this plugin to ...

71. warning from maven install to produce runnable jar    stackoverflow.com

We are building a maven based project. Now I am trying use the shade plugin to generate a runnable jar file.

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer   implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.myCompany.mainClass</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<pluginRepositories>
<pluginRepository>
  <id>apache maven</id>
  <url>http://repo1.maven.org/maven2/org/apache/maven/plugins</url>
</pluginReposit 

72. maven copy bat file close to the jar    stackoverflow.com

I am currently developing an maven based application. I want to make a bat file to run final jar. I've wrote bat file with call to java -jar... and put it ...

73. maven create zip with jar and some more files    stackoverflow.com

I do not understand maven. Better use ant, but... I've managed to create jar (with, or without dependencies), I've managed to copy bat runner script close to jar but now i ...

74. GENERATE WEBSERVICE[JAX-WS] CLIENT JAR FILE USING MAVEN.XML    coderanch.com

I want to generate a ws client[JAX-WS ] bundled into a jar. is where it's at but no one even talks about putting the generated client into a jar! I am using Maven for builds. I'd like to set up maven to generate the client (wsimport or clientgen) when we build the service, then add that generated code's jar as a ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.