FAQAre these instructions just for Confluence?No, at the time of this writing (5/15/08), these instructions are applicable for Confluence, JIRA and Bamboo. We will soon support Fisheye, Crucible and Crowd also. Where the documentation refers to "Confluence", it's purely as an example. Where is my $HOME Directory?On Windows, you can usually find your home directory at c:\Document and Settings\USERNAME. On Unix systems, you can usually find it at /home/USERNAME/ and on Mac OS X, you'll find your home directory at /Users/USERNAME. There is a more complete discussion of home directories at Wikipedia. How do I specify a particular version of Java?By default, Maven uses the JDK that you run it with to compile your sources. If you would like to enforce a particular JDK version or version range, add these parameters to your plugin's POM file. <project> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> <executions> <execution> <id>enforce-java</id> <goals> <goal>enforce</goal> </goals> <configuration> <rules> <requireJavaVersion> <version>[1.4,1.5)</version> </requireJavaVersion> </rules> </configuration> </execution> </executions> </plugin> </plugins> </build> </project> Plugins are pre-configured to use Java 1.4 as the source level when compiling. If you would like to use language features introduced in Java 5, such as generics, auto-boxing, and annotations, you'll need to set the jdkLevel property: <project> ... <properties> ... <jdkLevel>1.5</jdkLevel> </properties> ... </project> This property is also used by the Maven IDEA plugin to set the source level for the project generated when you run mvn idea:idea. TroubleshootingMaven complains that it can't find Java Mail, Java Activation or JTA.Sun will not allow Maven to redistribute its binaries, you must install all Sun binaries manually by downloading them from Sun's website and running the mvn install command. You'll find instructions here and here. The maven install command looks like this: mvn install:install-file -DgroupId=javax.XXXXX -DartifactId=XXXXX \ -Dversion=X.X.X -Dpackaging=jar -Dfile=/path/to/XXXX-X_X_X.jar Maven runs out of memoryYou may need to allocate more memory to Maven in order to complete it. You can do so be setting an environment variable called MAVEN_OPTS, like so export MAVEN_OPTS=-Xmx512m The Confluence License has expiredIf you set your plugin to build against Confluence 2.6.1 or later using the atlassian.product.version parameter, the licenses will be valid. If you need to build against an older version, you replace the invalid license with a valid one manually. I can't log in to the test Confluence instance using the admin account.Set your plugin to build against Confluence 2.6.1 or later using the atlassian.product.version parameter. Maven complains it is "Unable to download the artifact from any repository."We use Maven project's Archiva Maven Proxy to act as our Maven repository. Sometime, however, artifact downloads fail because of Archiva's instabilities. If you run into messages like this, sometimes a second attempt will succeed in downloading the artifact. If it doesn't work after a few times, then the artifact may be truly missing. You can search our Archiva to confirm this. Maven warning "[WARN] POM for 'X' is invalid.... Reason: Not a v4.0.0 POM"The warning "POM for 'X' is invalid.... Reason: Not a v4.0.0 POM" just means that this particular library hasn't been upgraded to have a Maven 2 POM yet. It will still work fine in your build, and you can safely ignore these errors. As we get all our dependencies moved over to Maven 2, and these errors will become less and less frequent. Maven error "Parsing error.... Unrecognised tag: 'html'"Occasionally, our Maven proxy will return a 404 file instead of the POM that it should. We're investigating this error (XPR-259) with the Archiva developers. In the mean time, should this happen to you, you should try remove the artifact and it's POM from your local repository to force a re-download. If that doesn't work, contact developer-relations@atlassian.com and we'll correct the problem at the source. How can I change the log4j settings.You can edit the file .../WEB-INF/classes/log4j.properties. Errors when creating an archetypeWhen creating a new archetype, you might see errors that look like "[ERROR] ResourceManager : unable to find resource 'VM_global_library.vm' in any resource loader." These errors are harmless, and you can safely ignore them. We hope to eliminate them eventually, and the issue about them is filed internally as XPR-229. Can I get the repository available locally?
UserId's / Passwords? Yes, it will prompt, adding your DEVNET credentials will allow full access, careful when rm'ing |
Labels
Except where otherwise noted, content in this space is licensed under a Creative Commons Attribution 2.5 Australia License.
Comments (3)
Dec 04, 2008
Tido Lorenz says:
Dear Atlassian! I try to create my own plugin, but it's harder than I thought...Dear Atlassian!
I try to create my own plugin, but it's harder than I thought. Maven is running fine in general with other projects, and the creation of an archetype was successfull, but now that I tried to download all the dependencies, I am in trouble.
I got a huge list of repositories not found (not all though), when I call mvn eclipse:eclipse.
Just the start of the list is:
Sources for some artifacts are not available.
List of artifacts without a source archive:
o carol:carol:1.5.2
o carol:carol-properties:1.0
o com.atlassian.jira:atlassian-jira:3.12
o com.atlassian.extras:atlassian-extras:1.12
o log4j:log4j:1.2.7
o oro:oro:2.0.7
o com.atlassian.core:atlassian-core:2007-05-11
In my settings I specified the repositories
<id>atlassian-public</id>
<url>https://maven.atlassian.com/repository/public</url>
<id>atlassian-m1-repository</id>
<url>https://maven.atlassian.com/maven1</url>
<id>maven2-repository.dev.java.net</id>
<name>Java.net Repository for Maven</name>
<url>http://download.java.net/maven/2/</url>
It would be great if you could help us, because I don't know how to get the code compiling.
Cheers,
Tido
Apr 15
George Frick says:
Reason: Unable to download the artifact from any repository I did as above and ...Reason: Unable to download the artifact from any repository
I did as above and searched archiva, I found nothing? It doesn't say what to do if it isn't there, or maybe I am missing something?
[INFO] Scanning for projects...
Downloading: http://repo1.maven.org/maven2/com/atlassian/bamboo/plugins/base/bamboo-plugin-base/7/bamboo-plugin-base-7.pom
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
GroupId: com.atlassian.bamboo.plugins.base
ArtifactId: bamboo-plugin-base
Version: 7
Reason: Unable to download the artifact from any repository
com.atlassian.bamboo.plugins.base:bamboo-plugin-base:pom:7
from the specified remote repositories:
central (http://repo1.maven.org/maven2)
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.reactor.MavenExecutionException: Cannot find parent: com.atlassian.bamboo.plugins.base:bamboo-plugin-base for project: org.aurora.developer.bamboo:artifact_deploy:atlassian-plugin:1.
-SNAPSHOT for project org.aurora.developer.bamboo:artifact_deploy:atlassian-plugin:1.0-SNAPSHOT
at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:378)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:290)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.project.ProjectBuildingException: Cannot find parent: com.atlassian.bamboo.plugins.base:bamboo-plugin-base for project: org.aurora.developer.bamboo:artifact_deploy:atlassi
n-plugin:1.0-SNAPSHOT for project org.aurora.developer.bamboo:artifact_deploy:atlassian-plugin:1.0-SNAPSHOT
at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1261)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:747)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:479)
at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:200)
at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:553)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:467)
at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:364)
... 11 more
Caused by: org.apache.maven.project.ProjectBuildingException: POM 'com.atlassian.bamboo.plugins.base:bamboo-plugin-base' not found in repository: Unable to download the artifact from any repository
com.atlassian.bamboo.plugins.base:bamboo-plugin-base:pom:7
from the specified remote repositories:
central (http://repo1.maven.org/maven2)
for project com.atlassian.bamboo.plugins.base:bamboo-plugin-base
at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:573)
at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1257)
... 17 more
Caused by: org.apache.maven.artifact.resolver.ArtifactNotFoundException: Unable to download the artifact from any repository
com.atlassian.bamboo.plugins.base:bamboo-plugin-base:pom:7
from the specified remote repositories:
central (http://repo1.maven.org/maven2)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:197)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:73)
at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:526)
... 18 more
Caused by: org.apache.maven.wagon.ResourceDoesNotExistException: Unable to download the artifact from any repository
at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(DefaultWagonManager.java:324)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:185)
... 20 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Wed Apr 15 16:44:20 CDT 2009
[INFO] Final Memory: 1M/2M
[INFO] ------------------------------------------------------------------------
Apr 21
Tim Moore says:
George, you need to set up your settings.xml. See Example settings.xmlGeorge, you need to set up your settings.xml. See Example settings.xml