maven-2

Verification of dependency authenticy in automated build systems

Hi everyone, I was just pointed to a very interesting article about a security problem called Cross Build Injection (XBI). Bascially it is a fancy name for smuggling bad code into an application at build time via automated build systems such as ant, maven or ivy. The problem could be alleviated by introducing a cryptographic signature ...

Maven: how to filter the same resource multiple times with different property values?

Our project uses Log4J, configured via log4j.properties file. We have multiple production servers, which log to different log files, so that the logs can be differentiated. So log4j.properties for node 1 looks like this: ... log4j.appender.Application.File=D:/logs/application_1.log ... log4j.appender.tx_info.File=D:/logs/tx_info_1.log ....

I am unable to run maven2

I am not able to run Maven 2.1. I get following Error while running: **************************************************************** naresh@HYRDSRVIHUB01:~/.m2> mvn archetype:create -DarchetypeGroupId=org.apache.maven.archetypes -DgroupId=com.mycompany.app -DartifactId=my-app [INFO] Scanning for projects... [INFO] Searching repository...

Maven: How to install a plugin in offline mode

Hello! I'm sitting behind a firewall and therefore maven can't connect to central repositories (error message is given below). However, I can connect to the internet via HTTP. How can I install a maven plugin (e. g. archetype) in offline mode (i. e. download some file in a browser and then install the plugin by executing some commands...

What does Maven mean by: "Could not retrieve the target file name of dependency"

I have been Googling for the following warning when building a WAR, but can't find an explanation: [WARNING] Could not retrieve the target file name of dependency [Dependency {groupId=org.company.xml.jaxbtypes, artifactId=iJaxbtypes, version=1.0.2-SNAPSHOT, type=jar}] The dependency is resolved and everything works as expected, but W...

Eclipse Maven Plugin Configuration Problem

I have followed this thread now when i try to build using maven plugin installed i am getting following error. goal i executed was clean -X install Unable to locate the Javac Compiler in: C:\Program Files\Java\jre6\..\lib\tools.jar Please ensure you are using JDK 1.4 or above and not a JRE (the com.sun.tools.javac.Main class is requi...

Moving Axis 1.4 stub project to a Maven based project (Type Access restriction)

For compatibility reasons I have to build Axis 1.4 skeleton classes from exiting an wsdl-file. I use the shipped wsdl2java ant-task from Axis 14. I'm using MyEclipse 8.5 on Java SDK 1.6.0_18, I added the required libraries to my build path and everything goes fine. Now I moved my normal project to a Apache Maven2 project, as I added t...

how to generate download-site using maven

Hi, I am new to Maven and trying to accomplish a simple task: build jar package and web site [DONE] deploy them to remote server via scp [DONE] the site should contain download page with links to the deployed jar files [MISSING] I do not want to use archiva or similar tools. I just want to have a (static, generated) page on the web s...

What is the correct maven2 phase for deployment into application server?

I'm trying to configure pom.xml so that it automatically deploys EAR archive to GlassFish application server. I want to attach this operation to the proper maven execution phase. But can't understand which one is dedicated just for this operation? Deploy? Install? Please, help. This is what I'm doing: <plugin> <artifactId>maven-antr...

Hibernate confusion. What are the differences between ga, GA and Final Releases? Compatibility? Repository?

Can anyone please explain: 1. The difference between ga, GA and Final Hibernate releases? 2. Should I use the maven repository or the jboss nexus repository? 3. Why does the latest compatibility matrix (http://community.jboss.org/wiki/HibernateCompatibilityMatrix) not list anything higher than 3.2.6GA? I'm using the following versions...

eclipse: Run on server disappear

I have a maven project created with maven-archetype-webapp. As i use on Windows machine, the project generated by Maven has a "Run on Server" but when i create it on Linux machine, it doesnt have. Please tell me how can i enable it. Thanks ...

Is there any way to avoid Scala libraries appearing twice in an Eclipse/Scala/Maven project?

I have Eclipse 3.5.2 Scala 2.8.0 final (inc latest Scala IDE for Eclipse) Maven integration for Eclipse Maven 2.2.1 .project and .classpath files generated by maven-eclipse-plugin I'm using Scala to write Specs BDD tests for my Java code and the setup above is working very nicely so far. However, I have one puzzling problem and I wou...

Problems with Maven 2

I recently started to use Maven2 in one of my Java web application projects. Now I had many issues with it, some times project fails to build for no apparent reason and then it suddenly starts to work when nothing was done at all to project. Or some times our project members must delete project from their harddrive and download project a...

Maven Ant Task: Replace property in pom.xml when executing Maven from Ant

In my Ant script, i'm executing Maven like this: <artifact:mvn pom="${basedir}/pom.xml"> <arg value="glassfish:deploy" /> </artifact:mvn> In my pom.xml, there is a property: <properties> <glassfish.home>${env.GLASSFISH}</glassfish.home> </properties> This value should be replaced by a value thats provided by the Ant Script. Is ...

Creating a tar.gz archive with Maven

Hi All, I have a Maven project, where under src/main directory there is a sub dir called output. this folder needs to be packaged into tar.gz. when using the assembly plugin as follows: From the pom.xml: <build> <finalName>front</finalName> <plugins> <plugin> <artifactId>maven-assembly-plugin</artifactId> <version>2.2-beta...

Maven: Finding the project's main directory from child modules

We have a Maven project that contains a root pom, and several other modules/poms. The directory structure is as follow: / /pom.xml // the root pom /module1/ /module1/pom.xml /module2/ /module2/pom.xml ... In the root pom, we define and use a root.dir variable: <properties> <root.dir>${basedir}/${parent.dir}</root.dir...

After updating a dependency to a new version (jfreechart from 1.0.12 to 1.0.13) I get "the type cannot be resolved..." errors

Hello! I changed the version from jFreeChart in the pom.xml of my maven project from 1.0.12 to 1.0.13. Now I get the error "The type org.jfree.ui.layer cannot be resolved to a type. It is indirectly referenced from required class files." What does this mean? I just updated the jfreechart dependency. ...

Maven - POM: How to make the jetty port changeable so that it can be retrieved later?

Hi. I'm working on an integration test suite and I've got a question for you. My parent pom defines the use of the jetty plugin with the goal: run-war. I need to make the port that jetty listens on changeable via the command-line. This can be achieved by passing -Djetty.port=8099 for example. In the child project, I need to use this p...

Yet another "unable to locate Spring NamespaceHandler" error

I'm creating a stand-alone Sava application with Spring, to handle the JDBC access. The application works fine on every test and I decided that I need a jar to be deployed our clients. They might not have spring in their classpath, so I used maven-assembly-plugin to handle the jar creation with dependencies. However when I try to run t...

Copy the latest version of an artifact from a Maven repository

Hi All, I am trying to copy a war file from my company's Nexus repository to a specific location. I am using maven-dependency-plugin in the following way: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <version>2.1</version> <executions> <execution> <id>copy-to-o...