Hide Forgot
Created attachment 802260 [details] screenshot Description of problem: Maven projects can have their version defined by a Maven property: ... <version>${property_version}</version> ... <properties> <property_version>1.0</property_version> </properties> ... Uploading a Maven project jar with version defined this way results in a malformed artifact name and wrong artifact version. The above example is taken from my test project. Maven compiles this just fine. Uploading it creates an artifact named 'testUploadPropertyVersion-$%7Bproperty_version%7D.jar' - see screenshot. In the repository, the artifact is stored under version '$%7Bproperty_version%7D' as well. Adding the jar as dependency to a project adds this to the project pom.xml: <dependency> <groupId>org.jboss.qa.full</groupId> <artifactId>testUploadPropertyVersion</artifactId> <version>${property_version}</version> </dependency> This is fine until you decide to add a Maven property to your project pom.xml and accidentally name it the same as the property in the uploaded jar's pom.xml. Or better yet - try to keep more versions of a project with version kept in a property. In both above cases, it just won't work. The first will search for a non-existent version of the jar, in the second case, the jar will simply be rewritten by the last uploaded version. Version-Release number of selected component (if applicable): BPMS 6.0 ER3
Fixed. Tested with this pom.xml: <?xml version="1.0" encoding="UTF-8"?> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <properties> <property_version>1.0</property_version> </properties> <modelVersion>4.0.0</modelVersion> <groupId>a</groupId> <artifactId>b</artifactId> <version>${property_version}</version> </project>
The list of artifacts in Artifact repository perspective and the modal window for adding dependencies from repository (in Project editor) is fixed. Adding the jar as dependency to a project adds this to the project pom.xml: <dependency> <groupId>org.jboss.qa.full</groupId> <artifactId>testUploadPropertyVersion</artifactId> <version>${property_version}</version> </dependency> Also, the list of dependencies in Project editor - Dependencies still shows "${property_version}" as the so-called Version ID.
GroupID, ArtifactID and Version are now retrieved from pom.properties (that is generated by Maven). For JARs that are uploaded without a pom.xml or pom.properties (i.e. JARs not created by Maven) the user is (still) prompted for GroupID, ArtifactID and Version and both a pom.xml and pom.properties files generated. This means, for older non-Maven JARs that were uploaded to old versions of BPMS/BRMS a pom.properties file may not exist. The user should re-upload these JARs to create the pom.properties file.
This no longer has a target release of 6.0.0.