I'm trying to use the alfresco-pdf-toolkit addon in my Alfresco Maven project, is there anyway to include the amp in the pom.xml file of my project?
Yes, assuming your project uses the all-in-one archetype of the Alfresco Maven SDK, you can add an AMP dependency as an overlay.
Go look in the repo pom.xml for an example. You'll see something like:
<overlay>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-spp</artifactId>
<type>amp</type>
</overlay>
Which is how the all-in-one project brings in the SPP dependency. You can add additional AMPs below that.
You must have already run "mvn install" for the AMPs you are depending on so that they are installed in your local Maven repo, or they must be available in some other maven repo that your build knows about.
Related
I have a multi module sbt/Scala project, and I want to write a maven plugin that depends on the scala code.
For the moment, I have the plugin in a separate project, using maven (maven-plugin packaging, and deps on the scala code). I therefore have 2 projects : one sbt and one maven. So I need to build (and publishM2) the sbt one and then build the other with maven.
Can the maven plugin be aggregated into the sbt build, so that I have only one multi-module project ?
Do I need to keep the pom.xml and "invoke" it from sbt ?
Can I build the mvn plugin directly in sbt (what about the packaging "maven-plugin" then) ?
We have a Maven1 project that needs artifacts from a standard Maven2 (remote) repo and I would like to resolve this by using our central Artifactory.
Currently I'm running a local Artifactory 3.0.3 OSS, standalone, with default settings (only added my virtual repo).
I have created a virtual repository that only referes to a single maven2 remote repo (spring-release) and uses maven-1-default in Repository Layout (Advanced Settings tab).
I've added a dependency to my project.xml:
<dependency>
<groupId>org.springframework.aws</groupId>
<artifactId>spring-aws-maven</artifactId>
<version>1.2.2</version>
<type>jar</type>
</dependency>
But Maven can not resolve this dependency when I run "maven build".
Is it possible to have a m2 -> m1 "bridge" in Artifactory 3.0.3 OSS or do I need the Pro add-on?
//Joran
Of course you can. Define a new virtual repository, add the Maven2 repositories you want to convert, select maven-1-default in Repository Layout dropbox in Advanced tab. Done.
Now resolve the artifacts from the new virtual repository and you're all set.
I have scala project that I use sbt to manage and I have a sbt plugin (sbt-twirl to be specific) that I need for the project. Now I would like to use Eclipse for editing/debugging the project. As usual, I used sbt-eclipse to generate the Eclipse project files and use scala-ide plugin in Eclipse. However, the Eclipse project does not compile the code that requires the sbt-twirl plugin. I am guessing that the sbt used by Eclipse is not picking up the sbt-twirl plugin. Is there any way to configure Eclipse's sbt to use the sbt-twirl plugin (configure either automatically through sbt-eclipse, or manually in Eclipse)?
I am using Eclipse Indigo (3.7.2) with Scala IDE 2.0.2 .
Thanks in advance.
I am writing an Adobe AIR application that needs to build in a CI using maven and nexus. I tried to follow this article which is the most up to date article from the source, but I still don't understand these things:
Are the first and second pom.xml examples in the article in the same pom.xml file?
How do I get the Flex SDK dependencies on my CI?
It would be awesome if someone had a complete project setup and went through the whole thing.
This blog has some useful information on building Air applications with Maven 2.
As far as your numbered questions are concerned
Part 1: The two POMs in the tutorial are different. The first creates the swf package containing your application components. The second POM has a dependency on the swf package (note the dependency in the second POM for the artifactId Air in the first). The second POM defines processing to unpack the swf package (using the dependency plugin), then uses the exec plugin to invoke adt on the unpacked package contents.
The process described is therefore in two parts. The first POM packages the swf files so they are available in the repository. The second POM will retrieve any packages required from the Maven repository and invoke adt to compile them. So if you have multiple Air packages, the second POM can be modified to download the extra packages and compile them.
Part 2: Most of the dependencies you need are hosted in the Sonatype public repository, one notable exception seems to be the adt.jar. You can deploy the adt.jar to a Maven repository manager such as Nexus using the deploy plugin's deploy-file goal.
This would deploy the adt.jar to the repository with credentials matching the tutorial:
mvn deploy:deploy-file -Durl=http://path/to/repository -DrepositoryId=[some.id]
-Dfile=adt.jar -DgroupId=com.adobe.flex.compiler -DartifactId=adt
-Dversion=3.3.0.4852 -DgeneratePom=true -DgeneratePom.description="Flex ADT"
To reference the Nexus public repository, add a repository declaration to your settings.xml or pom.xml like this:
<repositories>
<repository>
<id>nexus-public</id>
<url>http://repository.sonatype.org/content/groups/public</url>
</repository>
</repositories>
I want to include GData Client, which doesn't use Maven, as a dependency into my Maven project. It ships as a bunch of JAR files.
Additionaly, I use Maven Shade Plugin to build an executable JAR without any external dependencies (with the default configuration, no renaming/including/excluding/transforming of dependencies).
How can I do that?
(Just adding the JARs as resources wouldn't work, since the Shade plugin must extract them).
you want to check the maven docs on installing 3rd party jars
Once installed into your local maven repository, shade should be able to use them like any other dependency.
See this answer if you don't want to install the JARs in your repository for whatever reason: Add a dependency in Maven