maven-2

Making HTTP post request (with an input type=“file”) from within Maven, using command line parameters if possible

大兔子大兔子 提交于 2019-12-02 08:15:45
I would like to convert this bash script: #!/bin/bash if ! [ $# == 2 ]; then echo Usage: update-module admin-password module-file exit 1 fi if ! [ -f $2 ]; then echo Error: module file $2 does not exist exit 1 fi curl -c /tmp/cookie.txt -d uname=admin -d pw=${1} http://localhost:8080/openmrs/loginServlet curl -b /tmp/cookie.txt -F action=upload -F update=true -F moduleFile=\@$2 http://localhost:8080/openmrs/admin/modules/module.list rm -rf /tmp/cookie.txt > /dev/null 2>&1 into something that could be placed into a maven pom.xml file. Note that module-file is a jar file (renamed .omod), admin

Does it still make sense to use Maven when dependent jars are checked in with source code?

北慕城南 提交于 2019-12-02 07:58:59
问题 We check all of our source code's dependent third-party JARs into source control along with our source code. When needed, we manually download updates to third party JARs and replace those JARs that are in source control with the newer versions. We haven't felt the need to use Maven yet as this process seems simple enough for us. But are we missing something of great value by not using Maven? Or does our scenario not warrant using Maven? 回答1: "JARs dont change much", I hear this all the time.

Is it best to Mavenize your project jar files or put them in WEB-INF/lib?

…衆ロ難τιáo~ 提交于 2019-12-02 07:00:35
I've been doing this for all of the jar files that my Spring MVC project needs: call mvn install:install-file -DgroupId=vegetables -DartifactId=potatoes -Dversion=1.0 -Dfile=vegetables-1.0.jar -Dpackaging=jar -DgeneratePom=true Recently I must have exceeded some limit on how many dependencies you can list in your pom.xml file because I got an error that said: Your command line is too long So I removed some dependencies from the pom.xml that my project no longer uses and I was able to run the project with maven again. My question is, should I put install all jar files into my Maven repository

How to manipulate Manifest file with maven

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-02 06:31:07
问题 I have an EAR file built with maven. The EAR contains several jars and I need to add a line in the manifest file for just one of these jars. I know of the maven-jar-plugin option (manifestEntries) but this is good for a single standalone jar, not one that is inside an EAR. 回答1: If you take a deeper look into maven-ear-plugin configuration you will find the archive configuration part which is exactly intended for such purposes. This can be added to the configuration of the maven-ear-plugin:

Error with Jboss while deploying a jsp/servlet web app “com.sun.faces.config.ConfigureListener” Error

半腔热情 提交于 2019-12-02 06:12:37
问题 I am working on JSP/Servlets. The web app is to be deployed on Jboss 6. I am using Java 1.6, Eclipse and Maven2. I do not refer to JSF anywhere in my code. My project doesnot have JSF involved anywhere, but when I try to deploy my webapp WAR I get an error that says : 21:55:44,448 INFO [org.jboss.web.tomcat.service.deployers.TomcatDeployment] deploy, ctxPath=/UltimateSMS-1 21:55:44,493 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/UltimateSMS-1]] Error configuring

Using different Java source version when running Maven2 build

爷,独闯天下 提交于 2019-12-02 05:55:32
问题 I'm attempting to run my Maven build using the usual: mvn clean install I'm getting a whole series of errors that read: annotations are not supported in -source 1.3 (use -source 5 or higher to enable annotations) How do I use -source 5 when performing the build. My JAVA_HOME is pointing to JDK 1.6. 回答1: Add this to your pom.xml: <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration> <source

where is “ <groupId>org.glassfish.embedded</groupId>” repository here?

杀马特。学长 韩版系。学妹 提交于 2019-12-02 05:19:00
I want to use <groupId>org.glassfish.embedded</groupId> in my dependencies. What repository should I use? I don't know what you want to use but the groupId org.glassfish.embedded looks pretty old. I suggest to check the more recent maven coordinates that have been published with the release of GlassFish 3.0.1 and to use the Nexus repository for GlassFish: <repository> <id>java.net</id> <name>GlassFish Maven Repository</name> <url>http://maven.glassfish.org/content/groups/glassfish</url> </repository> Since version 3.1.2, glassfish artifacts are in Maven Central, so you don't need any special

What is wrong with my Maven Config?

微笑、不失礼 提交于 2019-12-02 04:59:22
I want to checkout sonar, so I added the following snippet to my pom.xml the dependency part was taken from http://maven.apache.org/general.html#tools-jar-dependency <profile> <id>sonar</id> <activation> <activeByDefault>true</activeByDefault> </activation> <properties> <sonar.jdbc.url>jdbc:derby://localhost:1527/sonar;create=true</sonar.jdbc.url> <sonar.jdbc.driverClassName>org.apache.derby.jdbc.ClientDriver </sonar.jdbc.driverClassName> <sonar.jdbc.username>sonar</sonar.jdbc.username> <sonar.jdbc.password>sonar</sonar.jdbc.password> <sonar.host.url>http://localhost:8080/sonar</sonar.host.url

Error in POM.xml

懵懂的女人 提交于 2019-12-02 04:20:48
问题 I am trying to build the openNMS in eclipse helios using maven. After importing the source using "import existing maven project" i get the around 10k errors. Also i have some error in pom.xml itself, i thought fixing it could reduce the no of errors. The error in pom.xml is maven-resources-plugin prior to 2.4 is not supported by m2e. Use maven-resources-plugin version 2.4 or later. Iam referring to http://www.opennms.org/wiki/Eclipse_and_OpenNMS for building the openNMS Iam using maven

maven-jaxb2-plugin episode of same project in Maven, possible?

心已入冬 提交于 2019-12-02 04:01:59
问题 I have a basic.xsd and two other A.xsd and B.xsd . A.xsd and B.xsd get converted into two different java packages, therefore I need two Maven executions of the same plugin. Both XSDs refer to basic.xsd for some shared classes. If basic.xsd would come from a different project I could solve this problem really nicely through using episodes to prevent duplicate classes. But how can I refer to the current project? My first execution of the plugin is to generate only classes from basic.xsd into