As described here I created users with sufficient privileges to download/upload artifacts, but they also need to have readonly access to another partition as well. So I followed the same procedure and just added (read) for this third partition to users' roles. But got Not authorized error during the build when maven tries to download artifacts from third partition.
Any suggestions?
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>local-release-repo</id>
<username>team1</username>
<password>pass1</password>
</server>
<server>
<id>local-snapshot-repo</id>
<username>team1</username>
<password>pass1</password>
</server>
</servers>
<profiles>
<profile>
<id>local-repos</id>
<properties>
<deployment.releaseRepo.name>Release Repository</deployment.releaseRepo.name>
<deployment.releaseRepo.url>http://192.168.33.10:9090/nexus/content/repositories/releases/</deployment.releaseRepo.url>
<deployment.snapshotRepo.name>Snapshot Repository</deployment.snapshotRepo.name>
<deployment.snapshotRepo.url>http://192.168.33.10:9090/nexus/content/repositories/snapshots</deployment.snapshotRepo.url>
</properties>
<repositories>
<repository>
<id>local-release-repo</id>
<url>http://192.168.33.10:9090/nexus/content/repositories/releases/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
<repository>
<id>local-snapshot-repo</id>
<url>http://192.168.33.10:9090/nexus/content/repositories/snapshots</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>false</enabled>
</releases>
</repository>
</repositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>local-repos</activeProfile>
</activeProfiles>
</settings>
Related
I am trying to deploy a simple Spring Boot web app to Pivotal Cloud foundry, but I get the below error in my logs when i perform a cf push
java.lang.ClassNotFoundException: org.springframework.context.ApplicationContextInitializer
Here is my pom.xml
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.0.BUILD-SNAPSHOT</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.7</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc-portlet</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
The same app gets deployed in my local host and I have no issues building the war. Any thoughts on this ?
As Andy Wilkinson pointed out, this is an issue in a mismatch between Spring Boot 1.4 and the java_buildpack. It can be solved by explicitly mentioning the URL to the java_buildpack:
$ cf push -b https://github.com/cloudfoundry/java-buildpack.git …
Seems like a jar did not download during the maven build due to an SSL handshake exception. For some reason my build did not fail in spite of the missing jar. Found this by enabling debug during the mvn clean install
I'm trying to setup the pom.xml for one of my projects. And I can't figure out how to make it fetch dependencies via HTTP, but deploy new artifacts via FTP.
Here's the situation. I have a multi-module project on which I am working collaboratively with some other people. I also happen to rent a cheap web server that could allow me to share release and snapshot versions of some of my modules via a maven repository.
I want deployment to the repository to be authenticated (so that only authorized people can write to it) and to be done via FTP.
On the other hand, I want everyone to be able to download the published version of the artifacts anonymously via HTTP.
So far, the only thing I found was to add the following section to my pom.xml
<distributionManagement>
<snapshotRepository>
<id>my.repo.snapshots</id>
<name>My Repository - Snapshots</name>
<url>${url}/snapshots</url>
</snapshotRepository>
<repository>
<id>my.repo.releases</id>
<name>My Repository - Releases</name>
<url>${url}/releases</url>
</repository>
</distributionManagement>
The problem with this setup is that it doesn't let me pick FTP for upload and HTTP for download.
Is there any way to configure my pom.xml to do that?
Turns out the solution was right under my nose. The repositories for deploying artifacts are indeed configured through <distributionManagement/>, but repositories for fetching artifacts are configured through the <repositories> element in the <profiles> section.
My working pom.xml configuration now includes:
<distributionManagement>
<repository>
<id>deploy.releases</id>
<name>Repository - Releases</name>
<url>ftp://ftp.domain.com/releases/</url>
</repository>
<snapshotRepository>
<id>deploy.snapshots</id>
<name>Repository - Snapshots</name>
<url>ftp://ftp.domain.com/snapshots/</url>
</snapshotRepository>
</distributionManagement>
<profiles>
<profile>
<id>project.default</id>
<activation>
<property>
<name>!skipProjectDefaultProfile</name>
</property>
</activation>
<repositories>
<repository>
<id>repo.releases</id>
<url>http://maven.domain.com/releases/</url>
</repository>
<repository>
<id>repo.snapshots</id>
<url>http://maven.domain.com/snapshots/</url>
</repository>
</repositories>
</profile>
</profiles>
on top of that, my settings.xml contains the authentication information for FTP
<servers>
<server>
<id>deploy.releases</id>
<username>user</username>
<password>pass</password>
</server>
<server>
<id>deploy.snapshots</id>
<username>user</username>
<password>pass</password>
</server>
</servers>
I'm working on a Tapestry project.
Before, when I forgot a field in a form, I got a beautiful mistake in a pop-up. But since I imported jQuery, the errors are not in pop-up, but next to the fields.
This is my import :
<dependency>
<groupId>org.got5</groupId>
<artifactId>tapestry5-jquery</artifactId>
<version>3.3.0</version>
</dependency>
<repository>
<id>apache-staging</id>
<url>https://repository.apache.org/content/groups/staging/</url>
</repository>
<repository>
<id>devlab722-repo</id>
<url>http://nexus.devlab722.net/nexus/content/repositories/releases
</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>devlab722-snapshot-repo</id>
<url>http://nexus.devlab722.net/nexus/content/repositories/snapshots
</url>
<releases>
<enabled>false</enabled>
</releases>
</repository>
Does anyone had this problem?
Thank you.
I found the solution to my problem here:
https://groups.google.com/forum/#%21topic/tapestry5-jquery/jqHyY0JCz-c
In the AppModule.java, I added this :
configuration.add(JQuerySymbolConstants.SUPPRESS_PROTOTYPE, "false");
configuration.add(JQuerySymbolConstants.JQUERY_ALIAS, "$j");
in the contributeApplicationDefaults function
I'm glad you liked the Tapestry error popups from prior releases ... I suspect you are the only one who liked them; I'm afraid once you upgrade to 5.4 they are gone for good.
recently I was involved in maintenance of a project.
This project is very old and the build process is all demanded to IBM RAD.
We have to rebuild the entire project from scratch, but in the meanwhile we have to maintain this old one.
I want to move to a CI system and automatize the build process using such software like Maven or Gradle (preferred).
The problem is that this project is using some IBM libraries to work with EJB (a field in which I'm very poor of knowledge and experience), and I have an ejbModule which is full of classes that aren't in SVN and are autogenerated from RAD (all stub classes).
What is the purpose of the stub?
After see this, I'm not very sure if is possible to automatize the build process, does someone have some experience with this?
Sorry for the lack of details, I don't know what I can add to be more detailed, incase something more is needed ask.
We have a system developed in RAD using ejb 2.0, deployed on to websphere 6.1 server
If you have a similar set-up you might be able to replicate the structure we used.
We used maven as the build tool, using the following plugins;
maven-ejb-plugin
was6-maven-plugin
xdoclet-maven-plugin
we used profiles to active the generation of the stubs when any of the interfaces changed, and xdoclet to annotate the bean class including websphere specific binding to generate the ejb-jar.xml and other ibm deployment files.
It took a few weeks to get it working and we have an automated build using hudson-ci, so might have to play around with the setup of the pom and plugins to adapt to your project.
sample of our pom.xml;
<groupId>your.group.id</groupId>
<artifactId>your.artifact.id</artifactId>
<packaging>ejb</packaging>
<build>
<plugins>
<plugin>
<artifactId>maven-ejb-plugin</artifactId>
<configuration>
<ejbVersion>2.0</ejbVersion>
<generateClient>true</generateClient>
<clientIncludes>
<clientInclude>**/interface/**</clientInclude>
</clientIncludes>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>xdoclet</id>
<activation>
<property>
<name>xdoclet</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xdoclet-maven-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>xdoclet</goal>
</goals>
<configuration>
<tasks>
<ejbdoclet
destDir="${project.build.sourceDirectory}"
force="true" ejbSpec="2.0"
verbose="true">
<fileset
dir="${project.build.sourceDirectory}">
<include name="**/*Bean.java" />
</fileset>
<packageSubstitution
packages="service" useFirst="true"
substituteWith="interface" />
<homeinterface />
<remoteinterface />
<deploymentdescriptor
displayname="Service Name"
description=""
destDir="${basedir}/src/main/resources/META-INF"
validateXML="true" useIds="true" />
<websphere
destDir="${basedir}/src/main/resources/META-INF"
validateXML="true" />
</ejbdoclet>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
</profile>
<profile>
<id>was-ejb</id>
<activation>
<property>
<name>was-ejb</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>was6-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>ejbdeploy</goal>
</goals>
</execution>
</executions>
<configuration>
<wasHome>C:/Program Files/IBM/WebSphere/AppServer</wasHome>
</configuration>
</plugin>
</plugins>
</profile>
</profiles>
I am trying to convert flex 4.6 project into maven Following is my pom.xml
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<groupId>org.sonatype.flexmojos</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
<version>4.0-RC2</version>
<extensions>true</extensions>
<dependencies>
<dependency>
<groupId>com.adobe.flex</groupId>
<artifactId>compiler</artifactId>
<version>4.6.0.23201</version>
<type>pom</type>
</dependency>
</dependencies>
<executions>
<execution>
<goals>
<goal>wrapper</goal>
</goals>
<configuration>
<parameters>
<swf>${build.finalName}</swf>
<width>100%</width>
<height>100%</height>
</parameters>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>flex-framework</artifactId>
<version>4.6.0.23201</version>
<type>pom</type>
</dependency>
</dependencies>
<repositories>
<repository>
<id>flexmojos</id>
<url>http://repository.sonatype.org/content/groups/flexgroup/</url>
</repository>
</repositories>
Error I am getting is as follows:
[ERROR] The project com.adobe:gDash-main-maven:1.0-SNAPSHOT
(C:\\pom.xml) has 1 error [ERROR] Unresolveable build
extension: Plugin com.adobe.flex.compiler:batik- all-flex:4.6.0.23201
or one of its dependencies could not be resolved: The following
artifacts could not be resolved:
com.adobe.flex.compiler:batik-all-flex:jar :4.6.0.23201,
com.adobe.flex:compiler:pom:4.6.0.23201: Could not find artifact com.adobe.flex.compiler:batik-all-flex:jar:4.6.0.23201 in central
(http://repo.ma ven.apache.org/maven2) -> [Help 2]
org.apache.maven.plugin.PluginResolutionException: Plugin
com.adobe.flex.compile r:batik-all-flex:4.6.0.23201 or one of its
dependencies could not be resolved: T he following artifacts could not
be resolved: com.adobe.flex.compiler:batik-all- flex:jar:4.6.0.23201,
com.adobe.flex:compiler:pom:4.6.0.23201: Could not find ar tifact
com.adobe.flex.compiler:batik-all-flex:jar:4.6.0.23201 in central
(http://repo.maven.apache.org/maven2)
I was also facing the same problem. Add this to your pom.xml file (after <repositories>...</repositories> for instance):
<pluginRepositories>
<pluginRepository>
<id>flex-mojos-plugin-repository</id>
<url>http://repository.sonatype.org/content/groups/flexgroup</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
Solved it for me :)
Some IDEs will generate a POM file already containing this plugin repository.
If you browse the repo, you see that
http://repository.sonatype.org/content/groups/flexgroup/com/adobe/flex/framework/flex-framework/
does not exist for version 4.6.0.23201, but for version 4.6.b.23201 instead