maven-2

Maven failed to resolve dependencies - javax.activation

两盒软妹~` 提交于 2019-12-01 16:46:40
I have a working maven web application which uses many jars. Trying to add javax.activation and do a mvn clean install fails. I get "Failed to execute goal on project xxx: Could not resolve dependencies for project javax.activation:activation:jar:1.0.2 in central (http://build02.efollett.com:8081/artifactory/libs-release) When I check my maven repository I see the activation jar there. For example, navigating to C:\Users\me.m2\repository\javax\activation\activation\1.0.2 I see the following. activation-1.0.2.jar.lastUpdated activation-1.0.2.pom activation-1.0.2.pom.sha1 activation-1.0.2.pom

Why datasource is not found in JNDI after injection from jndi.properties?

青春壹個敷衍的年華 提交于 2019-12-01 16:30:10
This is my persistence.xml : <persistence> <persistence-unit name="MyUnit"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <jta-data-source>jdbc/abcDS</jta-data-source> </persistence-unit> </persistence> This is jndi.properties file from src/test/resources which is supposed to create a datasource during testing, since a real application server with a real datasource is absent: java.naming.factory.initial=org.apache.openejb.client.LocalInitialContextFactory jdbc/abcDS=new://Resource?type=DataSource jdbc/abcDS.JdbcDriver=org.hsqldb.jdbcDriver jdbc/abcDS.JdbcUrl=jdbc:hsqldb:mem

Maven plugin executes multiple times during build

北战南征 提交于 2019-12-01 16:28:16
问题 I have a Maven project with multiple overlapping profiles. I want to display the active profiles at the beginning of every build. So I put the following into the pom.xml <build> section: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-help-plugin</artifactId> <version>2.1.1</version> <executions> <execution> <id>display-active-profiles-at-start-of-build</id> <phase>validate</phase> <goals> <goal>active-profiles</goal> </goals> </execution> </executions> </plugin> The

How to use javadoc:aggregate properly in multi-module maven project?

丶灬走出姿态 提交于 2019-12-01 16:21:04
问题 This is my parent pom.xml file (part of it) in a multi-module project: ... <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> </plugin> </plugins> </build> ... This plugin is inherited in all sub-modules and I don't think it's a correct approach. When I'm running mvn javadoc:aggregate the documentation is generated in target/site/apidoc , but the log is full of warnings: ... [WARNING] Removing: aggregate from forked lifecycle,

Where to keep a GPG secret key for a Maven project in CI environment?

本小妞迷上赌 提交于 2019-12-01 16:14:15
问题 I'm trying to use maven-gpg-plugin:sign in order to sign project artifacts before deployment to Sonatype OSS repository. The question is where shall I keep my secret key secring.gpg : In continuous integration ~/.gnupg directory In project source code, e.g. src/test/resources/gpg/secring.gpg And why? 回答1: If key is sensitive put it in ~/.gnupg directory on CI server and protect that directory with proper access modifiers. 2nd approach will allow every developer with access to project to see

Maven failed to resolve dependencies - javax.activation

瘦欲@ 提交于 2019-12-01 15:48:42
问题 I have a working maven web application which uses many jars. Trying to add javax.activation and do a mvn clean install fails. I get "Failed to execute goal on project xxx: Could not resolve dependencies for project javax.activation:activation:jar:1.0.2 in central (http://build02.efollett.com:8081/artifactory/libs-release) When I check my maven repository I see the activation jar there. For example, navigating to C:\Users\me.m2\repository\javax\activation\activation\1.0.2 I see the following.

Can maven run commandline instructions?

℡╲_俬逩灬. 提交于 2019-12-01 15:46:28
Can we bind some native OS commands to the maven goals and/or phases? jitter Actually there is the Exec Maven Plugin for these cases. See exec-maven-plugin for details Romain Linsolas Not natively. However, by using the AntRun plugin , you can specify an Ant task (using Exec ) that execute a OS command during the build. <project> ... <build> <plugins> <plugin> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> <phase> <!-- a lifecycle phase --> </phase> <configuration> <tasks> <!-- Place any Ant task here. You can add anything you can add between <target> and </target> in a

Maven does not copy non-java files

梦想与她 提交于 2019-12-01 15:38:13
I have a pom.xml file with the following: <sourceDirectory>${basedir}/src/main/test</sourceDirectory> <outputDirectory>${basedir}/src/main/bin </outputDirectory> Inside ${basedir}/src/main/test I have some folders which do not contain any .java files. When I start a compilation they are not copied to ${basedir}/src/main/bin directory. Only .java files are moved (after compilation of course) and stored on the right folder. Can someone help me to solve this problem without using any plugin ? I tried with <resources> <resource> <filtering>false</filtering> <directory>${basedir}/src/main/test

How to execute mvn command using IntelliJ IDEA?

半腔热情 提交于 2019-12-01 15:35:40
I am trying to add Oracle JDBC driver in my local Maven repo. I have found this link to do so. I want to do the same from Inside IntelliJ IDEA. Is there any way to execute mvn commands from IntelliJ IDEA? There is a button in maven menu of Intellij IDEA: Also you can always use "Terminal" You can check the Image : If you don't fine the Maven Projects there then you can open it from Bottom Left part of Intellij IDEA, there's one Square Button there. click on it. If You don't have configure the maven path then you also need to configure maven directory also. Using maven settings . In the Edit

Specify archetype for archetype:generate on command line

断了今生、忘了曾经 提交于 2019-12-01 15:27:40
I'm generating a Maven archetype for a simple project. I use archetype:generate , and it gives me a list of types of archetypes to generate. I'm pretty sure I want 99: remote -> maven-archetype-quickstart (An archetype which contains a sample Maven project.) I can just enter "99" interactively, but I'm trying to write a blog post. I don't want to tell my readers "search for maven-archetype-quickstart in the hundreds of options", and I know it won't always be number 99. So, how do I specify on the command line the archetype to generate? ( A similar question discusses which archetype to use, but