Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maven-pax-plugin always uses all artifacts produced by multimodule projects [PAXCONSTRUCT-114] #127

Open
ops4j-issues opened this issue Jun 2, 2009 · 2 comments
Labels
Milestone

Comments

@ops4j-issues
Copy link

Richard Wallace created PAXCONSTRUCT-114

I have a project with a structure like

catalog/pom.xml
api/pom.xml
core/pom.xml
rest/pom.xml
ui/pom.xml

I'd like to be able to configure the rest and ui modules to run the pax:run goal in the pre-integration-test phase, do their own integration tests, and then stop the framework. Problem is, when I configure the rest/pom.xml with

      <plugin>
        <groupId>org.ops4j</groupId>
        <artifactId>maven-pax-plugin</artifactId>
        <version>1.4</version>
        <executions>
          <execution>
            <id>start-framework</id>
            <phase>pre-integration-test</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <framework>felix</framework>
              <noDependencies>true</noDependencies>
              <provision>
                <provision>mvn:org.ops4j.pax.web/pax-web-service/${pax.web.version}</provision>
              </provision>
            </configuration>
          </execution>
        </executions>
      </plugin>

it always includes all the bundles produced by the multimodule project, including api, core and ui. I don't really want the ui bundle installed in this situation.


Affects: 1.4
Fixed in: 1.7.0
Votes: 0, Watches: 0

@ops4j-issues
Copy link
Author

Stuart McCulloch commented

Target for 1.5

@ops4j-issues
Copy link
Author

Andreas Pieber commented

I' ve a similar issue. Not exactly the same, but I also want that some bundles do not start with pax:provision, although they're in the modules section of the pom. I've tried to fix this adding the following code:

/**

  • Ignore default bundles
    *
  • @parameter expression="{$ignores}"
    */
    private String[] ignores;

public void execute()
throws MojoExecutionException
{
m_bundleIds = new ArrayList();

if( deployPoms != null )

{ addAdditionalPoms(); }

for( Iterator i = m_reactorProjects.iterator(); i.hasNext(); )
{
MavenProject project = (MavenProject) i.next();
boolean shouldIgnore = false;
for (int j = 0; j < ignores.length; j++)

{ String ignore = ignores[j]; String[] artifact = ignore.split(":"); shouldIgnore = project.getArtifact().equals(artifact[1]) && project.getGroupId().equals(artifact[0]); }

if (!shouldIgnore)

{ addProjectBundles(project, false == noDependencies); }

}

setupRuntimeHelpers();

deployBundles();
}

I'm sure that's not the best method, but basically it should do the work. BUT I always get the following error: Any ideas what I do wrong?

ERROR BUILD ERROR
INFO ------------------------------------------------------------------------
INFO Failed to configure plugin parameters for: org.ops4j:maven-pax-plugin:1.4

(found static expression: '{$ignores}' which may act as a default value).

Cause: Cannot assign configuration entry 'ignores' to 'class [Ljava.lang.String;' from '{$ignores}', which is of type class java.lang.String

@ops4j-issues ops4j-issues added this to the 1.7.0 milestone Feb 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant